Bug 463025 - Closing laptop lid does not trigger sleep
Summary: Closing laptop lid does not trigger sleep
Status: RESOLVED NOT A BUG
Alias: None
Product: Powerdevil
Classification: Plasma
Component: general (show other bugs)
Version: 5.26.4
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-12-14 01:31 UTC by TraceyC
Modified: 2023-11-30 23:54 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description TraceyC 2022-12-14 01:31:44 UTC
SUMMARY
When Plasma is set to put the system to sleep when the laptop lid is closed, closing the lid does not put the system to sleep

SETTINGS
On AC Power - When laptop lid is closed, except when external monitor is connected
On battery / low battery - When laptop lid is closed, even when external monitor is connected

STEPS TO REPRODUCE
1. Have the laptop disconnected from AC power, on battery, and no external monitors connected
2. Close the lid

OBSERVED RESULT
The laptop locks the screen but the system does not go to sleep

EXPECTED RESULT
The system sleeps

SOFTWARE/OS VERSIONS
Linux/KDE Plasma:  Solus
KDE Plasma Version: 5.26.4
KDE Frameworks Version: 5.100.0
Qt Version: 5.15.7
X11

ADDITIONAL INFORMATION
Kernel version: 6.0.11-225. The issue was present with kernel 5.25, and older kernels as well as older Plasma versions
Laptop: Dell XPS 17 9710
System can go to sleep normally if I invoke it from the application menu, with the system shortcut or with `systemctl sleep`

I'm happy to provide any logs or other information that can help investigate the issue.
Comment 1 Nate Graham 2023-01-04 19:16:05 UTC
For debugging purposes, does it work properly when you disable the "except when external monitor is connected" setting and reboot?
Comment 2 TraceyC 2023-01-05 02:56:09 UTC
Sleep does not get triggered, even when the laptop is unplugged.
In that power profile,  "except when external monitor is connected" is disabled.

Are you wanting me to disable that on the AC power profile as well?
Comment 3 Nate Graham 2023-01-05 17:34:35 UTC
Yeah, can you try that too?
Comment 4 TraceyC 2023-01-06 16:32:25 UTC
The option in Energy Saving is actually "Even when an external monitor is connected"

I enabled that in the On AC Power tab. The laptop was put to sleep when the lid was closed, as verified by logs for systemd-sleep

I disabled that option again and closed the lid again. Sleep was again triggered as expected. I don't know what was different between the times it has not gone to sleep with the lid closed and right now. The problem may be intermittently caused by something else. I haven't changed any other settings.

It was definitely not asleep the day I reported the issue. I had closed the laptop and put it in a backpack for a car ride home. When I arrived, the fans were going full tilt and the laptop was hot. The battery had drained significantly.
Comment 5 Nate Graham 2023-01-09 17:55:21 UTC
Do you have a different value for that setting on battery vs AC power?
Comment 6 TraceyC 2023-01-14 23:17:15 UTC
In my last test, in my last comment, the settings were the same between AC and battery ( "Even when an external monitor is connected" was enabled in both.)

Right now, my settings are the same as in my initial report.
Comment 7 Nate Graham 2023-01-17 17:02:07 UTC
Thanks for the info. Can't reproduce, unsure how to proceed.
Comment 8 TraceyC 2023-01-19 03:43:58 UTC
The symptom happened again today, and I have more information from the journalctl logs. It seems the problem may not be related to the lid event. I had tried to put the system to sleep with a keyboard command, and left the house for a few hours. I unplugged the laptop from power. When I returned, the battery was critically low. I saw these entries repeated a few times:

'''
Jan 18 19:29:27 tlc-xps17-solus systemd-sleep[84816]: Selected interface 'wlp0s20f3'
Jan 18 19:29:27 tlc-xps17-solus systemd-sleep[84816]: 'SUSPEND' command timed out.
Jan 18 19:29:27 tlc-xps17-solus systemd-sleep[84811]: Entering sleep state 'suspend'...
Jan 18 19:30:09 tlc-xps17-solus systemd-sleep[84811]: Failed to put system to sleep. System resumed again: Device or resource busy
Jan 18 19:30:09 tlc-xps17-solus systemd-sleep[84875]: Failed to connect to non-global ctrl_ifname: (nil)  error: No such file or directory
Jan 18 19:35:21 tlc-xps17-solus systemd-sleep[85123]: Selected interface 'wlp0s20f3'
Jan 18 19:35:21 tlc-xps17-solus systemd-sleep[85123]: 'SUSPEND' command timed out.
Jan 18 19:35:21 tlc-xps17-solus systemd-sleep[85117]: Entering sleep state 'suspend'...
Jan 18 19:36:03 tlc-xps17-solus systemd-sleep[85117]: Failed to put system to sleep. System resumed again: Device or resource busy
Jan 18 19:36:03 tlc-xps17-solus systemd-sleep[85178]: Failed to connect to non-global ctrl_ifname: (nil)  error: No such file or directory
'''
Comment 9 fanzhuyifan 2023-11-30 23:54:55 UTC
(In reply to TraceyC from comment #8)
> The symptom happened again today, and I have more information from the
> journalctl logs. It seems the problem may not be related to the lid event. I
> had tried to put the system to sleep with a keyboard command, and left the
> house for a few hours. I unplugged the laptop from power. When I returned,
> the battery was critically low. I saw these entries repeated a few times:
> 
> '''
> Jan 18 19:29:27 tlc-xps17-solus systemd-sleep[84816]: Selected interface
> 'wlp0s20f3'
> Jan 18 19:29:27 tlc-xps17-solus systemd-sleep[84816]: 'SUSPEND' command
> timed out.
> Jan 18 19:29:27 tlc-xps17-solus systemd-sleep[84811]: Entering sleep state
> 'suspend'...
> Jan 18 19:30:09 tlc-xps17-solus systemd-sleep[84811]: Failed to put system
> to sleep. System resumed again: Device or resource busy
> Jan 18 19:30:09 tlc-xps17-solus systemd-sleep[84875]: Failed to connect to
> non-global ctrl_ifname: (nil)  error: No such file or directory
> Jan 18 19:35:21 tlc-xps17-solus systemd-sleep[85123]: Selected interface
> 'wlp0s20f3'
> Jan 18 19:35:21 tlc-xps17-solus systemd-sleep[85123]: 'SUSPEND' command
> timed out.
> Jan 18 19:35:21 tlc-xps17-solus systemd-sleep[85117]: Entering sleep state
> 'suspend'...
> Jan 18 19:36:03 tlc-xps17-solus systemd-sleep[85117]: Failed to put system
> to sleep. System resumed again: Device or resource busy
> Jan 18 19:36:03 tlc-xps17-solus systemd-sleep[85178]: Failed to connect to
> non-global ctrl_ifname: (nil)  error: No such file or directory
> '''

Seems the wifi device is preventing sleep. So this is probably not a KDE bug, but a problem with the wifi device configuration or drivers.