Hello experts,
my computer has a weird behaviour: if I put it in suspended mode, sometimes it does, sometimes it wakes up back again, either immediately or after 4~5 seconds. After 3 or 4 attempts, it gets in suspended mode permanently.
Is there a way to trace down what device/event triggered the wake? I would try to disable the culprit via an udev rule, if I figured out which one it is.
Worth noting that the Lenovo Iām currently using wonāt stay in suspend (wakes back up straight away) unless I unplug the wired USB mouse immediately after clicking the suspend option.
Same issue with one of the keyboards; an old PS/2 model connected via an adaptor. You can leave the USB part plugged in, as long as you disconnect the keyboardās own plug. Thatās a shame as that KB and its identical twin have power and media controls.
You can see what can devices/buses can wake up your system with:
sudo cat /proc/acpi/wakeup
And after the system wakes up, get the stats with:
sudo cat /sys/kernel/debug/wakeup_sources
This can be a lot to readā¦
But the devices that have numbers for things like total_time, I was able to track down the PCIe ID of the USB controller with the keyboard plugged into it.
I am not sure if we can get more narrow than that?
Another thing that could potentially wake up your system is a systemd timer.
Just tested on my system. It works ⦠as long as the mouse isnāt moved, because that triggers a wake event (which doesnāt happen if the mouse is unplugged and then re-connected later, before waking (via key press)).
My workaround: the mouse can āsleepā on its back when I go out.
Something that might be worth checking out:
Check that your UEFI isnāt set to wake-up from suspend on mouse movement. I know mine has a setting for that, so that might play a role.
@LordDaveTheKind, this might be something for you to double-check as well.
The wake on lan could be another culprit, as you mentioned the phantom wake movements from mouse (boy i once had a tiny hair in the laser, it drove me crazy till i found it, pc waked up, the pointer jumped but only sometimes).
I had a NAS on my home network once, which had the habit of broadcasting wake on lan to all because it wanted to contact some proprietary software on the pc from time to time.
I have already disabled mouse and keyboard via a dedicated udev rule and tested them, but the issue is still there. Iām proceeding with the other tracing methods mentioned in the thread.
Here is the log concerning a specific suspend process:
ā Boot 97549f54c4944a0988d53433605a20a0 ā
Apr 21 17:15:08 towerpc systemd[1]: Starting System Suspendā¦
Apr 21 17:15:08 towerpc systemd-sleep[12307]: User sessions remain unfrozen on explicit request ($SYSTEMD_SLEEP_FREEZE_USER_SESSIONS=0).
Apr 21 17:15:08 towerpc systemd-sleep[12307]: This is not recommended, and might result in unexpected behavior, particularly
Apr 21 17:15:08 towerpc systemd-sleep[12307]: in suspend-then-hibernate operations or setups with encrypted home directories.
Apr 21 17:15:08 towerpc systemd-sleep[12307]: Performing sleep operation āsuspendāā¦
Apr 21 17:15:16 towerpc systemd-sleep[12307]: System returned from sleep operation āsuspendā.
Apr 21 17:15:16 towerpc systemd[1]: systemd-suspend.service: Deactivated successfully.
Apr 21 17:15:16 towerpc systemd[1]: Finished System Suspend.
I also tried to set the value of Env. Variable SYSTEMD_SLEEP_FREEZE_USER_SESSIONS as 1 in the conf file /etc/environment and rebooted, but with no different result.
Thank you for this feedback! It has been very helpful.
USB Device at 013:003 is a Bluetooth adapter, which I use for turning my computer on with a PlayStation DualSense. And unfortunately seems to be the responsible also for the unsolicited wakeups.
Could it be a hardware issue, maybe a Bluetooth interference?
Yes in the end Iāll sort it out like this. Itās not a solution, as Iād loose a desired functionality, but apparently the new Steam Controller is off soon, and I can dismiss to do it via Bluetooth.
Thanks everyone who collaborated to the thread. I will close it now.