Stop the annoying USB power autosuspend under GNU/Linux

Got a problem that the usb mouse will been poweroff/suspend periodically on Linuxmint 17 when the notebook is not in ac mode, here is a quick fix without rebooting system:

echo "-1" | sudo tee /sys/bus/usb/devices/*/power/autosuspend_delay_ms
echo "on" | sudo tee /sys/bus/usb/devices/*/power/control

For permanent change, for example on Debian / Ubuntu based GNU/Linux, with usbcore module:

echo "options usbcore autosuspend=-1" | sudo tee /etc/modprobe.d/disable-usb-autosuspend.conf 
options usbcore autosuspend=-1

Reference:

Linux kernel Power Management for USB documentation:
https://www.kernel.org/doc/Documentation/usb/power-management.txt

How to disable auto power off of usb devices like usb mouse?
http://askubuntu.com/a/301416

發表迴響