We have already covered a topic how to enhance your battery life using TLP on Linux a couple of months ago. In the same series, today we will show you how to achieve the same goal using Laptop Mode Tools.
Laptop Mode Tools is a package that can be used to extend your laptop battery life in many ways. It enhances the battery life by enabling the Laptop mode feature of Linux Kernel, which lets down the hard drive spin of your Laptop. It is originally written by Jens Axboe, appeared in Linux 2.4.23. A port by Bart Samwel has been included in kernels starting from 2.6.6. Laptop Mode Tools uses hdparm tool which will let the hard drive spin down for saving power consumption, and other built-in set of useful tools to apply power saving settings to various hardware devices such as Network interface cards, Bluetooth devices, audio/video devices, and USB ports etc.
Laptop Mode Tools was initially command line tool until version 1.64. But, from version 1.64 onwards, It comes with a simple GUI mode that will help the novice users to configure it without having to manually modify the configuration files. It will run on many Linux distributions including Debian, Ubuntu, Fedora, Gentoo, Slackware, Mandriva, and ArchLinux etc.
Installation
It is very important that you should remove the TLP package if it already installed before installing Laptop Mode Tools on your Laptop.
To install it on any Linux distributions, head over to the download page and download the latest tarball version. At the time of writing this article, the latest version is 1.65.
After downloading it, extract it as shown below.
tar xzf laptop-mode-tools_1.65.tar.gz
Become root user and install it:
cd laptop-mode-tools_1.65/ ./install.sh
If you are running Slackware, add this line:
/etc/rc.d/init.d/laptop-mode restart
to your rc.local file.
Apart from tarball version, there are distribution related packages are available. Depending upon your distribution, you can install the relevant packages.
For example, the latest version is available in the Ubuntu 14.04/14.10/15.04/15.10 default repositories, so you can install it using the following command:
sudo apt-get install laptop-mode-tools
If you’re using previous versions of Ubuntu, you can install it by adding the Webupd8 PPA as shown below.
sudo add-apt-repository ppa:webupd8team/unstable sudo apt-get update sudo apt-get install laptop-mode-tools
Configuration
The beauty of this application is it will work out of the box, so you don’t have to modify any configuration changes. This tool will be started automatically after installing it. If it not started for some reason, you can manually start it by editing the main configuration file as shown below.
Open the main configuration file in any editor,
Find the following line:
ENABLE_LAPTOP_MODE_TOOLS=1
If it’s value is set to 0(zero), change it to 1(one) to enable Laptop Mode. Hence, Laptop Mode Tools is enabled by default in my case, so I didn’t do change anything.
Launch Laptop Mode Tools GUI interface
To launch the Laptop Mode Tools GUI window, run the following command from your Terminal:
sudo lmt-config-gui
The following screen will open.
From here, you can adjust the settings to reduce power consumption. As I said before, the default settings will work just fine. Don’t change anything unless you know what you’re doing.
Do you wonder, does it really work? For me, It worked well, and I got positive results. Here is how. I checked the power consumption before installing Laptop Mode Tools by running the following command:
powerstat
If it not installed, install it as shown below.
On Debian based systems:
sudo apt-get install powerstat
On RHEL based systems:
yum install powerstat
Sample output:
After installing Laptop Mode Tools, I got the following result:
As you see above results, the value of Watts is reduced up to 2-3. This is really good result, and my laptop power consumption is slightly improved.
Laptop Mode Tools and TLP are exactly do the same task, and the results are almost same. I suggest you to test both tools yourself and choose the suitable one for your needs. Be mindful that don’t test both tools at the same time on the same system.
Good Luck! Cheers!!