13

The mouse's bottom LED goes off after 3 seconds after the connection and cursor movements and the wheel stops. Pressing any button, reconnecting or resetting the USB device resumes it for another 3 seconds (when resumed by pressing a button, this event does no go to X).

This happens when using any of the USB ports. This mouse works well with another computer with Linux. It was working well before.

Why can it happen? How can I fix it?

Update: It happens only if the laptop is on battery.

Answer: this is caused by the powersaving done by laptop-mode-tools. To temporary turn off powersaving, one can use

for i in /sys/bus/usb/devices/*/power/control; do echo on > $i; done
Vi.
  • 17,755

3 Answers3

12

I have the perfect solution!

If

for i in /sys/bus/usb/devices/*/power/control; do echo on > $i; done

works for you, but only once, edit /etc/laptop-mode/conf.d/usb-autosuspend.conf to replace:

CONTROL_USB_AUTOSUSPEND="auto"

by

CONTROL_USB_AUTOSUSPEND=0

It works for me.

Léo
  • 121
5

In Ubuntu 14.04 (Trusty Tahr), I edited /etc/laptop-mode/conf.d/usb-autosuspend.conf and change this lines to blacklist usbhid:

# The list of USB driver types that should not use autosuspend.  The driver
# type is given by "DRIVER=..." in a USB device's uevent file.
# Example: AUTOSUSPEND_USBID_BLACKLIST="usbhid usb-storage"
## Old value: AUTOSUSPEND_USBTYPE_BLACKLIST=""
AUTOSUSPEND_USBTYPE_BLACKLIST="usbhid"

In Ubuntu 12.04 (Precise Pangolin), I must to edit /etc/laptop-mode/conf.d/runtime-pm.conf and change this lines to blacklist usbhid:

# The list of device driver types that should use autosuspend.  The driver
# type is given by "DRIVER=..." in a device's uevent file.
# Example: AUTOSUSPEND_DEVTYPE_WHITELIST="usbhid usb-storage"
## Old value: AUTOSUSPEND_RUNTIME_DEVTYPE_WHITELIST=""
AUTOSUSPEND_RUNTIME_DEVTYPE_WHITELIST="usbhid"

You can also blacklist usb-storage!, and you can also blacklist a device by ID (AUTOSUSPEND_RUNTIME_DEVID_WHITELIST in Ubuntu 12.04 or AUTOSUSPEND_USBID_BLACKLIST in Ubuntu 14.04).

Then you'll need to restart laptop mode for the changes to take effect:

sudo /etc/init.d/laptop-mode restart

And then replug the mouse. The mouse will not suspend again.

This works for me at work (Ubuntu 12.04) and home (Ubuntu 14.04).

0

This is a normal behaviour of all mice after they are getting wireless, to save battery. You can adjust it if it has a third-party software coming within the box.

siesta
  • 17