Skip to content

Instantly share code, notes, and snippets.

@Xplouder
Created December 21, 2018 03:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Xplouder/efcf2d15cab2595696364c2537d0df81 to your computer and use it in GitHub Desktop.
Save Xplouder/efcf2d15cab2595696364c2537d0df81 to your computer and use it in GitHub Desktop.
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