After a new install on an HP EliteBook with an Intel I7 core, when the iwlwifi module is loaded the system fails to complete shutdown and power off.

The install is mostly a standard openrc install for a personal use laptop.  The usual partitions were created and only /var, /opt and /home are on lvm2; one non-standard partition configuration is /usr/src and /lib/modules are on their own partition.  The /usr/src partition should be benign since it is only used when building the kernel; however, the /lib/modules partition was the cause of one issue that has already been resolved and may be the cause of the other.

First, the resolved issue.
On boot, the iwlwifi module was not found and the following message was displayed.
  * Loading kernel modules ...
   modprobe: FATAL: Module iwlwifi not found in directory /lib/modules/6.1.19-gentoo-x86_64 This was puzzling, since once logged in a find command found it where it should be and the module could be added on the command line without any problem.  This issue caused me to reboot and shutdown many times until noticing that modprobe was trying to load the iwlwifi module before /lib/modules was mounted.  This was easily fixed by adding a "/lib/modules" line to the /etc/initramfs.mounts file.  The one thing noticed from all the shutdowns and reboots was, when the iwlwifi module was not loaded the system shutdown fine and when it was loaded the system failed to shutdown and power off completely.

Second, Loading modules prevents shutdown,
The issue was discovered with iwlwifi, but occurs when any module from the /lib/modules/6.1.19-gentoo-x86_64 directory is tried instead and deleting the module before the "shutdown -h -P now" does not make a difference.

To get a better look at what is going on, the rc_logger variable was set to "YES" in /etc/rc.conf (rc_logger="YES").


Now the difference between the console display and /var/log/rc.log file on a clean shutdown and one with a module loaded preventing a clean shutdown.

Whether a module is loaded or not, the console and /var/log/rc.log match up to and including "Stopping the Logical Volume Manager" and then things start to deviate.

 * Stopping syslog-ng ...  [ ok ]                                                      <= console and /var/log/rc.log match.
 * Unmounting loop devices * Unmounting filesystems
 *   Unmounting /var ...  [ ok ]
 *   Unmounting /opt ...  [ ok ]
 *   Unmounting /home ...  [ ok ]
 *   Unmounting /usr/src ...  [ ok ]
 *   Unmounting /tmp ...  [ ok ]
 *   Unmounting /lib/modules ...  [ ok ]
 *   Unmounting /boot ...  [ ok ]
 * Deactivating swap devices ...  [ ok ]                                           <= console and /var/log/rc.log match.  * Stopping the Logical Volume Manager ...        <= When a module is loaded, this is the last line on the console.
  0 logical volume(s) in volume group "vg1" now active
  0 logical volume(s) in volume group "vg0" now active [ ok ] <= When a module is loaded, this is the last line in /var/log/rc.log.  * Setting hardware clock using the system clock [UTC] ...  [ ok ] <= When no module is loaded, this is on the console and in /var/log/rc.log.  * Stopping udev ...  [ ok ] <= When no module is loaded, this is on the console and in /var/log/rc.log.  rc shutdown logging stopped at Thu May 18 05:44:09 2023 <= When no module is loaded, this is the last line in /var/log/rc.log.  * Terminating remaining processes ...  [ ok ] <= When no module is loaded, this is on the console (See: /etc/init.d/killprocs).  * Killing remaining processes ...  [ ok ]                             <= When no module is loaded, this is on the console (See:  /etc/init.d/killprocs).  * Saving dependency cache ...  [ ok ] <= When no module is loaded, this is on the console (See: /etc/init.d/savecache).  * Remounting remaining filesystems read-only ...  [ ok ] <= When no module is loaded, this is on the console (See: /etc/init.d/mount-ro).  *   Remounting / read only ...  [ ok ]                                 <= When no module is loaded, this is on the console. reboot:  Power down                                                         <= When no module is loaded, this is on the console.


In short, it looks like the LVM was stopped correctly and everything was good up to that point; however, when a module is loaded it looks like nothing in /etc/runlevels/shutdown/ gets kicked off and the system is waiting.

My preference is to have this work while keeping the /lib/modules partition.  How it can be fixed?

FYI: Answering may be slow since my emails are received weekly through the digest.

Thank you.













Reply via email to