Getting the Most Out of Your Battery in Ubuntu
Ubuntu’s battery life has been a bone of contention with me ever since making the switch from Windows a while ago, and it seemed that there was no real fix for this. But perhaps there is.
My trusty HP zt3000 has been able to consistently give me an hour and a half when running under any flavour of Windows XP, but never more than 50 minutes under Ubuntu. I’ve tried everything from running with maximum powersave enabled, turning the processor down as much as it would go, putting the LCD on the absolute lowest setting, and even praying to whatever diety might hear my case. All to no avail … 50 minutes was the most I could expect under Ubuntu 7.10.
But something happened recently and I’m now able to consistently get over an hour and a half of life while running the Human-friendly version of Linux. How did I do this? I’m glad you asked.
One of the things that has really annoyed me is Ubuntu’s insistence that I shut down when there is 5% of battery remaining. I’ve always found this number to be a rather pessimistic view of actual battery life, so I shut the notifications off. In the Power Management Preferences screen, this involves telling Ubuntu to do nothing when the battery power is critically low.
From here, I simply let the unthinkable happen … I let the battery run dry, starving the notebook of power
This was completely accidental, too. Someone had unplugged my power adapter from the wall and I didn’t notice. After getting right into the middle of a conversation on IRC and checking out a few websites, my notebook completely died on me. I looked to see if the power was still coming to my machine, but all the LEDs were off. It wasn’t receiving power from the socket. I had been using the computer for at least an hour before the power completely died, too.
Now the interesting part. Later in the afternoon I decided to run from battery in the other room and made my way over. From there I watched three episodes of a TV program (each 22 minutes in length), read through my RSS feeds, chatted with some friends on IRC, read through a dozen emails, and wrote this blog post. As of right now, I’ve been on battery for an hour and fourty minutes, with 29% battery life remaining.
“Wow” does not convey just how important this find is to me. Does the Ubuntu battery problem exist only because of a misreading of the battery charge level? Can it be spontaneously corrected just by running a battery right to the very end so that Ubuntu can get an accurate measure of just how low it will go? While I doubt the coding geniuses who make Ubuntu possible would allow an easy solution like this to go undocumented, I won’t complain about the results.
Not only will I regain my semi-mobility with this notebook, but I’ll gain at least an extra 20 minutes of battery life when on the go. I can’t wait to get the word out and see if other people find the same results. Perhaps I should have written this post without the story, but who wants to read a post that just says:
- disable the auto-shutdown when battery power is critically low
- let the machine run dry
- re-charge and test your battery life
Sounds kinda boring
Do you run Ubuntu? Have you tried anything like this and found favourable results? I’d be interested in hearing if this was just a fluke.
Comments (11)
Boring? Doesn’t sound boring at all Jason.
Watching a laptop run dry might be more interesting than listening to me talk about why I love Dr Pepper. There’s a story, there always is with me.
My laptop with Kubuntu (on my desktop ATM) gets similar results. I can actually get up to 40 more minutes with Linux as compared with Windows sometimes.
@Contamination: What’s wrong with talking about our love for DP? That soft drink has helped me through many-a-sleepless coding nights. They should really change their slogan to: DP! Helping You Get That Project Done On Time!
@Jake: Did you have to do anything special to get that much life out of your notebook batteries? I’ve been trying so many things to get my notebook operating for a longer time on battery as it’s important to keep mobility up, but haven’t really found much that can be easily handled by family should they choose to use the machine while I’m away. That said, it seems that since running the battery into the ground, it’s been working great for everyone.
I’m thinking the next area I’ll tackle will involve setting aside some RAM as a RAM drive and having the system run almost exclusively off that with targeted copy-backs on shutdown (should it be necessary). It’ll likely be a bit more tricky than just a scripted action, but it shouldn’t be *too* difficult. Once I can get the hard drive powered down for 90% of the time, then runtimes will really soar
Getting the Most Out of Your Battery in Ubuntu…
Ubuntu’s battery life has been a bone of contention with me ever since making the switch from Windows a while ago, and it seemed that there was no real fix for this. But perhaps there is.
My trusty HP zt3000 has been able to consistently give me an …
It all started when I was in technical college. Dr Pepper was new to Australia, so they introduced a competition where if you flipped the lid of your 500ml bottle, you had a 50-50 chance of getting a free bottle.
And when you handed over the cap, the bottle you got also had a 50-50 chance.
My record was 13 bottles free in a row, though one of my classmates got 26.
Hmm.. Tell me if its more interesting than watching your laptop run down….
[...] as bad as the operating system would have us think. A little while ago I had talked about how I accidentally discovered that my battery life with Ubuntu 7.10 was actually superior to Windows XP, and I’ve been looking for some ways to easily tweak the warning messages ever [...]
I run Ubuntu 7.10 on my laptop, and I’m very very very disappointed that with it running, the battery life is so damn short, about 3 hours, yeah, I’ve done the CPU frequency scaling thing, I’ve turned off Bluetooth, turned off USB too, and other stuff, and after I’ve done all that, I managed to squeeze only an extra 40 minutes out of it!!! Compared to Windows, which I could run it for about 6 hours, on the same laptop with the same battery, Ubuntu only last about half of it. When it comes to battery life on a laptop, Ubuntu’s the biggest, biggest, biggest loser. What a shame, man. It’s great for a desktop, but when it comes to laptop, it sucks a whole lot.
“Do you run Ubuntu? Have you tried anything like this and found favourable results?”
Yep. Worked for me on 4 different notebooks so far.
I noticed that half year ago on my HP6715s (hard work to get Ubuntu running on that, but it finally ran).
After reading your post I remembered and tried it on 3 other notebooks (Dell & IBM, all with 8.10) – and it worked again!
Is it finally …errhem… “a feature, not a bug”?
Heh, thanks for the update on that, Dirty Cutmaster. I still do this same trick on every notebook that I install Ubuntu on, and occasionally need to do it again after six or seven months.
draining the battery (LION) is a bad idea… squeezing practices like described here left me with a damaged 6months old sony-battery…which now gives me 5minutes of power and half day of sleep… Instead one can take the time and add some rules to the udev or write some for acpi, and of course enabling laptop-mode and there is so much more one could do. I got like this 1h more power than on windows vista and my laptop goes automatically to hibernation on 6%. One should drain the battery every few months to reset the chip inside (callibrate).
http://www.batteryuniversity.com/
good luck
Have you let the battery run right down to nothing, Lala?
What I’ve noticed is that the battery meter is incredibly pessimistic and, if you disable the “auto-shutdown”, you can squeeze quite a bit more life out of it. The system will still let you know when you’re running low on power, of course, but even with my 5 year old notebook, I was able to squeeze about 30 minutes out of the battery when Ubuntu said it was at 0%.
Check out my other post, Taking Ubuntu’s Battery Warnings With A Grain of Salt. You might just be surprised how long the battery can last in Ubuntu with your usual selection of peripherals.