STEPS TO REPRODUCE 1. Initiate a shut down of your laptop: Ctrl Alt Del -> Power off 2. Close the lid right after - at least before the system has fully powered off OBSERVED RESULT The laptop actually goes into standby, ignoring the intention to shut down. This is indicated in my case by the red blinking dot of my thinkpad on its backcover. If I open the lid there are two possible states: it shows the lockscreen or a black screen with random white or green dots, which is a broken state. This is problematic, because, when it stays in standby w/o me knowing, I may find it with an empty battery next time. EXPECTED RESULT Plasma disables "standby on lid closed" for the period, when a shut down process is happening. SOFTWARE/OS VERSIONS Operating System: Fedora Linux 41 KDE Plasma Version: 6.2.5 KDE Frameworks Version: 6.10.0 Qt Version: 6.8.1 Kernel Version: 6.12.9-200.fc41.x86_64 (64-bit) Graphics Platform: Wayland Processors: 16 × AMD Ryzen 7 PRO 5850U with Radeon Graphics Graphics Processor: AMD Radeon Graphics System Version: ThinkPad X13 Gen 2a
Can verify this behavior across several devices (Framework 13, Framework 16 (w/ 7700S), ThinkPad T480, etc) running from Fedora 38 to 41, in late versions of Plasma 5, and all new versions of Plasma 6. Setting "when laptop lid is closed" options to "Sleep" and "Lock Screen" both seem to disrupt the shutdown process, requiring me to forcefully power off the device upon opening the lid again before being able to interact with the system in any way.
you can workaround this issue putting '[Login] HandleLidSwitch=ignore' on /etc/systemd/logind.conf, so i'm guessing, would this be fixed if kde by taking the handle-lid-switch inhibitor? as said in the logind.conf manpage "A different application may disable logind's handling of system power and sleep keys and the lid switch by taking a low-level inhibitor lock ("handle-power-key", "handle-suspend-key", "handle-hibernate-key", "handle-lid-switch", "handle-reboot-key"). This is most commonly used by graphical desktop environments to take over suspend and hibernation handling, and to use their own configuration mechanisms. If a low-level inhibitor lock is taken, logind will not take any action when that key or switch is triggered and the Handle*= settings are irrelevant."
I can reproduce this on a ThinkPad, but not on a different laptop, an HP Pavilion Plus 14. That suggests that the behavior here is controlled by the device drivers, and not anything we can affect in Plasma code. I'd recommend reporting the issue upstream.
(In reply to Nate Graham from comment #3) > I can reproduce this on a ThinkPad, but not on a different laptop, an HP > Pavilion Plus 14. > > That suggests that the behavior here is controlled by the device drivers, > and not anything we can affect in Plasma code. I'd recommend reporting the > issue upstream. upstream in this case is the laptop drivers or logind(considering that it can be "fixed" by disabling logind)?
Could be either, I'm not sure.
(In reply to Nate Graham from comment #3) > I can reproduce this on a ThinkPad, but not on a different laptop, an HP > Pavilion Plus 14. > > That suggests that the behavior here is controlled by the device drivers, > and not anything we can affect in Plasma code. I'd recommend reporting the > issue upstream. Humm looking at the plasma code [0], between the logout and shutdown request [1], and the call to logind shutdown [2] [3], there is quite a lot of plasma code going on, and I don't see anything particular that is blocking sleep (maybe I am missing something obvious) [0] https://invent.kde.org/plasma/plasma-workspace/-/blob/master/startkde/plasma-shutdown/shutdown.cpp?ref_type=heads [1] https://invent.kde.org/plasma/plasma-workspace/-/blob/6ce316502af5110c18a6aa7dec6a03f4ca108808/startkde/plasma-shutdown/shutdown.cpp#L30 [2] https://invent.kde.org/plasma/plasma-workspace/-/blob/6ce316502af5110c18a6aa7dec6a03f4ca108808/startkde/plasma-shutdown/shutdown.cpp#L171 [3] https://invent.kde.org/plasma/plasma-workspace/-/blob/6ce316502af5110c18a6aa7dec6a03f4ca108808/libkworkspace/sessionmanagementbackend.cpp#L174
Thanks Yifan Zhu! Nate, could we maybe reopen this until it's clarified that it's definitely not a Plasma bug and not a lucky coincidence with the HP laptop, so that this bug gets more attention? Who of us affected is going to report it upstream and links the report here? :) Thanks!
Sure.
(In reply to postix from comment #7) > Thanks Yifan Zhu! > > Nate, could we maybe reopen this until it's clarified that it's definitely > not a Plasma bug and not a lucky coincidence with the HP laptop, > so that this bug gets more attention? > > Who of us affected is going to report it upstream and links the report here? > :) > > Thanks! Tried first to report on logind https://github.com/systemd/systemd/issues/36759 let see if the devs helps to determine if it's a driver issue :)