Michael and I both have laptops which run Linux. His laptop gets terrible battery life in Ubuntu (around 45 minutes) where as I have a newer extended battery which allows me to get around 4 hours running Linux Mint (based on Ubuntu). However, for both of us this is much worse than Windows. In Windows he gets upwards of 2 hours while I get around 6. We both wanted to know why we get worse battery life in Linux than in Windows. I mean afterall, isn’t Linux better? I couldn’t allow MS to triumph so I did a little research and this is what I found.
The reason our laptops get worse battery life in Linux than in Windows is because Linux uses more power. You maybe saying, “Well no duh, but why does it use more power?” The short answer is because we have more programs running when using Linux. The use of workspaces allows for having more programs open since we can spread them out. Even with multiple monitors, there just isn’t enough screen real estate in Windows, and therefore we have only the essential programs open.
There is a program for Linux called PowerTOP which helps you identify which programs are causing your computer to “wake up” from idle. The idea is that the less “wake ups,” the longer your computer stays in power save mode. PowerTOP will not only identify such programs, but will give the option to fix the problems. Sound good? The only catch is it only works for computers with Intel processors.
How do I install PowerTOP?
If you are running Ubuntu Gutsy 7.10 then you should be able to install it using the package manager and searching for ‘powertop’ or simply typing the following command into the terminal.
sudo apt-get install powertop
If you are running Ubuntu Feisty 7.04 or older you will need to visit a debian package site and download and install the .deb file from there. For you pre-Gutsy users, you can still install PowerTOP but wont be able to use it to the fullest. The reason is because tickless timers were not implemented until kernel version 2.6.21. Unless you have manually updated your Feisty kernel, you will have an older kernel. Basically, you should still install and use PowerTOP but you would save even more power if you used an updated kernel.
Lastly, if none of these work, or you are using a different distribution, you can always download the source from the PowerTOP website. Once you download the source, extract the archive, type ‘make’ and then ‘make install’. For more information on downloading and installing, visit the download page.
How do I start PowerTOP?
Once PowerTOP is successfully installed it should be run by typing the following code into the terminal:
sudo powertop
PowerTOP should be run as root so that it can collect the information needed for the detailed power statistics.
How do I use PowerTOP?
When you type the above command you should see something similar to the following:

On the top left side you will see C-states which are operating modes of the CPU when it is idle. The higher the C-state the less power your computer is using. To get better battery life, your CPU needs to stay in C3 or C4 for more the 75% of the time. As you can see in the above screenshot, my laptop is spending most of its time in C3 (and there is no C4).
The “Wakeups per second” line is a counter that is used to let you know how many times your computer “wakes up” from idle. The lower the number the more power you save. With lowest numbers around 10, I would say my laptop wasn’t doing so great.
When your laptop is running off the battery , PowerTOP uses ACPI to collect information on how much power you are currently using. Then it uses this information to calculate an estimated time remaining.
PowerTOP will display the top 10 processes that are causing the computer to “wake up” from idle. In the screenshot, the top few items are hardware interrupts from devices. For example, my usb controller, ipw3945 wireless card and nvidia graphics card were waking the CPU up very frequently.
At the very bottom of the screen, PowerTOP will display suggestions on how to impove your battery life. Simply press the indicated button to perform the action. These actions will range from increasing hard drive write back time to decreasing wireless card activity.
How else can I save battery power?
The most important thing you can do to save battery power is to only use what you need. If you are not on the internet turn off your wireless card or plug in an Ethernet cable instead. If you don’t need the screen brightness turned up all the way, don’t.
Lastly, close all programs that you aren’t using. Don’t forget about programs such as beryl, compiz, and emerald. These programs use more battery power than you think.
If you want more information on how to use PowerTOP, be sure to visit their Tips & Tricks page.
How much will my battery life increase?
The extra battery life you get will depend on what steps you take to increase it. For example, with only running PowerTOP and following its suggestions, you could see anywhere from 15 minutes to an hour extra battery life. Of course this will depend on the laptop and the number of “wake ups” from idle. For me, if I follow PowerTOP’s suggestions, turn down the screen brightness, close unnecessary programs, turn off wireless (and use Ethernet cable), and set my CPU to powersave mode (lowest speed), I can get another hour to hour and a half running Linux Mint.
How long does your battery last in Windows or Linux??? Let us know in the comments…
Did you enjoy reading this article? If so, suscribe to the RSS feed. ![]()
Written by Eric
Related Posts













June 13th, 2008 at 8:36 am
[...] Enable CPU Scaling in Ubuntu (Linux Friday) checkDigg(”http://wlmtips.com/2008/06/13/enable-cpu-scaling-in-ubuntu-linux-friday/”, “207″, “http://wlmtips.com”); Almost all new processors have the ability to scale down their frequencies. With laptops this allows you to save a ton of battery life. Read my previous post on how to save battery life in Linux. [...]