Linux, power management and laptop battery life »

Sunday, 11 March 2007 | Linux | Dawid Lorenz

Ever since I’ve got new laptop last November, I was quite unhappy with its battery life. Initially it used to keep computer running for around 2.5 hours with usual workload (mail/www/docs), while Dell advertised up to 5 hours of work with that particular 6-cell battery model. After some time battery lost ~40% of its original capacity without any particular reason, and could hardly manage to get 1.5 hours of work away from AC adapter. Fortunately, Dell’s technical support arranged battery replacement. But new battery’s performance wasn’t much better (2-2.5 hours), so I’ve managed to get… another replacement. :) This time I’ve decided to investigate in details what is actually standing behind laptop’s battery life.

I’ve been investigating topic of power management and battery life for around 3-4 weeks, running also detailed battery tests with total of two laptops and three batteries. I found out a few interesting conclusions, so hopefully this article would be helpful for some of you.

Power management useful tools

Gnome Power Manager
This tool itself is not much interesting in terms of power managing, actually. However, it has pretty nice statistic features and displays detailed battery information, which could tell a lot about your battery, and maybe even explain problems causing its poor performance.

screenshot-power-information.png

One of the most important things here is Capacity. It tells how much your battery’s capacity is degraded. In my case, original capacity of battery is 56.6W(atts), while last full charge was 54.7W, which is ~96% of designed capacity. Basically, less capacity battery means worse performance. Another interesting bits, are Charge rates, which are telling how much power is your computer consuming at the moment. Less is better, obviously. History of power consumption is nicely presented in Power History tab.

screenshot-power-information-1.png

It’s quite clear now that getting to know better with GPM is very helpful in determining possible problems with power management on your machine.

Laptop Mode
Let me use an introduction from Laptop Mode homepage:

Laptop Mode Tools is a laptop power saving package for Linux systems. It allows you to extend the battery life of your laptop, in several ways. It is the primary way to enable the Laptop Mode feature of the Linux kernel, which lets your hard drive spin down. In addition, it allows you to tweak a number of other power-related settings using a simple configuration file.

Basically, Laptop Mode is designed to manage HDD power (and also do some other stuff), while system is running on battery power. Hard disks are usually computer’s one of the most power-hungry devices, so spinning it down while it’s not actually needed, would probably have pretty much impact on battery’s better performance. Laptop Mode installation is pretty straightforward, especially with RPM packages. Configuring LM is also simple, as its configuration file located in /etc/laptop_mode/laptop_mode.conf is full of instructions and tips, which makes whole configuration a lot easier. I’d also recommend to have a look into pretty extensive FAQ, which covers most common problems.

Before configuring LM you need to be ready for some experiments. Various hard drives have various features which may, or may not be totally compatible with LM’s features. Basically, it would probably take a few tries before a ‘perfect set’ is found. However, LM takes care not only about hard drives - it also allow to control CPU frequencies and governors, or laptop’s screen - to put it in other words: LM is quite useful set of tools, helping to get most of power management on your Linux system.

Things affecting battery life

Before you start complaining about disgraceful battery life in your laptop, think about things which could eat the most of battery power. By ‘things’ I mean computer’s built-in devices and features. Let’s see:

Screen backlight
Keep it dimmed as much as possible, and turn it down (i.e. close a lid) while you’re away. It really eats a lot of power.

Wireless devices
WiFi adapters, Bluetooth dongles, built-in mobile/cellular cards. Switch all of those off, if you don’t need it. You will feel the difference. Guaranteed.

CPU, hard drive
You cannot switch CPU or HDD totally off, but you can set CPU to lock frequency at minimum level while running on battery power. I was really surprised to see how high power consumption jumps up while CPU is running at full speed. HDD could also go to sleep while not needed. Did I mention Laptop Mode tools?

Dedicated video adapter
Having fancy nVidia or ATI dedicated video adapters, instead of cheap onboard ones, might be cool (especially with desktop-effects to show off), but bear in mind these are extra devices with GPUs, which also like to eat a lot of protons and electrons…

Externals
All external USB/Firewire/PC Card/etc. devices are also taking significant part in raising demand for power. If you like to keep external memory card reader or hard disk connected via USB 24/7, maybe it’s good time to stop liking that idea?

