I was very frustrated that my Framework 16 (Ryzen 7040 series) doesn't appear to support S3 sleep at all anymore.
In the meantime I've used hibernate, but it takes quite long to wake and stresses the SSD unnecessarily.
I can live with the higher power draw of modern / (dis)connected standby, but not with it waking up constantly, if even the lightest gust of wind grazes the laptop in any way.
(Lid opened, lid closed, power un/plugged, USB un/plugged, mouse moved, key pressed, randomly during the night, etc.)
All I want is for my laptop to only wake from standby upon a power button press and nothing else.
And after hours of searching I've concluded that there is no official way to select which wakeup sources should wake from modern standby.
All of the "normal" ways that used to work in the past for normal standby don't work anymore.
(powercfg /devicequery wake_armed
returns no devices, yet it wakes from any USB keyboard and mouse anyways)
At least the wakeup reason is listed in the Windows event log, which lead me to the following workaround idea:
Simply go right back to sleep if the wakeup reason doesn't match a whitelist.
I've tested it a bit and it seems to work okay-ish.
- Download the
goToSleep.bat
to any location. - Open the "Task Scheduler" (
taskschd.msc
) - Either try importing the
ModernStandbyWorkaround_Task.xml
file (not sure if it works)- Open the task, go to Actions, edit the "Start program" action and put in the path to the downloaded
goToSleep.bat
- Open the task, go to Actions, edit the "Start program" action and put in the path to the downloaded
- OR create a new task
- Name it however you like, e.g. "MondernStandbyIsShit"
- Switch to the "Trigger" tab and create a new trigger
- Begin the task > "On an event"
- Settings > Custom
- Click on "New event filter" > XML tab
- Paste the following XPath filter:
<QueryList> <Query Id="0" Path="System"> <Select Path="System"> *[System[Provider[@Name='Microsoft-Windows-Kernel-Power'] and (EventID=507)]] and *[EventData[Data[@Name='Reason'] != '1' and Data[@Name='Reason'] != '31' and Data[@Name='Reason'] != '44']] </Select> </Query> </QueryList>
- Change line 6 so it filters for the event IDs you want whitelisted. (Event IDs listed below)
This line currently only allowes wakes on power button, key press and fingerprint reader read. - OK > OK
- Switch to the Actions tab and create a new action
- Action: "Start program"
- Provide the path to the
goToSleep.bat
file
- Conditions tab
- Uncheck "Start the task only if the computer is on AC power"
- It's a good idea to temporarily increase the timout value in the script to 10-15s during testing, otherwise you may run into a standby-loop!
If I forgot a step, feel free to try to figure it out on your own or leave a comment ^^
On my Framework 16, I've gathered the following wakeup reasons:
ID | Reason (as printed in the event entry) |
---|---|
1 | Power Button |
5 | AC/DC Display Burst (power plugged in?) |
15 | Lid |
20 | Sleep, Hibernate, or Shutdown |
28 | AC/DC Display Burst Suppressed |
31 | Input Keyboard |
32 | Input Mouse |
33 | Input Touch (also touchpad) |
44 | 44 (Fingeprint reader on my Framework 16) |
very useful sharing, thx