Summary: | Sleep on lid close and via global shortcut do not work anymore | ||
---|---|---|---|
Product: | [Plasma] plasmashell | Reporter: | Stephan Diestelhorst <stephan.diestelhorst> |
Component: | Power management & brightness | Assignee: | Plasma Bugs List <plasma-bugs> |
Status: | REPORTED --- | ||
Severity: | normal | CC: | jpetso, nate |
Priority: | NOR | ||
Version: | 6.2.5 | ||
Target Milestone: | 1.0 | ||
Platform: | Neon | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Stephan Diestelhorst
2025-01-05 23:43:24 UTC
I have had a quick look at UPower, and at least saw the lid toggling: $ upower --monitor-detail Monitoring activity from the power daemon. Press Ctrl+C to cancel. [23:53:54.853] daemon changed: daemon-version: 1.90.3 on-battery: no lid-is-closed: yes lid-is-present: yes critical-action: HybridSleep [23:53:57.904] daemon changed: daemon-version: 1.90.3 on-battery: no lid-is-closed: no lid-is-present: yes critical-action: HybridSleep [23:54:13.369] daemon changed: daemon-version: 1.90.3 on-battery: no lid-is-closed: yes lid-is-present: yes critical-action: HybridSleep The only (somewhat?) relevant info from journalctl (please note my locale is not C, but instead en_GB.UTF-8 Jan 05 23:53:54 d-allen systemd-logind[1370]: Lid closed. Jan 05 23:53:54 d-allen wpa_supplicant[1592]: wlp3s0: CTRL-EVENT-SIGNAL-CHANGE above=0 signal=-73 noise=9999 txrate=162000 Jan 05 23:53:54 d-allen dbus-daemon[1309]: [system] Activating service name='org.kde.powerdevil.backlighthelper' requested by ':1.414'> Jan 05 23:53:54 d-allen org.kde.powerdevil.backlighthelper[32352]: Detected locale "C" with character encoding "ANSI_X3.4-1968", which> Qt depends on a UTF-8 locale, and has switched to "C.UTF-8" instead. If this causes problems, reconfigure your locale. See the locale(1)> for more information. Jan 05 23:53:54 d-allen dbus-daemon[1309]: [system] Successfully activated service 'org.kde.powerdevil.backlighthelper' Jan 05 23:53:57 d-allen systemd-logind[1370]: Lid opened. Jan 05 23:53:59 d-allen wpa_supplicant[1592]: wlp3s0: CTRL-EVENT-SIGNAL-CHANGE above=1 signal=-59 noise=9999 txrate=121500 Jan 05 23:54:13 d-allen systemd-logind[1370]: Lid closed. Jan 05 23:54:13 d-allen dbus-daemon[1309]: [system] Activating service name='org.kde.powerdevil.backlighthelper' requested by ':1.414'> Jan 05 23:54:13 d-allen org.kde.powerdevil.backlighthelper[32397]: Detected locale "C" with character encoding "ANSI_X3.4-1968", which> Qt depends on a UTF-8 locale, and has switched to "C.UTF-8" instead. If this causes problems, reconfigure your locale. See the locale(1)> for more information. Jan 05 23:54:13 d-allen dbus-daemon[1309]: [system] Successfully activated service 'org.kde.powerdevil.backlighthelper' Do you by any chance recall when this stopped working? Was there a Plasma update, a kernel update, a upower update, or something else? Sorry, I should have mentioned this. This used to work. Unfortunately, I have used this laptop in a 24/7 on configuration in the last months, so it is a little hard to be precise when this stopped working. It was certainly working last summer, which is an annoyingly large window of updates. I am on KDE Neon User Edition 24.04. I am happy to poke a bit, but I am struggling to know where to start. If anyone knows the different code paths / general ways we get to suspend, and why this works from Sleep in KMenu, but not from the hotkeys and also not from the lock screen, that would be good to know. Otherwise, I can start digging and maybe enable the right log options / add some printfs in places and recompile the right things. I have been reading the powerdevil source code a bit. It seems there are two ways to get to suspend: * runner actions -> these seem to be talking to logind directly, and I think they are the ones invoked by KMenu and Krunner -> these seem to work * daemon actions -> these eventually seem to be turned into DBus commands to org.freedesktop.PowerManagement -> these don't work Manually trying $ qdbus org.freedesktop.PowerManagement /org/freedesktop/PowerManagement Suspend does nothing. Some more information: $ qdbus org.freedesktop.PowerManagement /org/freedesktop/PowerManagement CanSuspend true $ qdbus org.freedesktop.PowerManagement /org/freedesktop/PowerManagement/Inhibit HasInhibit false This seems to suggest that whatever hangs on the other side of that DBus port is not doing the right thing. I will keep digging as time permits, hope me logging stuff here is okay. |