Internals
Enter BIOS and go through each screen, switching off all internal devices which you don’t need. These might be something like internal modem, IR port, serial/parallel ports, etc. You can be seriously surprised how all these things are adding up in total power consumption. I was, at least.

Software
Compiling kernel while computer’s running on battery, would not help save the most of it. Same with watching films, playing games, etc. Not touching computer at all would be probably the best idea. ;)

Battery testing results

As I mentioned at the beginning, I’ve been running several battery tests for a few weeks, using two different laptops. Tests were basically based on some certain conditions, while which I have been manually measuring and comparing time with percentage of battery level.

Machine: Dell Latitude D620
Battery: 6-cell ‘old’ (before 2nd replacement) - designed capacity: 56W; current capacity: ~88%

This battery was giving me really poor performance and actually made me start to investigate power management issues more closely. Under typical workload, with wireless on, backlight set to 3/8, it used to eat around 0.8-0.9% of battery capacity level per minute, which counts into merely 110-120 minutes (~2h) of total life. That’s damn far from up to 5 hours, isn’t it? However, I’ve been able to get down to ~0.7% / min and ~2h30m after switching wireless off, enabling Laptop Mode, and locking CPUs down to 1 GHz. However, still far from ideal, so I’ve decided to get battery replacement from Dell.

BTW, initially I thought desktop-effects are having much impact on battery, however my test showed I was wrong. Relation between battery life and desktop-effects was marginal.

Machine: Dell Latitude D620
Battery: 6-cell ‘new’ - designed capacity: 56W; current capacity: ~96%

The reason why new battery has already 4% degradation of capacity is probably because I’ve screwed up its very first charge, by unplugging AC adapter before it has been totally charged. Anyway, first test showed that new battery is far better than the old one. Even with wireless switched on and connected, LM enabled, backlight 3/8 I’m getting around ~0.6% / min, which is great improvement comparing with ‘old’ battery. However, to be honest, it’s still a little bit below expected at least 3 hours of work away from AC adapter.

Machine: Dell Inspiron 640m
Battery: 6-cell original - designed capacity: 56W; current capacity: ~94%

Battery in that computer has never been replaced. In fact, I’m using that computer for 99.9% of time connected to AC adapter, and I’ve never actually cared about its battery life. But time was high to check it, and I was pretty nice surprised. My usual set of applications at work is: Thunderbird, Firefox, Zend Studio (java powered), Gnome Commander, Rhytmbox, GAIM, desktop-effects enabled, sometimes also Windows XP running inside virtual machine - pretty extensive set, I must say. On top of that, backlight level is 7/8 (even on battery), I’m usually connected via wired network, while wireless device is switched on, but unconnected. Biggest surprise is battery manages to stay below 0.6-0.7% / min, which is pretty much over 2h30m, and really close to 3 hours of work without AC adapter.

Getting along better with your battery

When I was googling the net in order to find some information about power management and battery life, I’ve found pretty interesting article on Hewlett-Packard’s website. It covers topics such as calibrating battery, or how to store unused batteries. It’s really worth to have a look.

Also, Dell users may find interesting information how to check degradation level (health) of battery by pressing & holding little button next to five green lights on battery. Here’s the story, found on Dell’s website:

To check the battery health, press and hold the status button on the battery charge gauge for at least 3 seconds. If no lights appear, the battery is in good condition, and more than 80 percent of its original charge capacity remains. Each light represents incremental degradation. If five lights appear, less than 60 percent of the charge capacity remains, and you should consider replacing the battery.

Well, that’s it

At the end of this a bit too long and boring article, please feel free adding your comments and remarks on power management in Linux environment, and how are you getting on with battery life issues. Thanks in advance!

PS. Special thanks for Mike for his feedback on battery life and Dell D620!

