Disable USB keyboard wakeup

7,225

You can toggle the enabled/disabled state of each device in /proc/acpi/wakeup by writing the device name into that file. For my system (Debian, not Ubuntu) I have the following in my /etc/rc.local to do this:

# Disable USB wakeups caused by (un)plugging new devices. Otherwise the hub in
# my USB monitor causes my PC to wake up when I turn the monitor off.
for device in EHC1 EHC2 XHC
do
    if grep -q "$device.*enabled" /proc/acpi/wakeup
    then
        echo $device > /proc/acpi/wakeup
    fi
done
Share:
7,225

Related videos on Youtube

Dug
Author by

Dug

Updated on September 18, 2022

Comments