Why Is Linux Notebook Battery Life Still Poor?
Ganty writes "I recently purchased a Lenovo W500 notebook, and after 'downgrading' to XP and creating a dual partition, I found that I had a battery life of nearly three hours using the long-life battery, at this point I was a happy camper because it means that I can watch a DVD during a flight. I then tried various Linux distributions and found the battery life under FOS to be very disappointing, with an average of 45 minutes before a warning message. After settling on Ubuntu I then spent three days trying various hardware tweaks but I only managed to increase the battery life to one and a half hours. Unwanted services have been disabled, laptop mode has been enabled, the dual core CPU reduces speed when idle and the hard drive spins down when not needed. Obviously Apple with their X86 hardware and BSD based OS have got it right because the MacBooks last for hours, and a stock install of MS Windows XP gives me three hours of life. Why is battery life on notebooks so poor when using Linux? Some have suggested disabling various hardware items such as bluetooth and running the screen at half brightness but XP doesn't require me to do this and still gives a reasonable battery life."
I was able to get my X41 tablet to have good battery life (a bit better than windows actually), but it took some doing. Powertop is a godsend, it pointed me to the i915 intel drivers as the culprit. Disabling DRI made a huge difference.
If you're running on an Intel platform, try running powertop. I can easily gain over an hour of battery life by disabling the services it recommends and reducing the screen brightness.
And I have plenty of anecdotal evidence that power management works really well with whatever OS the computer was intended to run, and is alright-to-crappy with any other OS.
My MacBook Pro runs decently in OSX, and drains quickly in WinXP.
My HP Compaq laptop runs really long in Vista, though its still alright in Linux. (haven't done a comparison, though... But Linux still whines when battery #1 is almost dead, even if I have battery #2 available, installed, and at 100%)
The crux of the problem is that Linux is *rarely* the "intended OS" for any of these platforms, so the hardware manufacturer never invests any effort to make sure Linux power management drivers work correctly on them.
This really is an issue, and hardware support varies. Your notebook seems to include an ATI graphics card. That's probably your problem. Last I looked neither the open source, nor the ATI graphics drivers supported power savings on the ATI cards. I have an Asus F8Sv, which actually gets longer battery life in Linux, about 10 minutes, even though when running Linux, I have an external hard drive connected. It's got an Nvidia Geforce 8600 graphics card, with Nvidia's drivers. (Mind you, this is with OpenGL composting enabled, under Kubuntu (both 9.04 and 9.10) The other big one is Intel cards, which are supported for most of their power management features under the driver Intel helped write.
While I can't say that my Dell laptop's power management has been piss-poor under Windows (I can't really say that I used Windows on THIS particular computer that much, but I did on previous Dell models) and the power management was pretty excellent especially when the Intel speedstep software was running. If it helps, I run Fedora and Fedora and Dell laptops have been getting along fabulously for at least the past 6 or 7 version releases.
But one thing about running Windows that has always been a complaint and that's it's estimation for "time remaining." Whether looking at file transfers or remaining battery life, Microsoft ALWAYS seems to over-estimate "time remaining" or has at least reported the most optimistic figure possible. What I'm getting at is that it is QUITE possible that the Windows battery life you are reading is either untrue or unrealistically optimistic.
I know on my Dell Mini 9 running XP and watching video on battery power initially claims I have like 3 or 4 hours battery remaining, but before the two hour movie is complete, it wants to die.
The biggest source of battery drain on my netbook is CPU processing. No doubt with my other notebook, it would be hard drive usage followed closely by processor/gpu usage. This leads me to the next suggestion when using Linux -- use the graphics driver provided by nvidia or ati. They manage power better because they have the "secrets" that the GPL drivers don't have access to. Remember that a GPU is still a processor and eats power when processing.
Power management on laptops is all about paying attention to everything that draws power and being aware of it. For example, if it generates heat, it's using power... usually lots of it and cooling systems draw even more power as a consequence. Dial that speedstep down WAY low when unplugged.
It's sadly true that almost all Linux applications / distributions have not taken writing-to-disk into account to reduce power. On the other hand, video / 2G / 3G graphics acceleration in hardware makes a huge difference, which is why I would really like to see more companies offering more in terms of stable hardware acceleration.
Well, DUH, it HAS to be perfectly optimized for the hardware.
Battery management requires checking every single pin on your hardware and ensuring that you've set the i/o correctly for sleep mode.
If you have even one pin with a pull-up resistor set as an output, then you'll get lower battery life than the nominal case. If you have just random I/O on unused pins, then you're going to get greater drain than ideal.
I'll qualify that statement by saying I'm an Electrical Engineer with embedded experience. One of the products I worked on was a GPS / VHF tracker with a 12uA standby current. Another was a VHF tracker with an 8uA standby current. Slight modifications to the firmware would bring the standby current up to 50-100 mA. That's more than 1000x more standby current.
My experience dealing with Linux developers (and realistically, software developers in general) is that they're all terrible at determining the link between hardware and software. Look at the derision you get online towards C. Linux devs are worse -- if you're not running their exact hardware on a machine you bought in the last month, then it's your problem, not theirs. "Weird, it works here. Have you tried recompiling the drivers?"
It's fairly easy to map these pins, BTW. All you have to do is set everything to an output, set it to 0, and then turn everything to an input. Everything that's high has a pullup resistor. Do the same with 1 and everything that's low has a pull-down resistor. Now you know which pins must be inputs when you're not using them.
Of course, since you taught yourself programming with Ruby on Rails, you know all this, right? It's not like you'd have to have some low-level knowledge of the hardware in order to effectively make a complete synergistic hardware and software package.~
---
ECHELON is a government program to find words like bomb, jihad, plutonium, assassinate, and anarchy.
A quick Google search shows that the basic kernel for all versions of Ubuntu has been tickless since 7.10. /boot/config-`uname -r`
http://www.ubuntu.com/news/ubuntu-server710
I know my system (karmic) does. You can check with:
$ grep CONFIG_NO_HZ
CONFIG_NO_HZ=y
Why is it so hot? Where am I going? What am I doing in this handbasket?
First, Microsoft doesn't "do it". Without specific drivers provided by the OEM, the power-save functionality doesn't work well on Win either. The fact that all OEMs provide these is simply a matter of scale, Windows is 90% of the market, after all.
Secondly, Apple controls the hardware. They can do what they like and make sure it works because it's a limited subset. You pay extra for that too.
What you're basically asking for is "why can't this free software made by volunteers be as instantly capable with any hardware on the planet as the big corporate monopoly that spends zillions on the same thing"?
Do you now see the idiocy of the question?
Hey, the fact that it works at all is the miracle here. Okay, so you might have to tweak it. Generally speaking, you don't have to, but there's always edge cases.
Also, the existence of differing distributions reflects different needs. There's stuff in any install of Windows that people often don't need. So why install it? Linux being customizable for the task at hand is a feature, not a drawback.
- Give a man a fire and he's warm for a day, but set him on fire and he's warm for the rest of his life.