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.)
If I manage to type the passphrase quickly (e.g. <15 sec.) the problem goes away.
If I connect the monitor to the laptop's integrated HDMI output instead of the dock, that also makes the problem go away.
Setting either HandleLidSwitch=ignore or HandleLidSwitchExternalPower=ignore in /etc/systemd/logind.conf also makes the problem go away.
Setting a sufficiently long HoldoffTimeoutSec= also works.
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
Obtain a 10th gen ThinkPad X1 Carbon (or sufficiently similar) laptop. Install Fedora 40 on it with disk encryption enabled.
Obtain a Lenovo 40AN "ThinkPad Thunderbolt 3 Dock" (or sufficiently similar). Attach power, monitor, input devices, etc.
Close laptop lid, connect to dock via a Thunderbolt cable, and press power button on dock to start.
When the encryption passphrase prompt appears, wait 25 seconds.
Enter passphrase.
Observe.
Additional program output to the terminal or log subsystem illustrating the issue
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.)
HandleLidSwitch=ignore
orHandleLidSwitchExternalPower=ignore
in/etc/systemd/logind.conf
also makes the problem go away.HoldoffTimeoutSec=
also works.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