Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

This question already has an answer here:

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

share|improve this question

marked as duplicate by bain, Eric Carvalho, Jorge Castro, bodhi.zazen, Radu Rădeanu Jul 15 at 0:24

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

6 Answers 6

Type sudo pico /etc/laptop-mode/conf.d/usb-autosuspend.conf to edit the mentioned file.

Search the line

CONTROL_USB_AUTOSUSPEND="auto"

and remove "auto", so that it reads

CONTROL_USB_AUTOSUSPEND=""

Worked for me.

share|improve this 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.

share|improve this answer
    
Awesome tip!!! Thanks :) Also it is possible to add device by id like 0458:003a –  Ivan Ivanić Feb 19 at 13:10
    
hi i could not edit the file due to permissions..plzz help me..i am using ubuntu 12.04 –  Ekaveera Mar 2 at 3:12

I had the same problem, I think after I installed either laptop-mode-tools or powertop. Instead of uninstalling them again...

  • enter sudo powertop in a terminal
  • use the right arrow key to change to the tab Tunables
  • use the down arrow key to select the line with Autosuspend for your USB mouse
  • press Enter to toggle this line to Bad
  • quit powertop with the key q

EDIT: Too bad, this is just a temporary solution. It does not survive a reboot...

However, I found something else. If you have laptop-mode-tools installed, try to set CONTROL_USB_AUTOSUSPEND=0 in the file /etc/laptop-mode/conf.d/usb-autosuspend.conf

EDIT: setting BATT_SUSPEND_USB=0 should also solve the problem (at least it solved mine).

share|improve this answer

The following link offers another approach that looks like it should work. Just attempted it myself. Here's hoping.

In case the link goes away I'll give you the short and sweet version. First off, the fix assumes you're using laptop-mode-tools. Use lsusb to get the id of the device, and then add this to the AUTOSUSPEND_USBID_BLACKLIST parameter in /etc/laptop-mode/conf.d/usb-autosuspend.conf.

The id I'm using for my USB mouse has been highlighted in the below snippet from lsusb's output.

Bus 002 Device 003: ID 045e:0748 Microsoft Corp.

http://www.hecticgeek.com/2012/06/fix-usb-mouse-not-working-laptop-mode-tools-ubuntu/

share|improve this answer

Make sure you don't have the laptop-mode-tools or powertop packages installed. If you do, uninstall them by running

sudo apt-get remove --purge laptop-mode-tools powertools && apt-get autoremove

This solved the issue for me on Mint 13 on an Alienware M14x R2.

share|improve this answer
    
Thanks for pointing out powertop. I just realized I didn't have this problem before installing it. Your command isn't correct on Ubuntu, it should have been: sudo apt-get remove --purge powertop-1.13 && sudo apt-get autoremove –  tiktak Nov 12 '12 at 5:52

use lsusb to find bus number and device number
next in each folder present in /sys/bus/usb/devices/ which is named as number-number such as 1-1.2 etc check the files busnum and devnum to find the bus number and device number the files are for and find the folder required (say 1-1.2).
Next for the respective folder say 1-1.2, set the value in file located at /sys/bus/usb/devices/1-1.2/power/autosuspend as -1.
Now the device will not suspend.

share|improve this answer
    
I forgot to mention that this is temporary solution. –  Abhishek Bhatia May 31 '12 at 10:38
    
This could be non-temporary if added to one of the system init scripts. –  hexafraction Jul 24 '12 at 16:43

Not the answer you're looking for? Browse other questions tagged or ask your own question.