Fixing Suspend Arch Linux
April 11, 2019, Sam Erickson
For the first few months of using Arch Linux, suspend did not work properly for me. The way I got around this was to get in the habit of saving everything, powering down, then rebooting whenever I moved from one location to the next. This was okay for a while, but powering off and back on for every class? This was far from ideal.
I looked into what may be causing this, and I found that lots of people are having similar issues, though I did not see any helpful suggestions on how to troubleshoot the problem, so I resorted to reading the arch wiki for the information I wanted and I was not disappointed. Through following their troubleshooting instructions:
Instantaneous wakeups from suspend
For some Intel Haswell systems with the LynxPoint and LynxPoint-LP chipset, instantaneous wakeups after suspend are reported. They are linked to erroneous BIOS ACPI implementations and how the xhci_hcd module interprets it during boot. As a work-around reported affected systems are added to a blacklist (named XHCI_SPURIOUS_WAKEUP) by the kernel case-by-case.
This was exactly what was happening on my machine.
I switched over to super user and followed the instructions.
Entering the command:
cat /proc/acpi/wakeuppresented the following output:
Device S-state Status Sysfs node P0P2 S3 *enabled pci:0000:00:01.0 PEG1 S3 *disabled EC S4 *disabled platform:PNP0C09:00 GMUX S3 *disabled pnp:00:03 HDEF S3 *disabled pci:0000:00:1b.0 RP03 S3 *enabled pci:0000:00:1c.2 ARPT S4 *disabled pci:0000:02:00.0 RP04 S3 *enabled pci:0000:00:1c.3 RP05 S3 *enabled pci:0000:00:1c.4 XHC1 S3 *enabled pci:0000:00:14.0 ADP1 S4 *disabled platform:ACPI0003:00 LID0 S4 *disabled platform:PNP0C0D:00
Trail and error which Device was waking my machine up from suspend? It ended up being
Disabling the trouble causing Device:
echo LID0 > /proc/acpi/wakeup. Though this fix is only temporary, and I would have needed to enter this command as super user each time I rebooted my machine.
A More Permanent Fix
As the wiki page suggested I created a
file to handle disabling the device on startup, which I found the
instructions on how to do that on yet another
The contents of my file are as follows:
[Unit] Description=Fixes suspend from waking after a few seconds. [Service] ExecStart=/bin/bash -c 'echo LID0 > /proc/acpi/wakeup' [Install] WantedBy=multi-user.target
Where the file location is
All that is left to do in enable the service:
sudo systemctl enable suspend-fix.service and reboot: