What is waking my PC from sleep?

Hello there,

Recently, I have been having weird issues with my PC waking randomly from sleep. And by recently I mean the past few months - and before that I have had zero issues what so ever. Not that I would ever compare Linux to Windows, but this feels like a problem I shouldn’t have :smiley: Perhaps that is also why I have had troubles searching for solutions myself, lol.

Anyhow. Unfortunately, I can’t remember the source but I came across this command although results (for me at least) were where few:

journalctl --since "xx hours ago" -g "PM:|resume|suspend"

which produces:

aug 25 19:38:29 5900x-eos kernel: printk: Suspending console(s) (use no_console_suspend to debug)
aug 25 19:38:29 5900x-eos kernel: ACPI: PM: Preparing to enter system sleep state S3
aug 25 19:38:29 5900x-eos kernel: ACPI: PM: Saving platform NVS memory
aug 25 19:38:29 5900x-eos kernel: ACPI: PM: Low-level resume complete
aug 25 19:38:29 5900x-eos kernel: ACPI: PM: Restoring platform NVS memory
aug 25 19:38:29 5900x-eos kernel: ACPI: PM: Waking up from system sleep state S3
aug 25 19:38:29 5900x-eos kernel: xhci_hcd 0000:02:00.0: xHC error in resume, USBSTS 0x401, Reinit
aug 25 19:38:29 5900x-eos systemd-sleep[45776]: System returned from sleep operation 'suspend'.
aug 25 19:38:29 5900x-eos kernel: ata6: failed to resume link (SControl 0)
aug 25 19:38:29 5900x-eos kernel: ata5: failed to resume link (SControl 0)
aug 25 19:38:29 5900x-eos kernel: PM: suspend exit
aug 25 19:38:29 5900x-eos steam[6098]: Game Recording - Created timeline on system resume [gameid=105600][started_recording=false]
aug 25 19:38:29 5900x-eos steam[6098]: Game Recording - Created timeline on system resume [gameid=105600][started_recording=false]
aug 25 19:38:29 5900x-eos org_kde_powerdevil[1325]: [  1468]    Time since last resume from sleep: 7813.930 seconds = 7813930 millisec (7813930295598nanosec)
aug 25 19:38:29 5900x-eos org_kde_powerdevil[1325]: [  1468][258864.844914] open() EACCES failure, recently resumed from sleep: false
aug 25 19:38:29 5900x-eos org_kde_powerdevil[1325]: [  1468][258865.052422] (recently_resumed_from_sleep_by_clocktime) Resume from sleep detected by BOOTTIME/MONOTONIC
aug 25 19:38:30 5900x-eos org_kde_powerdevil[1325]: [  1468]    Time since last resume from sleep: 93916.464 seconds = 93916465 millisec (93916464727239nanosec)
aug 25 19:38:30 5900x-eos org_kde_powerdevil[1325]: [  1468][258865.469871] open() EACCES failure, recently resumed from sleep: false
aug 25 19:38:30 5900x-eos org_kde_powerdevil[1325]: [  1468][258865.572189] (recently_resumed_from_sleep_by_clocktime) Called within 5 sec of reset
aug 25 19:38:30 5900x-eos org_kde_powerdevil[1325]: [  1468]    Time since last resume from sleep: 93916.984 seconds = 93916984 millisec (93916984493681nanosec)
aug 25 19:38:30 5900x-eos org_kde_powerdevil[1325]: [  1468][258865.973772] open() EACCES failure, recently resumed from sleep: false
aug 25 19:38:30 5900x-eos org_kde_powerdevil[1325]: [  1468][258866.075741] (recently_resumed_from_sleep_by_clocktime) Called within 5 sec of reset
aug 25 19:38:31 5900x-eos org_kde_powerdevil[1325]: [  1468]    Time since last resume from sleep: 93917.488 seconds = 93917488 millisec (93917488046107nanosec)
aug 25 19:38:31 5900x-eos org_kde_powerdevil[1325]: [  1468][258866.486577] open() EACCES failure, recently resumed from sleep: false
aug 25 19:38:31 5900x-eos org_kde_powerdevil[1325]: [  1468][258866.588790] (recently_resumed_from_sleep_by_clocktime) Called within 5 sec of reset
aug 25 19:38:31 5900x-eos org_kde_powerdevil[1325]: [  1468]    Time since last resume from sleep: 93918.001 seconds = 93918001 millisec (93918001095215nanosec)
aug 25 19:38:31 5900x-eos org_kde_powerdevil[1325]: [  1468][258866.994701] open() EACCES failure, recently resumed from sleep: false
aug 25 19:38:32 5900x-eos org_kde_powerdevil[1325]: [  1468][258867.097124] (recently_resumed_from_sleep_by_clocktime) Called within 5 sec of reset
aug 25 19:38:32 5900x-eos systemd[1]: systemd-suspend.service: Deactivated successfully.
aug 25 19:38:32 5900x-eos systemd[1]: systemd-suspend.service: Consumed 2.763s CPU time over 6.710s wall clock time, 2.9M memory peak.
aug 25 19:38:32 5900x-eos systemd[1]: Starting NVIDIA system resume actions...
aug 25 19:38:32 5900x-eos systemd-logind[789]: Operation 'suspend' finished.
aug 25 19:38:32 5900x-eos org_kde_powerdevil[1325]: [  1372][258867.328539] (ldbus_handle_message)Received dbus signal PrepareForSleep(false=resume)
aug 25 19:38:32 5900x-eos suspend[45990]: nvidia-resume.service
aug 25 19:38:32 5900x-eos logger[45990]: <13>Aug 25 19:38:32 suspend: nvidia-resume.service
aug 25 19:38:32 5900x-eos systemd[1]: nvidia-resume.service: Deactivated successfully.
aug 25 19:38:32 5900x-eos systemd[1]: Finished NVIDIA system resume actions.
aug 25 19:38:32 5900x-eos org_kde_powerdevil[1325]: [  1468]    Time since last resume from sleep: 93918.509 seconds = 93918509 millisec (93918509429096nanosec)
aug 25 19:38:32 5900x-eos org_kde_powerdevil[1325]: [  1468][258867.534864] open() EACCES failure, recently resumed from sleep: false
aug 25 19:38:33 5900x-eos org_kde_powerdevil[1325]: [  1468][258868.752137] (recently_resumed_from_sleep_by_clocktime) Called within 5 sec of reset
aug 25 19:38:33 5900x-eos org_kde_powerdevil[1325]: [  1468][258868.752139] (dw_watch_display_connections) Recently resumed from sleep detected
aug 25 19:38:38 5900x-eos org_kde_powerdevil[1325]: [  1468][258873.783501] (recently_resumed_from_sleep_by_clocktime) Resume from sleep detected by BOOTTIME/MONOTONIC
aug 25 19:38:38 5900x-eos org_kde_powerdevil[1325]: [  1468][258873.783504] (dw_watch_display_connections) Recently resumed from sleep detected
aug 25 19:38:40 5900x-eos org_kde_powerdevil[1325]: [  1468][258875.392988] (recently_resumed_from_sleep_by_clocktime) Called within 5 sec of reset
aug 25 19:38:40 5900x-eos org_kde_powerdevil[1325]: [  1468][258875.392991] (dw_watch_display_connections) Recently resumed from sleep detected
aug 25 19:38:41 5900x-eos org_kde_powerdevil[1325]: [  1468][258877.008711] (recently_resumed_from_sleep_by_clocktime) Called within 5 sec of reset
aug 25 19:38:41 5900x-eos org_kde_powerdevil[1325]: [  1468][258877.008713] (dw_watch_display_connections) Recently resumed from sleep detected
aug 25 19:38:43 5900x-eos org_kde_powerdevil[1325]: [  1468][258878.622242] (recently_resumed_from_sleep_by_clocktime) Called within 5 sec of reset
aug 25 19:38:43 5900x-eos org_kde_powerdevil[1325]: [  1468][258878.622245] (dw_watch_display_connections) Recently resumed from sleep detected

