Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

With the update from 11.04 to 12.04, my USB keyboard activity will wake Ubuntu from 'suspend'. I'd like to disable this. (My battery went dead due to some unexpected keyboard activity.) This didn't happen in 11.04.

These links talk about USB power ctrl:
azitech.wordpress.com/2008/11/27/usbcore-autosuspend/
ubuntuforums.org/showthread.php?t=1968487
askubuntu.com/questions/165050/usb-wake-not-working-correctly
www.ehow.com/how_7536984_configure-power-usb-ubuntu.html
www.linuxforums.org/forum/miscellaneous/98253-turn-off-power-usb-port.html
www.linuxquestions.org/questions/linux-software-2/howdoi-turn-on-off-usb-light-by-time-514863/
www.linuxquestions.org/questions/debian-26/power-off-usb-509328/
ubuntuforums.org/showthread.php?t=853179
ubuntuforums.org/showthread.php?t=1446965

The USB PwrMan doc: http://www.mjmwired.net/kernel/Documentation/usb/power-management.txt

Unfortunately, none offer a solution for me.

All my /sys/bus/usb/devices/usbx/wakeup are set to disable. When you get the actual device, those are set to enabled, and are not editable.

cat /proc/acpi/wakeup

EHC1 S3 *enabled
EHC2 S3 *enabled

Is there another way to disable USB wakeup?

share|improve this question
add comment

2 Answers

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|improve this answer
add comment

I've seen options for this in my BIOS. Maybe try setting it there instead of in the OS?

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.