禁用USB键盘唤醒

随着11.04到12.04的更新,我的USB键盘活动将唤醒Ubuntu“暂停”。 我想禁用它。 (由于一些意外的键盘活动,我的电池坏了。)这在11.04没有发生。

这些链接谈论USB电源控制:

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

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

不幸的是,没有人能为我提供解决方案。

我的所有/sys/bus/usb/devices/usbx/wakeup都设置为禁用 。 当您获得实际设备时,它们将设置为启用 ,并且不可编辑。

 $ cat /proc/acpi/wakeup EHC1 S3 *enabled EHC2 S3 *enabled 

还有其他方法可以禁用USB唤醒吗?

您可以通过将设备名称写入该文件来切换/proc/acpi/wakeup中每个设备的启用/禁用状态。 对于我的系统(Debian,而不是Ubuntu),我在/etc/rc.local有以下内容来执行此操作:

 # 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 

我在BIOS中看过这个选项。 也许尝试将其设置在那里而不是在操作系统中?