Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

I don't know how , but somehow automatic power-off of usb devices got accidently enabled. Now my usb mouse goes off even if it's idle for 2-3 seconds. it's really irritating.


P.S. This happened after i installed powertop and powernap. May be it has something to do with these two.

share|improve this question… – Qasim Jun 14 '13 at 14:53

3 Answers 3

up vote 6 down vote accepted

It's PowerNap that's doing this.

You can disable just this part of PowerNap's power savings scripts with:

sudo powernap-action --disable usb_autosuspend
share|improve this answer

Just copy paste the following command in terminal and it will disable auto suspending.

Disabling auto suspending USB

    for i in /sys/bus/usb/devices/*/power/autosuspend;
    do echo 2 > $i;

Disable USB autosuspend

for foo in /sys/bus/usb/devices/*/power/level;
do echo on > $foo;
share|improve this answer
Disable USB autosuspend is exactly what I was looking for. Here I don't have powernap installed. – Fernando Kosh Jan 24 '14 at 1:08
Is that reboot-persistent ? – Kwaio Apr 25 '14 at 12:23
How to make it reboot-persistent:… – Bryce Sep 18 '14 at 23:54
I would recommend the use of tlp. @rosencreuz – Qasim Mar 10 at 11:10
@rosencreuz… – Qasim Mar 10 at 11:11

Could it be that laptop mode tools are causing this? If so, try the following:

  1. optional: Create a backup of /etc/laptop-mode/conf.d/usb-autosuspend.conf by copying it in your home folder:

    cp /etc/laptop-mode/conf.d/usb-autosuspend.conf ~/usb.autosuspend.old
  2. Get the USB ID of your mouse/keyboard


    This will return a list including ID xxxx:xxxx for your mouse/keyboard.

  3. Edit the original usb-autosuspend.conf

    sudo gedit /etc/laptop-mode/conf.d/usb-autosuspend.conf
  4. There will be an entry called AUTOSUSPEND_USBID_BLACKLIST='' change this to AUTOSUSPEND_USBID_BLACKLIST='xxxx:xxxx'

  5. This should stop your USB mouse/keyboard from being suspended. Now you either need to restart your computer or restart laptop-mode using

    sudo service laptop-mode restart


share|improve this answer
You find your ID with the command lsusb|grep -i mouse|sed 's/^.* ID //g'|sed 's/ .*$//g' (assuming there is the word "mouse" in the string for your mouse) If you don't find out the ID of your mouse, use watch -d lsusb while you plug in your mouse. – rubo77 Oct 10 '14 at 22:26
At least in Ubuntu 15.04, this file has been moved to runtime-pm.conf and the line to add the id to is now called AUTOSUSPEND_RUNTIME_DEVID_BLACKLIST="". Strangely, I couldn't get my blacklist to work so I just disabled this module by setting CONTROL_RUNTIME_AUTOSUSPEND=0. It worked! – partofthething Aug 9 at 18:36

protected by Community Oct 11 '14 at 2:53

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

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