6

I'm using Ubuntu 11.04 64 bit laptop, and I have a Microsoft mouse. When I'm on the battery power the mouse cuts in and out, I have full battery power so it's not because of low power. It never does this in Windows, and in the past when I ran Karmic it never did this either, only when I reinstalled Ubuntu with Natty. As soon as I plug in the power it works perfectly fine.

3
  • do you see anything weird happening in dmesg?
    – user606723
    Aug 3, 2011 at 20:47
  • Doesn't look like anything weird is happening, but it's hard to tell, really overwhelming, a lot of info on dmesg.
    – KoRnKloWn
    Aug 5, 2011 at 7:11
  • This question appears to be abandoned and unanswered, could you perhaps add more detail to your question? If this question no longer applies then you can either delete it or answer it yourself if you've solved the problem. Thanks! Feb 11, 2012 at 22:58

6 Answers 6

3

This behaviour is caused by laptop-mode-tools. While it's true that removing it completely solves the "problem", you may still want to keep the package on your system.

In order to disable the usb autosuspend feature of laptop-mode-tools for your mouse, you can insert your mouse's USBID (obtainable through lsusb) in

/etc/laptop-mode/conf.d/usb-autosuspend.conf

on the line

AUTOSUSPEND_USBID_BLACKLIST="your-usb-id"

where your-usb-id is of the format 093a:2510 (this is my mouse). If AUTOSUSPEND_USBID_BLACKLIST is already there, simply add the necessary USBID (note this will work only if AUTOSUSPEND_USE_WHITELIST is set to 0).

Finally, reload laptop-mode-tools by executing

# service laptop-mode reload

or

$ sudo service laptop-mode reload
2
  • 1
    In case you want to keep laptop-mode-tools but you don't want it to mess with any of your USB devices, you can edit the configuration and set CONTROL_USB_AUTOSUSPEND=0 (the default is "auto").
    – nickie
    Jan 29, 2014 at 18:59
  • For me it was /etc/laptop-mode/conf.d/runtime-pm.conf and CONTROL_RUNTIME_AUTOSUSPEND on Ubuntu 20.04 Jul 28, 2022 at 14:07
1

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 powertop && apt-get autoremove

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

1
  • I think it's "powertop" instead of "powertools": sudo apt-get remove --purge laptop-mode-tools powertop && apt-get autoremove Aug 27, 2012 at 6:59
1

I should note that after 11.10 that problem no longer existed for me. So the answer to this problem is just update! :D

0

It seems like your computer is set to disable USB when iddle as a power saving measure.

This is usually suggested by powertop, but it's a very bad idea if you are using a USB mouse. This command fixes it temporally:

echo -1 | sudo tee /sys/bus/usb/devices/yourmouse/../power/autosuspend

You need to substitute yourmouse for your mouse bus and device number, you can usually find it with:

lsusb

Unluckily this will work only until whatever the program that have changed the setting kicks on again: either at boot time, when you disconnect your computer from electricity, or whatever. You need to discover what package is changing it to resolve the issue.

20
  • There doesn't seem to be anything in that directory with the name of the bus and device numbers
    – KoRnKloWn
    Aug 5, 2011 at 7:10
  • Can you post the output of both lsusb and ls /sys/bus/devices/ ?. Aug 5, 2011 at 7:52
  • I also changed the command as the autosuspend parameters were wrong and there was a permission problem. Aug 5, 2011 at 7:59
  • I managed to find the folder with the autosuspend file using the directory listing you posted above, but the value was already set to 2, and I ran the command directly from that folder anyways on the autosuspend file, but nothing changed because like I said, it was already set to two.
    – KoRnKloWn
    Aug 5, 2011 at 19:12
  • Also, it's constantly cutting in and out, and I just noticed in the power folder runtime_status changes to suspended when it cuts out, and switches back to active when it comes back on.
    – KoRnKloWn
    Aug 5, 2011 at 19:20
0

I had a similar problem and I solved it by disabling pm-powersave with

    # pm-powersave false

Then I rebooted my laptop and everything was just fine. I don't know, however, the other implications of this action.

0

Using Ubuntu Mate 15.10 I solved this with one terminal command ..

sudo tlp ac

it looks like tlp (power manager) blocks the usb mouse to save power

1
  • 1
    Why did you add an answer to this question? It's related to Ubuntu 11.04, 4 years old, and already has an answer. Jan 6, 2016 at 23:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .