systemd / systemd

The systemd System and Service Manager
https://systemd.io
GNU General Public License v2.0
12.79k stars 3.68k forks source link

When docked and lid closed, entering disk-encryption passphrase too slowly causes suspend during startup #33485

Open gnoutchd opened 3 days ago

gnoutchd commented 3 days ago

systemd version the issue has been seen with

systemd-255.7-1.fc40

Used distribution

Fedora 40

Linux kernel version used

6.9.5-200.fc40.x86_64

CPU architectures issue was seen on

x86_64

Component

systemd-logind

Expected behaviour you didn't see

I typically use my ThinkPad with the lid closed and an external monitor attached via a Thunderbolt dock. I use LUKS full-disk encryption, and for various reasons I often need a good bit of time (>25 seconds) to enter the passphrase. Nonetheless, once I finally enter the passphrase, I expect the laptop to boot up to the login screen without going into suspend mid-way through.

Unexpected behaviour you saw

After I enter my passphrase, Fedora starts booting, but about ~7 seconds later -- before it finishes booting -- it goes into suspend.

(Fortunately, if I wake it up, the bootup continues just fine, and I have no further problems with unwanted suspends until the next reboot. To be clear, the problem only occurs after I finish typing my passphrase, never before.)

FWIW, if I add udev.log_level=debug to the kernel cmdline, I can see in the logs that, for some reason, the dock's display outputs consistently disappear (ACTION=remove) for a few seconds during bootup and, moreover, this usually happens around the time that systemd-logind is started. This seems to be the case regardless of how quickly or slowly I enter the passphrase.

Steps to reproduce the problem

Additional program output to the terminal or log subsystem illustrating the issue

https://gist.github.com/gnoutchd/346d2147256125e656146e064136d292