|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:
AUTOSUSPEND_USBID_BLACKLIST = "046D: C052"
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.