Skip to content

Instantly share code, notes, and snippets.

@Xplouder
Created Dec 21, 2018
Embed
What would you like to do?
FIX: Linux suspend interrupt with ACPI wakeup

For Ubuntu 15+, you must use systemd instead of rc.local. You may google "Creating a systemd service" and follow the instructions, but note that redirecting output to /proc/acpi/wakeup is tricky. To get it to work correctly, you must do something like:

/bin/sh -c '/bin/echo XHC > /proc/acpi/wakeup'

Example output for the service file (e.g., /etc/systemd/system/suspendfix.service):

[Unit]
Description=fix to prevent system from waking immediately after suspend

[Service]
ExecStart=/bin/sh -c '/bin/echo XHC > /proc/acpi/wakeup'
Type=oneshot
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment