Ubuntu – USB Mouse sleeping after 5 seconds when on battery

mousepower-managementsleepusb

My usb mouse sleeps after 5 seconds of inactivity when running on battery power.
It wakes uo again when i press any button on the mouse. This is really annoying.

I have made lsusb, and I noticed my mouse is

Bus 001 Device 012: ID 04d9:2083 Holtek Semiconductor, Inc.

I have checked my /sys/bus/usb/devices/usb1/power/autosuspend but it is already set to 0, and the directory usb1 has many subdirectories which also have autosuspend files, and i dont know how to edit them.

Also, I would like a permanent solution, which would work for any mouse, on any of my 3 usb ports. Any ideas?

Using: Ubuntu 12.04 64bit

Best Answer

To solve this problem on 12.04 and continue using laptop-mode-tools edit the file:

/etc/laptop-mode/conf.d/usb-autosuspend.conf

$ sudo gedit /etc/laptop-mode/conf.d/usb-autosuspend.conf

And look for the line:

AUTOSUSPEND_USBTYPE_BLACKLIST=""

Replace with:

AUTOSUSPEND_USBTYPE_BLACKLIST="usbhid usb-storage"

This will automatically disable USB autosuspend if you have ANY mouse and even USB drives plugged in.