Thursday, January 26, 2012

Disabling the default usb autosuspend in userspace on Debian Linux for keyboard and mouse

I've got a Microsoft USB 3000 mouse and a portable mini Holtek Semiconductor keyboard for my laptop. When the laptop is on battery power the default timeout for these devices is just 2 seconds, which is really mode. I mean really dumb. I mean just annoying. There's a few informational articles online that led me to this fix most notably : http://forums.whirlpool.net.au/archive/350749 

The only real problem was that the devices in /sys/bus/usb/devices don't match up to the device ID's in lsusb. But not to be deterred, by plugging and unplugging the devices in question, and comparing the output of  ls -latr /sys/bus/usb/devices  I was able to determine their correct device path in the filesystem.

So from there the fix was easy. Just find the path of the Microsoft USB 3000 mouse in the linux usb device directory, in this case, ./1-1.3 and
# cd /sys/bus/usb/devices/1-1.3/power; cat 60 > autosuspend; cat 60000 > autosuspend_delay_ms



Now my mouse doesn't suspend for a minute. Much more usable. I just wish this logspot had markdown or code tags.

1 comment: