From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 2FAFC15806E for ; Tue, 23 May 2023 20:34:50 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1D1C8E0940; Tue, 23 May 2023 20:34:44 +0000 (UTC) Received: from mail01.datsemultimedia.com (mail01.datsemultimedia.com [IPv6:2600:3c01::f03c:91ff:fefc:dce1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 2DC1AE090E for ; Tue, 23 May 2023 20:34:42 +0000 (UTC) Received: from tux2 ([::ffff:192.252.233.79]) (AUTH: LOGIN jrasku@armispiansystems.ca, SSL: TLSv1.3,256bits,TLS_AES_256_GCM_SHA384) by mail01.datsemultimedia.com with ESMTPSA id 00000000000EF9B7.00000000646D235A.00007011; Tue, 23 May 2023 13:34:34 -0700 Date: Tue, 23 May 2023 13:34:35 -0700 From: Jigme Datse To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] Loading modules prevents shutdown Message-ID: <20230523133435.7751e2ac@tux2> In-Reply-To: <3fea07fc-02d2-cc87-6abe-53e8a95f7e78@gmail.com> References: <3fea07fc-02d2-cc87-6abe-53e8a95f7e78@gmail.com> X-Mailer: Claws Mail 4.1.0 (GTK 3.24.37; x86_64-pc-linux-gnu) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply Mime-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg=pgp-sha256; boundary="=_mail01.datsemultimedia.com-28689-1684874075-0001-2" X-Archives-Salt: c8cac67d-3220-4464-a9ac-8a9d8deaad9e X-Archives-Hash: 89c69f7ab5b0bc386f43c287310dd556 This is a MIME-formatted message. If you see this text it means that your E-mail software does not support MIME-formatted messages. --=_mail01.datsemultimedia.com-28689-1684874075-0001-2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Tue, 23 May 2023 15:58:34 -0400 dhk wrote: > 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. >=20 > The install is mostly a standard openrc install for a personal use=20 > laptop.=C2=A0 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.=C2=A0 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. /lib should be in your root partition, I know you are saying /lib/modules, but I think it applies to directories under /lib *except* in cases when that directory should be under /var /opt or /usr more accurately. =20 > First, the resolved issue. > On boot, the iwlwifi module was not found and the following message > was displayed. > =C2=A0 * Loading kernel modules ... > =C2=A0=C2=A0 modprobe: FATAL: Module iwlwifi not found in directory=20 > /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.=C2=A0 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.=C2=A0 This was easily > fixed by adding a "/lib/modules" line to the /etc/initramfs.mounts > file.=C2=A0 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. >=20 > 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. >=20 > To get a better look at what is going on, the rc_logger variable was > set to "YES" in /etc/rc.conf (rc_logger=3D"YES"). >=20 >=20 > 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. >=20 > 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. >=20 > =C2=A0* Stopping syslog-ng ...=C2=A0 [ ok=20 > ]=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 <=3D console and=20 > /var/log/rc.log match. > =C2=A0* Unmounting loop devices * Unmounting filesystems > =C2=A0*=C2=A0=C2=A0 Unmounting /var ...=C2=A0 [ ok ] > =C2=A0*=C2=A0=C2=A0 Unmounting /opt ...=C2=A0 [ ok ] > =C2=A0*=C2=A0=C2=A0 Unmounting /home ...=C2=A0 [ ok ] > =C2=A0*=C2=A0=C2=A0 Unmounting /usr/src ...=C2=A0 [ ok ] > =C2=A0*=C2=A0=C2=A0 Unmounting /tmp ...=C2=A0 [ ok ] > =C2=A0*=C2=A0=C2=A0 Unmounting /lib/modules ...=C2=A0 [ ok ] > =C2=A0*=C2=A0=C2=A0 Unmounting /boot ...=C2=A0 [ ok ] > =C2=A0* Deactivating swap devices ...=C2=A0 [ ok=20 > ]=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =C2=A0 =C2= =A0=C2=A0=C2=A0=C2=A0 <=3D console and=20 > /var/log/rc.log match. > =C2=A0* Stopping the Logical Volume Manager ... =C2=A0 =C2=A0 =C2=A0=C2= =A0 <=3D When a module > is loaded, this is the last line on the console. > =C2=A0 0 logical volume(s) in volume group "vg1" now active > =C2=A0 0 logical volume(s) in volume group "vg0" now active [ ok ] <=3D > When a module is loaded, this is the last line in /var/log/rc.log. > =C2=A0* Setting hardware clock using the system clock [UTC] ...=C2=A0 [ = ok ] > <=3D When no module is loaded, this is on the console and in > /var/log/rc.log. > =C2=A0* Stopping udev ...=C2=A0 [ ok ] <=3D When no module is loaded, th= is is on=20 > the console and in /var/log/rc.log. > =C2=A0rc shutdown logging stopped at Thu May 18 05:44:09 2023 <=3D When = no=20 > module is loaded, this is the last line in /var/log/rc.log. > =C2=A0* Terminating remaining processes ...=C2=A0 [ ok ] <=3D When no mo= dule is=20 > loaded, this is on the console (See: /etc/init.d/killprocs). > =C2=A0* Killing remaining processes ...=C2=A0 [ ok ] > <=3D When no module is loaded, this is on the console (See:=C2=A0=20 > /etc/init.d/killprocs). > =C2=A0* Saving dependency cache ...=C2=A0 [ ok ] <=3D When no module is = loaded,=20 > this is on the console (See: /etc/init.d/savecache). > =C2=A0* Remounting remaining filesystems read-only ...=C2=A0 [ ok ] <=3D= When no=20 > module is loaded, this is on the console (See: /etc/init.d/mount-ro). > =C2=A0*=C2=A0=C2=A0 Remounting / read only ...=C2=A0 [ ok ] > <=3D When no module is loaded, this is on the console. > reboot:=C2=A0 Power=20 > down=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 <=3D When > no module is loaded, this is on the console. I feel the issue is indeed the mounting /var/modules ... Because you `umount` it before you unload the modules... Your usage is very much, "non-standard" and just changing that *likely* would fix it. =20 > 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. >=20 > My preference is to have this work while keeping the /lib/modules=20 > partition.=C2=A0 How it can be fixed? I think that may be literally impossible... Or at least not even, "non-trivial". The *trivial* solution, is to have /lib/modules on your root partition. =20 > FYI: Answering may be slow since my emails are received weekly > through the digest. If that's fine, it's fine by me... =20 --=_mail01.datsemultimedia.com-28689-1684874075-0001-2 Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEE2C3pgfhTZmVgse8f7gM/m3mzx0IFAmRtI1sACgkQ7gM/m3mz x0Izbwf+MyDVh04VLQOUiiZt8nu07QUW34Kt4BfqBy9NYIudua8fJ+TFZXJ7dV5K CobSpdQWRoC1lMzzHKfKqs6HFzYb0FBJE8kEyv3KsKLXXwQ0U7Ej18AVbYveg4hs 6bSseCECOKrp7TWAq9BNkeCINjqiIfjwwf+4ik8R6iGAJUOX/ellwOzz9stxIoEj V3bQ/NDawk+fllnW9h7EZvTiXBz9p03Uh6zlpDFE4SS6HyeHODH4Xbrmm3MlGbZu 2goYjqOo4CrZjHPt0K9Ep3RQRGWWBO2pMCcdJ+aUL6r4A6ikn6D+II1fdWmIED/l C/8yVB9qI3xjHvjGlsWZqAQ6Pk7BsQ== =osNE -----END PGP SIGNATURE----- --=_mail01.datsemultimedia.com-28689-1684874075-0001-2--