Skip to content

Instantly share code, notes, and snippets.

@albertomm
Last active September 25, 2018 07:02
Show Gist options
  • Save albertomm/e7945f887f0841df535ae2cf911a5fc4 to your computer and use it in GitHub Desktop.
Save albertomm/e7945f887f0841df535ae2cf911a5fc4 to your computer and use it in GitHub Desktop.
Disable linux suspend wake up by anything but the power button
#!/bin/bash
if [ "$EUID" -ne "0" ]
then
echo "This script must be run as root."
exit 1
fi
echo EHC1 > /proc/acpi/wakeup
echo EHC2 > /proc/acpi/wakeup
echo XHC > /proc/acpi/wakeup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment