Welcome !

It's been long since i thought of writing about tips, tricks, solutions and news that i come across while using Linux.

I hope this blog will be gradually active and provide valuable information.


Monday, June 4, 2012

Disable auto-suspend for all USB devices

Having a bluetooth mouse connected to my laptop (ACER 4820TG) was giving me this issue:

After some time of not using the mouse, the mouse cursor wouldn't move unless if i was clicking several times the mouse buttons to recover the connection.

Troubleshooting the issue, i found that this was caused by linux  autosuspending the usb ports of my laptop (i guess it was suspending the built-in usb bluetooth module). In case you are having any similar issue with any USB device, run this in a terminal:

sudo su
for i in /sys/bus/usb/devices/*/power/autosuspend; do echo -1 > $i; done

This will do the trick in linux mint (lmde) and i assume in other distributions too (if they use the same autosuspend path). To check the USB ports state issue this command in terminal too:

cat /sys/bus/usb/devices/*/power/autosuspend

Autosuspend of inactive USB devices will save some power from battery but in my case - it was causing a frustration problem. Problem now solved!


  1. it works, but when I reboot the computer y happens again and I need to do this every time. Do you know a way to make this change persistent?

    1. Try putting the second line (not the 'sudo su' line) in /etc/rc.local.

  2. Worked well in Linux Mint 15, thanks :D

  3. This tip worked very well for me on Linux Mint 15, thanks, saved me from looking like a noob as my iphone runs out of battery in the middle of a convo :D

  4. I successfully used a similar method to fix a webcam that did not work when resumed from suspend in Linux:
    for i in /sys/bus/usb/devices/*/power/level; do echo on > $i; done

  5. Thanks for the great post. Pretty good post. I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog posts.