Unfortunately, installing only 5.14-rc5 (as HaoSama wrote) is not enough for me but it is necessary. Also updating DSDT is needed.
To do it run:
- Create a working directory
mkdir -p /tmp/acpi; cd /tmp/acpi/
- Dump all your ACPI files into recently created directory
sudo acpidump -b
- And decompile the DSDT:
iasl -e *.dat -d dsdt.dat
- Enable S3 state.
4.1. Open dsdt.dsl
with a text editor find and replace
Name (XS3, Package (0x04)
{
0x03,
Zero,
Zero,
Zero
})
with
Name (_S3, Package (0x04)
{
0x03,
Zero,
Zero,
Zero
})
4.2. also find line begins with DefinitionBlock
and increase OEM version (in my case 0x01072009
):
DefinitionBlock ("", "DSDT", 2, "HPQOEM", "8707 ", 0x01072009)
by replacing with
DefinitionBlock ("", "DSDT", 2, "HPQOEM", "8707 ", 0x01072010)
- Compile the final DSDT
iasl -ve -tc dsdt.dsl
- Create a cpio file
mkdir -p kernel/firmware/acpi
cp dsdt.aml kernel/firmware/acpi
find kernel | cpio -H newc --create > acpi_override
sudo cp acpi_override /boot
- Update GRUB:
Open
/etc/default/grub
with text editor and
append to key GRUB_CMDLINE_LINUX_DEFAULT
mem_sleep_default=deep
value.
For example, my line is
GRUB_CMDLINE_LINUX_DEFAULT="splash resume=UUID=ddd96d19-0c4e-4523-86ff-033cffb11d58 mem_sleep_default=deep"
Then, add the line GRUB_EARLY_INITRD_LINUX_CUSTOM="acpi_override"
below.
Finally run
sudo update-grub
My laptop is HP 15s-eq1xxx, Ryzen 3 4300U.
I had adapted for my laptop the solution described here.
You can check if S3 System State become available by
sudo dmesg | grep -i acpi | grep supports