- Important update (read me first!)
- Purpose
- Overview of steps
- Detailed explanation of steps
- Troubleshooting
- Future work
A much simpler method was described by @nullsvm in this comment, which involves modifying a UEFI variable directly using the RU.EFI
BIOS editor.
It worked for me on X13 2021 (bios versions 412, 413, 414) and for some others (here and here) on X13 2022, but some 2022 owners report it doesn't work for them (see comments).
I'm keeping the original text here even though I'm not using the Clover method anymore; IMHO you should try the RU.EFI
route before using Clover.
This gist documents a workaround I'm using on my ASUS GV301QE (X13 flow 2021) to replace S0 sleep (AKA modern standby or S0ix) by S3 sleep (AKA deep sleep or suspend-to-RAM).
This involves modifying one of the ACPI tables, called the DSDT. The modification is not permanent - nothing is written to the firmware itself - but rather through a bootloader that loads the modified DSDT before Windows starts.
I chose to go through Clover EFI bootloader; the same can be achieved on Linux via an initrd (see, e.g., here). Clover's main aim is to enable running MacOS on non-Apple systems, but we only care about its ability to load custom ACPI tables before booting Windows.
- Clover -
CLOVERX64.efi.zip
is enough, I used r5149. - IASL compiler - we only need
iasl.exe
I assume you downloaded these and extracted the files CLOVERX64.efi
and iasl.exe
to C:\Users\YourUserName\Downloads
.
Replace YourUserName
here and in the instructions below with your actual user name.
- Disable S0 sleep via Windows registry.1
- Install Clover to the ESP.
- Disable Secure boot in UEFI setup.
- Set Clover as the default boot option in UEFI setup.
- Dump current DSDT using Clover.2
- Patch DSDT to enable S3 sleep using
iasl
. - Place patched DSDT in Clover's directory within the ESP.
- Configure Clover to automatically load Windows upon reboot.
- Optional: install a Clover theme.
With this order of steps, only two reboots are necessary :)
To disable S0 sleep, type in the Admin Command Prompt:
reg add HKLM\System\CurrentControlSet\Control\Power /v PlatformAoAcOverride /t REG_DWORD /d 0
Keep Command Prompt open for the next step.
Mount ESP:
mountvol R: /s
Create directory structure for Clover:
mkdir R:\EFI\CLOVER\ACPI\Windows
mkdir R:\EFI\CLOVER\ACPI\origin
Install Clover:
copy C:\Users\YourUserName\Downloads\CLOVERX64.efi R:\EFI\CLOVER
Clover works fine even without a configuration file, but we'll install a basic one in Step 8.
Edit: ACPI_BIOS_ERROR
BSODs are reported with an empty configuration file, let's do it now.
Create a basic configuration file for Clover:
notepad R:\EFI\CLOVER\config.plist
Copy and paste the following in it:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Boot</key>
<dict>
<key>Timeout</key>
<integer>-1</integer>
<key>Fast</key>
<false/>
</dict>
<key>GUI</key>
<dict>
<key>Scan</key>
<dict>
<key>Entries</key>
<true/>
<key>Legacy</key>
<false/>
</dict>
</dict>
</dict>
</plist>
Restart the computer, and press Esc
to show Boot Menu.
Enter UEFI Setup (last option).
Press F7 to switch to Advanced Mode. From the Security tab, disable Secure Boot if it is enabled:
Keep UEFI Setup open for the next step.
From the Boot tab, add a boot option for Clover:
Select Clover as Boot option #1:
Save and exit UEFI Setup, Clover should boot.
Press F4 to dump ACPI tables.
There is no visual feedback, but Clover saves them to EFI\CLOVER\ACPI\origin
.
Boot Windows ("Microsoft EFI Boot", usually leftmost option).
Run Command Prompt as Admin.
To verify that S0 is disabled, type:
powercfg /a
The important line is
Standby (S0 Low Power Idle) The system firmware does not support this standby state.
Mount ESP and copy original DSDT to working directory:
cd \Users\YourUserName\Downloads
mountvol R: /s
copy R:\EFI\CLOVER\ACPI\origin\DSDT.aml .
Decompile DSDT using IASL and edit it using notepad:
iasl DSDT.aml
notepad DSDT.dsl
Two changes are required: bump the version and enable S3.
-
Increase the last number in
DefinitionBlock
(e.g. from0x01072009
to0x0107200A
): -
Search for
XS3
and change it to_S3
:
Save DSDT.dsl and recompile:
iasl DSDT.dsl
There should be warnings, but not errors.
Keep Command Prompt open for the next step.
Copy the modified DSDT to the ESP:
copy DSDT.aml R:\EFI\CLOVER\ACPI\WINDOWS\
Keep Command Prompt open for the next step.
Edit Clover's configuration file:
notepad R:\EFI\CLOVER\config.plist
Either change the Timeout
parameter from -1
to 2
to make Clover boot Windows in 2 seconds, or change the Fast
parameter from false
to true
if you don't want to even see Clover during boot.
Save the file and reboot.
Place your favorite Clover theme in \EFI\CLOVER\themes
and reference it in config.plist
:
See here for a list of themes.
If S3 sleep works, but the battery is not detected, then you might have dumped the ACPI tables incorrectly.
Specifically, using acpidump.exe
from ACPICA tools is known to create this problem.
Dump from Clover, using F4, and patch it (Steps 5-6-7).
If you get intermittent blue screens when waking up from S3 sleep, check whether the driver involved is AMDACPBUS.SYS
(AMD Audio CoProcessor). Version 6.0.0.29 was reported doing this; version 6.0.0.50 seems OK.
Edit: all versions of AMDACPBUS.SYS
seem to handle S3 sleep badly. One particular annoying behaviour is that upgrading the AMD graphics driver causes a BSOD ("Driver unloaded before cancelling pending operations"). I keep this device disabled.
To fix, disable the AMD Audio CoProcessor device in Device Manager. Not idea what it actually does.
To fix, update the AMD graphics driver (5800HS/5900HS or 6800HS/6900HS). Maybe it also helps to install the latest AMD chipset drivers.
ACPI tables are stored in the BIOS, so after upgrading most likely you get partial behaviour or BSOD upon boot.
To fix, re-dump and re-patch DSDT (Steps 5-6-7). I actually had to do it twice afte upgrading to BIOS version 413 (after upgrade, I got a BSOD upon boot; after first iteration, S3 was working but battery wasn't detected; after second iteration, everything is OK).
During S3 sleep, the power on led on the left side double-blinks. If you're annoyed by the keyboard backlight double-blinking, this can be disabled in Armoury Crate->System->Lighting->Settings:
- To re-enable S0 sleep, open Command Prompt as Admin and type:
reg delete HKLM\System\CurrentControlSet\Control\Power /v PlatformAoAcOverride
- To disable Clover temporarily, choose Windows Boot Manager from the Boot menu.
- To disable Clover until further notice, enter UEFI Setup and set Windows Boot Manager as boot option #1.
- To uninstall Clover, open Command Prompt as Admin and type:
mountvol R: /s
del /s R:\EFI\CLOVER\
- Design a proper ROG theme for Clover :)
- Understand why the ROG red logo isn't showing when Windows boots. I have it working in a slightly different Clover installation, so it must be something about the drivers or the OEM config.
Update: the OEM logo is referenced by an ACPI table called BGRT, which contains a physical memory address. Maybe this memory area is overwritten by Clover? anyway, it's possible to revert to the default Windows boot logo using
DropTables
in Clover'sconfig.plist
. - Collect some more DSDTs; perhaps it's possible to provide the correct ones for each model in the
ACPI\OEM
directory and skip Steps 5-6-7. - Understand whether Clover's mechanism for DSDT patching can be used directly, which could replace Step 5 altogether.
Update: no :( since Clover's
PatchACPI_OtherOS()
function only supports loading ACPI tables from.aml
files and theDropTables
command.
Let me mention that I haven't been able to get S3 working on Win11 22H2 or 23H2, only on 21H2 (which I am still using).
With AMD Audio Coprocessor disabled (and blacklisted, for convenience) I get zero BSODs, only occasional GPU driver crashes upon wakeup.
Use G-helper with the option "Enable GPU on shutdown", it helps with abnormal power consumption.