Skip to content

Instantly share code, notes, and snippets.

@s-zeid
Created March 8, 2020 09:52
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 s-zeid/58ddd04db90af83fbea13dea037a984f to your computer and use it in GitHub Desktop.
Save s-zeid/58ddd04db90af83fbea13dea037a984f to your computer and use it in GitHub Desktop.
Disable USB and lid wakeup triggers in /proc/acpi/wakeup. Adapted from <https://bbs.archlinux.org/viewtopic.php?pid=1575617#p1575617> by 9233.
[Unit]
Description=Disable USB and lid wakeup triggers in /proc/acpi/wakeup
[Service]
Type=oneshot
ExecStart=/bin/sh -c 'for i in EHC1 EHC2 XHC LID0; do echo $i > /proc/acpi/wakeup; done'
ExecStop=/bin/sh -c 'for i in EHC1 EHC2 XHC LID0; do echo $i > /proc/acpi/wakeup; done'
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