How to configure laptop-mode-tools

Latop-mode-tools is a very powerful tool to save energy and extend battery life. However, coming with an "aggressive" setting by default it may not suit everyone's needs.


En Arch and derivatives:

sudo pacman -S laptop-mode-tools

En Debian / Ubuntu and derivatives:

sudo apt-get install laptop-mode-tools

In openSUSE and derivatives:

zypper install laptop-mode-tools


Here I am going to show you some possible configuration changes, although there are many more.

How to prevent the mouse from going to sleep

By default, laptop-mode-tools is configured in such a way that all USB devices go into sleep mode when the laptop is disconnected from the power.

This means that when you stop using the mouse for a few seconds and want to use it again, it will probably take a while to respond. You may not even be able to "rekindle" it.

To avoid this behavior, simply edit a configuration file. First of all, we need to know the mouse ID. To do this, disconnect it and reconnect it. Then, I opened a terminal and wrote:


At the end of everything, a line similar to the following should appear:

[13634.540582] hid-generic 0003: 046D: C052.0005: input, hidraw0: USB HID v1.10 Mouse [Logitech USB Laser Mouse] on usb-0000: 00: 1a.0-1.2 / input0

In this case, the mouse IDE is: 046D: C052

Now, just edit the laptop-mode-tools configuration file that controls the auto-suspend of USB devices:

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

Find the line that says AUTOSUSPEND_USBID_BLACKLIST and add the mouse ID. Following our example, it should look like this:


How to prevent the disc from "turning off" and "on" all the time

If your disk makes a noise very similar to a "click" every time you perform an action again after a few seconds of inactivity, then laptop-mode-tools is using hdparm to put it to sleep, thus making a significant power saving .

However, this behavior can be very annoying and some may consider it "too aggressive." Someone might even argue that, over time, the hard drive could be ruined. Honestly, I don't know if this is true but I was bothered by the little noise and the fact that there was a certain delay until the album started up again and everything worked as it should.

To reduce the aggressiveness of hdparm, just edit the corresponding configuration file:

sudo nano /etc/laptop-mode/laptop-mode.conf

Look for the line that says: BATT_HD_POWERMGMT = 1

And replace the assigned value with another between 1 and 254, with 1 being the most aggressive mode and 254 the least aggressive. I assigned it 128 and it is going very well.

The content of the article adheres to our principles of editorial ethics. To report an error click here!.

13 comments, leave yours

Leave a Comment

Your email address will not be published. Required fields are marked with *



  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   mansanken said

    a shit the application, sorry for the sencibles, I'm about to format the machine because I never directly start my machine after installing this application, I hope they do not make the same mistake

  2.   HacKan & CuBa co. said

    Enter recovery mode and uninstall: S
    Like I never saw that a machine does not start due to this app

  3.   Let's use Linux said

    What happened? What mistake did you throw?
    I am using it without problems (in Manjaro, Crunchbang and Arch)

  4.   Esomismo said

    What is commonly known as Layer 8 Error

  5.   Possessed said

    You are very big juas, juas, juas… But maybe I don't know what the OSI model is, otherwise the joke isn't as good.

    1.    mmm said

      ja I just started ccna and this that I could not understand now makes me smile ... .. knowledge draws the smile ...

  6.   dextre said

    Thank you friend for your help it worked for me and if I deactivate the lapop-mode-tools where I can see that option, I have used many distros based on .deb and .rpm but in this kind of distros I am never using majaro now and I feel a little lost How do I install .deb or is there a tool to transform from .deb to tar.gz or something like that, for example I want to install grooveoff which is to download music do you know something similar for that in manjaro, thanks for your help and greetings from Lima Peru

  7.   daniel said

    Thanks for this excellent post.

  8.   juan antonio said

    Hello friends

    I am struggling with energy saving, I can get to the command line, I enter the mouse id, but the problem is how I have to close recording the data.

    Thanks for your help

    1.    kodenix said

      Hi Juan Antonio, what text editor are you using?
      if you use «vi» it would be: w to save changes with the nano (ctrl O) or (Ctrl X and press Y)

  9.   Falc said

    Thank you very much for the help! everything works perfectly (ubuntu 14.04). 🙂

  10.   Kaiser said

    Regarding the disk damage caused by LMT I am afraid to say it is true, I learned it in a painful way, my fellow Linux users. I installed it and did not configure it to be non-aggressive, on my Dell laptop with a samsung 320gb disk, when it was disconnected from the power, it did sound like the disk would turn off and turn on abruptly. By mistake I did not give it importance and after two weeks errors began to appear due to missing files and those files disappeared because there were bad sectors on the disk. I tried to repair it with several tools but it was not successful, the damage was physical and irreparable, so I had to isolate the defective piece (20 Gb).

    Then I understood that these abrupt blackouts of the disk what they do is that it stops recording or reading the head abruptly, then there are sectors that are not magnetized or badly magnetized, which spoils them.

  11.   Enrique Aguilar placeholder image said

    He had not known what was wrong with the "mouse" for more than a year, he was about to throw it out the window. The procedure is clear and simple, the better it is ruined. Now I have to investigate the benefits of dmesg and all the options of laptop-mode-tools.

    Thank you very much for the guidance and greetings from Santa Ana, El Salvador.