USB mouse on Ubuntu stops working

8,386

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/

Share:
8,386

Related videos on Youtube

syntagma
Author by

syntagma

Updated on September 18, 2022

Comments

  • syntagma
    syntagma almost 2 years

    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.

    • david6
      david6 about 9 years
      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.
  • wie5Ooma
    wie5Ooma about 8 years
    Please take a look at the address I mentioned above. The package has its own repository that you have to add manually.
  • evergreen
    evergreen about 8 years
    Try to reload mouse driver with : 1- sudo rmmod usbhid | 2- sudo modprobe usbhid