3

Many times my mouse USB suddenly stops working, though the trackpad works just fine. I have to click it to make it work again. I have found the following solution:

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

However, I have to execute this script every time the problem occurs. What is the true reason behind it? How can I fix it permanently?

I am using Ubuntu 14.04 LTS.

mikewhatever
  • 32,638
syntagma
  • 569
  • *Let us assume this is on a Notebook (or tablet).* This may be specific to which USB port is used, with (at least) one providing continuous power (for device charging, or mouse/dongle use). This may also be a setting in BIOS setup. – david6 Apr 10 '15 at 21:20

1 Answers1

2

This happens because the power management switches off usb devices in order to save power after a certain period of inactivity. Although there are solutions to solve this manually I recommend to install software called tlp.

sudo apt-get install tlp

This software offers options to control power management in a safe way without having to set things manually in relevant files, like what you've found to be a solution. It works equally good at both laptops and desktops.

More info about tlp can be found at several sites like for example this one: http://linuxg.net/how-to-install-tlp-0-6-on-ubuntu-14-10-ubuntu-14-04-ubuntu-12-04-and-derivative-systems/

wie5Ooma
  • 1,789
  • I see unable to located package tlp when I try to install. Is it possible it has another name? I'm on 14.04. – Arthur May 20 '16 at 12:11
  • Please take a look at the address I mentioned above. The package has its own repository that you have to add manually. – wie5Ooma May 20 '16 at 13:21
  • 1
    Try to reload mouse driver with : 1- sudo rmmod usbhid | 2- sudo modprobe usbhid – evergreen May 24 '16 at 12:53