Hi Jose, thanks for pointing out how to get the diagnostic report. (Note that the "systemsleepdiagnostics" option seems to be deprecated so I used "powercfg -sleepstudy" instead.)
I was able to see some more information about what the system is doing, but the results are... confusing. The following sequence of events happens when the PC randomly wakes itself up from sleep:
- I put the system to sleep from the start menu. It enters "Standby", more specifically "TargetState/EffectiveState" = 4.
- After a few minutes, the system goes into the state "Screen Off", with "Entry Reason" = "Hibernate, or Shutdown"; and "Exit Reason" = "Power Button".
- The system then immediately enters the "Active" state (wakes up from sleep). "Entry Reason" = "--" and "Exit Reason" = "Unknown".
I don't quite understand a few things going on here:
- Is "TargetState/EffectiveState" = 4 the same as S4? This wouldn't make much sense as S4 is hibernation, which I even have disabled on my system (along with hybrid sleep). I wasn't able to find any documentation on what this state is, however.
- I'm assuming this means a routine somewhere sends the system into "Screen Off", and that this routine is terminated with the "Power Button" event. I can't gather why this is: it happens without touching any power buttons on the PC or monitor. Oddly enough, waking the computer using my keyboard generates exactly the same series of events (2) and (3), with "Exit Reason" = "Power Button". It doesn't seem to matter which USB port I have the keyboard plugged into. If I use the mouse instead, it gives "Exit Reason" = "Mouse Input", which makes sense.
I'm a bit baffled, especially since this behavior doesn't occur after suspending the system using systemd in my Linux boot (which sends the system into S3, and assuming this is what "Sleep" in the Windows start menu does). I'll do some more digging, but if you see anything in this report that I'm missing then any help would be much appreciated!