Improving Battery Life in Linux Part 1 - PowerTOP
Linux operating systems are generally not as energy efficient out of the box compared to Windows and Mac OS X. Many people notice this when trying out Linux on their laptops for the first time. They come from Windows usually, and notice around a 20% decrease in battery life. However, there are a few ways to mitigate this issue. One of them is to use a program called PowerTOP.
PowerTOP is "a Linux tool to diagnose issues with power consumption and power management." It also goes farther than a diagnosis and allows the user to easily change various settings to decrease power consumption. Note that PowerTOP is designed for and only works on Intel processors, so if you have an AMD machine you will have to look elsewhere.
Once you have PowerTOP installed (
sudo apt-get install powertop in Debian and Ubuntu), you just run the command
powertop in a terminal. Then PowerTOP will show you what settings your machine has that are causing it to use more power. For example, here are a few settings that caused my laptop to have worse battery life:
Bad Enable SATA link power management for /dev/sda
Bad NMI watchdog should be turned off
Bad VM writeback timeout
The awesome thing about PowerTOP is that it can set you configuration for the lowest energy usage. You just go to the "Tunable" screen (by using your right arrow key), and press enter on any settings that say "Bad". PowerTOP will change each setting for you. If your laptop is unplugged from it's AC adapter, you can go to the overview screen in PowerTOP and view the current discharge rate of your battery. The lower this is, the better battery life you will have.