Close Menu
    X (Twitter)
    Hectic GeekHectic Geek
    • Apps
      • Apps for Mac
      • Apps for PCs
      • Best Apps
    • Concepts
      • Comparison
      • For Geeks
      • IT Careers
    • Gadgets
      • Accessories
      • Best Work Laptops
      • Budget Laptops
    • GNU/Linux
      • Ubuntu
    • How To
      • Virtualization
      • Windows
      • Windows How-To
    Hectic GeekHectic Geek
    Home » Try this fix, if USB Mouse is not Working After Installing ‘Laptop-Mode-Tools’ in Ubuntu
    Ubuntu

    Try this fix, if USB Mouse is not Working After Installing ‘Laptop-Mode-Tools’ in Ubuntu

    GayanBy GayanJune 19, 2012Updated:December 24, 201734 Comments4 Mins Read
    Twitter Reddit Telegram WhatsApp Email
    Share
    Twitter Reddit Telegram WhatsApp Email

    It’s true that Ubuntu (or GNU/Linux in general) is getting better and better at managing power usage under different hardware platforms. For instance, when comparing with older versions, 12.04 Precise Pangolin manages power consumption really well in my Dell Vostro V131 laptop (Intel Sandy Bridge based notebook), and I get a battery life similar to under Windows 7 that came pre-installed with it.

    However, after installing Ubuntu, I usually install another tool called ‘Laptop-Mode-Tools‘, a set of utilities (configuration files) that try to minimize the unnecessary power consumptions of your computer’s hardware. And ‘LMT’ further reduces like 0.8 Watts to 1.3Watts of power consumption from my system, which again helps to enhance the battery life, a bit more.

    But one issue that I have when installing LMT under Ubuntu 12.04 is that, it disables my USB optical mouse. This is because, LMT adjusts various hardware related power consumption settings, including USB devices which uses a feature called ‘usb-autosuspend’. And as you could guess from its name, it’s designed to put USB devices into a ‘sleep’ status when not used for a certain period, for reducing power usage.

    But for some reason, after going into lower power mode, my USB optical mouse refuses to ‘wake-up’.

    So the easiest solution is to disable the ‘usb-autosuspend’ feature, but, that will disable the power down features of all the USB devices in general. So it’s not the ideal solution.

    However, if you’re too having the same issue, then you can easily fix it by ‘backlisting’ only the USB device ID of your mouse using that configuration file, so all other USB devices will still powered down, except for the USB mouse. Please follow the below steps for achieving that.

    Step 1: First, open your Terminal window and enter the below command to backup the original configuration file (just in case).

    cp /etc/laptop-mode/conf.d/usb-autosuspend.conf /home/gayan

    Replace ‘gayan’ with your user name.

    Step 2: Now, before we can edit the configuration file, we have to know the device ID of your USB mouse. For that, enter the below command in your Terminal and look for something that says ‘optical mouse’ or ‘mouse’ etc.

    lsusb

    Step 3: Then copy the device ID using your mouse, located between the ‘ID’ and device name (as shown above).

    Step 4: Then, enter the below command to edit the ‘usb-autosuspend’ configuration file (you’ll need ‘sudo’ privileges).

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

    Step 5: Now press ‘Ctrl’ + ‘f’ keys to launch the searching box or, manually locate the the below code in the configuration file.

    AUTOSUSPEND_USBID_BLACKLIST

    Step 6: Then as shown below, between the ‘ ‘ marks, paste the copied device ID of your USB mouse, and click on the ‘Save’ button then close its window.

    That’s it. Now reboot your PC, and the automatic mouse disabling issue should be gone :).

    Update: Actually you don’t have to restart the PC, just restarting the ‘laptop-mode-tools’ main service should do the trick. For that, use the below command in your Terminal window (a thanks goes to ‘eero’ — comments below, for the tip!).

    sudo service laptop-mode restart

    Special note : When idle, if you find the HDD to be spinning down a bit aggressively after installing LMT (default value is ’20’ seconds), then enter the below command to adjust the HDD spinning down time.

    gksudo gedit /etc/laptop-mode/laptop-mode.conf

    Step 2: Then search for the two text codes shown below using the text editor.

    LM_AC_HD_IDLE_TIMEOUT_SECONDS

    LM_BATT_HD_IDLE_TIMEOUT_SECONDS

    Once you find them, replace the value ’20’ of both these options (one is for using ‘AC’ and the other for while using the battery) with the number of seconds that you want your HDD to wait before spinning down (anything between 60 to 80 seconds might be pretty decent). Then click on the ‘Save’ and the ‘Close’ buttons to finish things up.

    That’s should fix that too. Good luck.

    Share. Twitter Reddit Telegram WhatsApp Email
    Gayan

    An RHCE, 'Linux' user with 14+ years of experience. Extreme lover of Linux and FOSS. He is passionate to test every Linux distribution & compare with the previous release to write in-depth articles to help the FOSS community.

    Related Posts

    Debian vs Ubuntu Server: A Brief Comparison for Beginners

    July 2, 2023

    CPU Based Simple System Stability and Benchmark Tester for Ubuntu Linux – systester

    June 16, 2023

    Typespeed: Typing Speed Testing Game for Ubuntu Linux

    March 12, 2023

    Debian vs Ubuntu in 2023- Which Linux OS is Right for You?

    January 6, 2023

    How to Remove PulseAudio & use ALSA in Ubuntu Linux?

    October 2, 2022

    How to Show Hidden Files in Ubuntu 22.04 LTS (and hide them)

    May 25, 2022

    34 Comments

    1. Wirasto Karim on June 23, 2012 5:44 am

      Thank's for this article 🙂

      Reply
      • Gayan on June 25, 2012 7:41 pm

        You are welcome 'Karim'.

        Reply
    2. Ethan on July 8, 2012 3:05 am

      Thanks a lot! Very straightforward and precise. Keep it up!

      Reply
      • Gayan on July 8, 2012 12:56 pm

        I'll try my best, thanks 'Ethan'! :).

        Reply
    3. Zizaco on November 7, 2012 6:45 am

      Thanks man! Solved my problem. 🙂

      Reply
      • Gayan on November 7, 2012 7:58 am

        No problem mate :).

        Reply
    4. MikeP on November 13, 2012 10:16 pm

      Great to see a step by step writeup for this common problem. If i remember I’ll add a link to this on my Linux Mint forum signature. As it’s a common problem that doesn’t always get a straight answer.

      One question:
      Do the device ID’s remain static when unplugged and pluged back in, or is it dependant on the usb port?

      Reply
      • Gayan on November 14, 2012 8:08 am

        Hi ‘MikeP’,

        First of all you are welcome :).

        As for your question, the ‘device ID’ is a set of numbers that are unique to every device and they are static. And the USB port has nothing to do with it. Hope this clarifies it for you.

        Reply
    5. August on November 23, 2012 8:03 pm

      i am not using laptop mode tools, powertop or powernap, but my internet connection using a Huawei USB modem keeps getting disconnected. How do i disable USB autosuspend so my broadband wont get disconnected repeatedly?

      I’d appreciate your help on this, I’m new to Ubuntu (using Xubuntu 12.04)

      Reply
      • Gayan on November 24, 2012 9:58 am

        Hi August,

        I cannot guarantee results, but I can try.

        Luckily, I too have a Huawei USB modem, I don’t use it anymore, but used to use it and worked with Ubuntu flawlessely. If it also supports reading a memory card, and you have one insert into it also, then that might be the main reason why Ubuntu is suspending it (I’ll save the details :D).

        Anyhow, plugin your USB modem and enter the below command to get a list of current USB devices of your computer.

        lsusb

        Note: For this to work, you will have to keep that USB modem plugged into that particular USB port all the time. If you change it, then this will not work.

        Now, send me the output that command gives you, and I’ll try to come up with a solution (again, I cannot gurantee results though).

        Reply
    6. Emil on November 30, 2012 1:03 am

      Great tip! Helped me! Pls publish this on Ubuntu official forums!

      Reply
      • Gayan on November 30, 2012 8:13 am

        Thanks ‘Emil’.

        Reply
    7. eero on June 5, 2013 11:13 am

      /etc/init.d/laptop-mode restart is enoght, no need to reboot computer.

      Reply
      • Gayan on June 7, 2013 5:01 am

        Thanks mate, I updated the post.

        Reply
    8. Hugues Ross on June 8, 2013 1:00 pm

      Thank you! This worked perfectly!

      Reply
      • Gayan on June 9, 2013 8:47 am

        You’re welcome!.

        Reply
    9. Samusz on June 11, 2013 10:32 pm

      Thanks for the strait tip and fix !
      I sill wonder when this laptop-mode-tool package got installed. As a dependency I guess… or is it default in lubuntu 13.04 ?

      Reply
      • Gayan on June 12, 2013 4:25 am

        You’re welcome. Coming back to the question, no, ‘laptop-mode-tools’ does not come installed by default, but as you guessed, it must had been installed as a dependency :).

        Reply
    10. Carmela on July 11, 2013 12:13 pm

      Thank you! It’s very useful and very well explained 😉

      Reply
      • Gayan on July 11, 2013 11:50 pm

        You’re welcome :).

        Reply
    11. dan on October 24, 2013 7:36 pm

      Worked for me on a : Logitech, Inc. M90/M100 Optical Mouse

      Thank You for your clear instructions.

      Reply
      • Gayan on October 24, 2013 8:13 pm

        You’re welcome dan.

        Reply
    12. Hugh on November 2, 2013 7:09 pm

      Amazing and simple! Thank you so much!
      It worked!!! 😀

      (Elementary OS Luna with ‘Laptop-Mode-Tools’)

      Reply
      • Gayan on November 3, 2013 6:36 am

        You’re welcome Hugh :).

        Reply
    13. Juan on November 17, 2013 4:42 pm

      Excellent, both tips worked perfectly on my Asus EEEpc 1015pn

      Reply
      • Gayan on November 18, 2013 8:35 am

        You’re welcome Juan.

        Reply
    14. streamriachuelo on March 1, 2014 12:10 am

      Muchas Gracias!
      Thank you very much.
      I have exactly the same mouse.
      If this problem happend with all optical mouses then we need to tell that LMT package add this bug fix from newest versions 😀
      tks a lot!
      german:)

      Reply
      • Gayan on March 1, 2014 8:23 am

        You’re welcome 🙂 .

        Reply
    15. ID. ARAVINTHAN on April 13, 2015 2:56 pm

      My laptop have Ubuntu 14.04 LTS. If USB optical mouse connect before ON / restart the system its work fine. But, after “ON” if connect the USB optical mouse, then it is not work. Also in windows OS working fine.

      Reply
      • Gayan on April 14, 2015 7:00 am

        Have you tried my fix?

        Reply
    16. Carlos on August 7, 2016 1:05 pm

      Gayan,

      on my Ubuntu 16.04 you tweak works —

      but after a restart it does not .. I have to disconnect the mouse and start/stop the service, reconnect the mouse ..
      Why isn’t it working after a reboot?
      Any help would be appreciated.

      Reply
      • Gayan on August 26, 2016 9:12 am

        Hi Carlos,

        First of all, I’m so sorry that it took me this long to reply to your comment (it was basically in my SPAM folder, it happens once every while). Anyhow, the answer to your question simple. With recent versions, laptop-mode-tools utility has moved the configuration file for blacklisting USB files to a different configuration file. It’s full path is: /etc/laptop-mode/conf.d/runtime-pm.conf

        There you should see an entry for USB Blacklisting (you can search for something like USB to find it easily). There you should add it (make sure to uncomment it first). Again, I apologize for the delay in response.

        Reply
    17. ghost on August 23, 2016 5:54 pm

      i can ‘t find usb-autosuspend.conf file after install laptop-mode-tools
      please help ;(

      Reply
      • Gayan on August 26, 2016 9:08 am

        Hi,

        It’s been moved to /etc/laptop-mode/conf.d/runtime-pm.conf file. Once opened that file, there is a section for adding the USB Blacklist function (first make sure to uncomment it).

        Reply

    Leave A Reply Cancel Reply

    This site uses Akismet to reduce spam. Learn how your comment data is processed.

    Latest Posts

    [Fixed] HDMI No Signal to TV or Monitor on Windows 10/11

    November 7, 2023

    AlmaLinux vs Ubuntu – How to Select the Best One?

    October 22, 2023

    Why Does My Gaming Laptop’s Battery Drain So Fast? The Science Behind It

    October 9, 2023

    Top 10 Best email Encrypting Software for Business and Personal Use

    October 7, 2023

    7 Essential Features A Learning Management System Should Include

    October 2, 2023

    The Importance of DNS for Mac Users: Why You Need to Know How It Works

    September 25, 2023

    Subscribe to Updates

    Get the latest news and updates from Hectic Geek. We won't overload you or sell your data!

    Contact
    • About Us
    • Contact Us
    • Privacy Policy
    • Write for Us
    X (Twitter)
    © 2023 Hectic Geek.

    Type above and press Enter to search. Press Esc to cancel.