Idle State Doesn't Trigger Suspend Properly

,

Hello!

With some recent update my system has stopped suspending properly when it goes idle. The screen turns off, but the actual suspend never happens. If I trigger it via sudo systemctl suspend or through the Sleep button in the Application Launcher it suspends nicely and wakes up fine. The problem is only when the system tries to go to sleep when it is idle.

output of journalctl -b -u systemd-suspend.service

===> Triggered by idle timeout
Nov 15 11:52:14 hostname.int systemd[1]: Starting systemd-suspend.service - System Suspend...
Nov 15 11:52:14 hostname.int systemd-sleep[12653]: Successfully froze unit 'user.slice'.
Nov 15 11:52:14 hostname.int systemd-sleep[12653]: Performing sleep operation 'suspend'...
Nov 15 11:52:15 hostname.int systemd-sleep[12653]: Failed to put system to sleep. System resumed again: Device or resource busy
Nov 15 11:52:15 hostname.int systemd-sleep[12653]: Successfully thawed unit 'user.slice'.
Nov 15 11:52:15 hostname.int systemd[1]: systemd-suspend.service: Main process exited, code=exited, status=1/FAILURE
Nov 15 11:52:15 hostname.int systemd[1]: systemd-suspend.service: Failed with result 'exit-code'.
Nov 15 11:52:15 hostname.int systemd[1]: Failed to start systemd-suspend.service - System Suspend.
<=== 

===> Triggered by 'sudo systemctl suspend'
Nov 15 11:52:45 hostname.int systemd[1]: Starting systemd-suspend.service - System Suspend...
Nov 15 11:52:45 hostname.int systemd-sleep[13189]: Successfully froze unit 'user.slice'.
Nov 15 11:52:45 hostname.int systemd-sleep[13189]: Performing sleep operation 'suspend'...
Nov 15 11:52:59 hostname.int systemd-sleep[13189]: System returned from sleep operation 'suspend'.
Nov 15 11:52:59 hostname.int systemd-sleep[13189]: Successfully thawed unit 'user.slice'.
Nov 15 11:52:59 hostname.int systemd[1]: systemd-suspend.service: Deactivated successfully.
Nov 15 11:52:59 hostname.int systemd[1]: Finished systemd-suspend.service - System Suspend.
<===

output of journalctl -k | grep -i fail

Nov 15 11:52:15 hostname.int kernel: PM: Some devices failed to suspend, or early wake event detected

I have tried unplugging things that can be inhibiting it but “something” might still be failing to suspend. Problem is, I have no idea how to find out what that is! Any tips?

So, my keyboards power button also doesn’t actually put the computer to sleep. Same behavior as when it times out. Am I right in assuming that powerdevil is handling that button press?

~ took 6s
❯ loginctl show-user | grep HandlePowerKey
HandlePowerKey=poweroff
HandlePowerKeyLongPress=ignore
~ took 4s
❯ systemd-inhibit --list
WHO            UID  USER  PID   COMM            WHAT                                                                       WHY                           >
ModemManager   0    root  1282  ModemManager    sleep                                                                      ModemManager needs to reset de>
NetworkManager 0    root  1361  NetworkManager  sleep                                                                      NetworkManager needs to turn o>
UPower         0    root  1164  upowerd         sleep                                                                      Pause device polling          >
PowerDevil     1000 devon 5055  org_kde_powerde handle-power-key:handle-suspend-key:handle-hibernate-key:handle-lid-switch KDE handles power events      >
proton-mail    1000 devon 10122 Proton Mail Bet sleep                                                                      Application cleanup before sus>

Thinking that the problem must reside somehow with powerdevil? The button is configured to poweroff (not desired but w/e) but powerdevil, which is what handles the idle timeout, tries to take over the behavior and change it to suspend, which is broken?