Comments:

  1. Bulbous, Not Tapered » Blog Archive » Poor Battery Life on Latitude D620
    Sunday, 11 March 2007 @ 06:11

    […] I love my laptop, and in general I’m very happy with it. It does look like there’s a trend toward premature battery failure, though, and if your situation is severe enough you may be eligible for a warranty replacement. Once you’re replacement arrives, go read about how to monitor and optimize battery performance. […]

  2. Idiot
    Thursday, 21 June 2007 @ 15:18

    Nothing like a genius who tells you everything you need to save battery power without actually telling you how to do any of it. Hey genius, don’t u think if a person was computer savvy enough to understand how to do all the things you are talking about, they wouldn’t need you to tell them about it? Ah? “set CPU to lock frequency at minimum level”. Yea, I’ll be sure to do that after I finish my book on “blogging for idiots”.

  3. Dawid Lorenz
    Thursday, 21 June 2007 @ 20:47

    Nice one. But - if you don’t like it, then why bother? Do me a favour, and don’t come back. Just fuck off. Thanks.

  4. jacky
    Saturday, 29 December 2007 @ 01:15

    when saving documents, use a USB Pen Drive. This device uses static Flash memory as opposed to a spinning Hard Drive.
    This is a great way to save battery life!

  5. deelite
    Saturday, 23 February 2008 @ 17:24

    Hi David - battery life is a big issue at the large organization where I work, and since I am a novice in the computer world, I really appreciated just having a list of ideas you got me thinking about. We have folks who got laptops and tablets, and are threatening not to use them because of battery issues. Thanks for your detail, though I struggle with some of the stuff you talked about only because I have had no formal training (which I need :). In the meantime, I depend on our nice IT department to help me understand all the wonders of computers, etc. Thanks again. And to jacky, I use my flash travel sticks a lot - so, good info there. Sincerely, Deelite.

  6. deelite
    Saturday, 23 February 2008 @ 17:29

    apologies - Dawid, for not spelling your name correctly… sorry Dawid. (bifocals hehee) Deelite.

  7. Dawid Lorenz
    Saturday, 23 February 2008 @ 18:08

    No worries.

  8. g
    Monday, 12 May 2008 @ 18:54

    you must have a lot of spare time on your hands to do this. nice though, saves me doing all the work. my laptop is rubish with battery so i just use the mains all the time.

  9. batteries
    Tuesday, 5 August 2008 @ 03:47

    Thank you for this outstanding article.I thought Centrino was the best technology for laptop battery performance.

  10. matt i
    Thursday, 13 November 2008 @ 02:58

    hi this is a great article. I have a latitude d620, and i have had it for 2 years and the battery only lasts for 20 minutes. Its fine because i generally only use it at my desk or someplace where i can plug in my charger. But i think these tips will dramatically increase my battery……or so i hope.

    BTW-my battery was a 9 cell.

Anything to say?

  • buy generic viagra
  • buy cialis from canada
  • price of acomplia
  • buy synthroid without prescription
  • synthroid online cheap
  • cialis from india
  • viagra order
  • accutane generic
  • cheapest levitra prices
  • buy clomid online
  • generic cialis cheap
  • buy cialis lowest price
  • buy acomplia
  • buy levitra online
  • cheap cialis pill
  • buy cheapest cialis online
  • discount cialis
  • where to order viagra
  • viagra no prescription
  • order cialis no prescription required
  • soma generic
  • cialis tablet
  • levitra
  • cialis for order
  • order acomplia online
  • cheap generic soma
  • order levitra
  • discount cialis no rx
  • find cialis no prescription required
  • viagra online
  • cialis malaysia
  • viagra uk
  • soma pharmacy
  • buy cheap cialis
  • levitra cheap
  • buy lasix without prescription
  • lasix without prescription
  • order propecia online
  • cheap cialis
  • viagra free delivery
  • viagra overnight
  • cheap clomid online
  • lasix without a prescription
  • viagra online review
  • find viagra online
  • cialis generic
  • purchase viagra
  • propecia pharmacy
  • find cheap cialis
  • cheapest cialis prices
  • buy soma cheap
  • buy lasix cheap
  • cialis overnight
  • sale cialis
  • clomid pills
  • order cialis on internet
  • soma sale
  • cheapest lasix prices
  • viagra no online prescription
  • buy viagra from us
  • buy generic cialis online
  • cheap viagra tablet
  • soma without prescription
  • buy zithromax cheap
  • order propecia
  • buy cheap synthroid
  • find cheap cialis online
  • buy cheap lasix
  • order soma
  • lowest price propecia
  • discount propecia
  • purchase viagra online
  • accutane for sale
  • soma pills