Fixing instant wake from suspend on Gigabyte motherboards on Arch Linux
I recently updated BIOS on my Arch Linux PC with a Gigabyte B550 Aorus Elite motherboard, and I have noticed that "Sleep" is not working anymore - the device wakes up after a few seconds after being suspended.
Apparently, this is a known issue with Gigabyte motherboards on Linux.
The problem
On many Gigabyte Motherboards, including:
- B650 GAMING X AX V2
- B650 AORUS ELITE AX (Rev. 1.0)
- B650 EAGLE AX
- B650i AORUS ULTRA (Rev. 1.0)
- X670E AORUS PRO X
- X670 GAMING X AX V2
And apparently also my B550 AORUS ELITE, suspending Linux (S3 sleep) results in an immediate wake-up, even without touching keyboard, mouse or power button. The problem is caused by a bug in a firmware, where a chipset PCIe port (GPP0
) is incorrectly left enabled as a wakeup source.
Diagnosing the root cause
To check if this is the same cause for you, run the command to check your current ACPI wakeup sources:
cat /proc/acpi/wakeup
Look for the line starting with GPP0
. If it says enabled
, it means your system is also affected.
Verifying the fix
To verify if this is your issue, disable GPP0
as a wakeup source and check if you can suspend your system. To do so temporarily, run:
echo GPP0 | sudo tee /proc/acpi/wakeup
This command will temporarily disable GPP0
as a wakeup source and allow you to confirm the fix.
/proc/acpi/wakeup
is a virtual file provided by the kernel. It's not a normal text file - the kernel interprets every write as a command to toggle the status of a device. That's why we write the device identifier to the file this way.
Now try to suspend your computer (via icon in menu or sudo systemctl suspend
). If your computer stays asleep and wakes up only when you press a button, then it means that this is the root cause for you too!
Unfortunately, this will reset after reboot, so we need to introduce a permanent fix.
A systemd
service as a permanent fix
To automatically apply this fix on every boot, create a simple systemd
service.
Create a file at /etc/systemd/system/wakeup-disable-GPP0.service
(or any other name you prefer!):
[Unit]
Description=Disable GPP0 as ACPI wakeup source
After=multi-user.target
[Service]
Type=oneshot
ExecStart=/bin/bash -c "echo GPP0 > /proc/acpi/wakeup"
[Install]
WantedBy=multi-user.target
The oneshot
type is useful for cases like this - scripts that do one job and then exit.
Now, enable the service with:
sudo systemctl enable wakeup-disable-GPP0.service
And reboot your system.
This ensures GPP0
is always disabled as a wakeup source, making suspend reliable.
Additional notes
If you have other problems with ACPI, you may consider adding following to the kernel parameters:
acpi_osi="!Windows 2015"
In my case though, it didn't fix the issue by itself.
Read more about ACPI_OSI_string here and about acpi_osi variable here.