Forgive me, but I find it troublesome to debug the above. My best guess is something to do with Nvidia drivers - they are after all root to much evil on Linux I have learned :stuck_out_tongue: I feel I have tried the basics such as up-to-date system (not RIGHT now though), shut off peripheral devices (mouse for instance, although this has NOT been an issue previously).

Still, the issue persist at random. Can anyone help? Here are my specs: https://dpaste.com/4V4VQ2C36

Thank you all very much in advance! Have a good day/evening/night.

First check that in your bios “wake up by keyboard mause and network” events is disabled.
Fastboot and hybrid sleep also should be disabled.

Thank you for your reply!

I already have the options mentioned disabled. Although, since I (to my knowledge) haven’t changed any settings in BIOS, I would not expect those settings to be the culprit. As stated, the issues appeared all of a sudden, and I can’t remember doing anything differently than usual.

After reading my post again, I see I wasn’t quite clear: I am more interested in how to debug properly. As mentioned I searched to my abilities without many results which surprised me a bit. Normally searches yield a few results for sure.

So, is there any better commands or ways to debug? Thanks again! And sorry for n00bsh0w as per usual.

Try to search for:
arch linux how to see log of events that waking up pc from sleep

it’s better to look through the whole journal, not just filtered output, because what you posted it only covers a few seconds and looks like the pc woke up instantly or it’s just the wake up process what you posted.

When you are troubleshooting it’s better to turn off apps like steam and what isn’t necessary. The best way is looking through the journal, don’t filter it, because you don’t even know what you are looking for and there could be important messages that you don’t see.

So just journalctl -b 0 and look through it after wake up. You only have to look though the end of the log. It could be some program that doesn’t let the pc to go to sleep or something because of hardware.