Terrible Battery Life with Ubuntu!

TBSN

Senior member
Nov 12, 2006
925
0
76
Update: So I followed the tutorial and set up cpufreqd, and the battery lasted 2:50hrs with 15% battery left when I turned it off. I am sure it would have lasted 3 1/2 hrs!

Definitely worth doing this to your computer (if it's a laptop obviously). Before I had terrible battery life with Ubuntu. I don't know how it compares to WinXP; I don't have it installed anymore, but I am still impressed.

Tutorial: http://www.totalnetsolutions.n...buntu-or-debian-linux/
_______________________________________________________________________
I recently switched my Lenovo R61 laptop to Ubuntu and I love it. Everything about it (well, almost everything) is better than XP imho. After about a week of using it, though, I've noticed that the battery drains way faster than it used to. I am using the power management options to set the screen to blank and to suspend when the lid is closed, etc, but even when it is in SUSPEND the battery is drained very quickly!

Perhaps it is because of the OS not supporting whatever XP uses to throttle the CPU, I don't know. But it's also strange that it uses so much battery power while in suspend mode...

Are there any fixes for this, like a package or something that deals with the hardware? Is there anything I can configure to squeeze out some more life out a charge?

Thanks!

 

SickBeast

Lifer
Jul 21, 2000
14,377
19
81
There's apparently some sort of eeePC port of Ubuntu; it might help you.

Ubuntu 9.04 is going to have special features for netbooks; I know that doesn't help you now, but hopefully it will help down the line.

I'm pretty sure you can also get a program to underclock your CPU within Ubuntu.
 
Dec 10, 2005
24,162
6,975
136
My Ubuntu battery life sucks as well. I haven't really found any solution to bring it back in line with XP levels (1:20 vs. 2:30). I'm just going to install OpenSuse 11.1 when it is released Thursday. From what I've seen, OpenSuse is better with battery life.
 

TBSN

Senior member
Nov 12, 2006
925
0
76
Originally posted by: SickBeast
Oh, and you should read this

SickBeast; this link was very helpful, thanks. I haven't yet implemented it.

I also found on the Ubuntu forums to a very in-depth tutorial on controlling power management and profiles. Unfortunately, it is over my head as a new linux user:

totalnetsolutions.net tutorial

It includes profiles and rules to govern parameters such as CPU frequency, HDD settings, etc based on what you are doing with your computer (i.e. on battery power or not, watching DVD, etc.)

I can't really follow it, though, because certain things are not explained well enough. For example, I don't know how to find out what cpu steps are available to me...

Anyone who is a well-versed in linux will probably find this very helpful, but I can't really make sense of it. Help!
 

xSauronx

Lifer
Jul 14, 2000
19,586
4
81
Originally posted by: TBSN
I recently switched my Lenovo R61 laptop to Ubuntu and I love it. Everything about it (well, almost everything) is better than XP imho. After about a week of using it, though, I've noticed that the battery drains way faster than it used to. I am using the power management options to set the screen to blank and to suspend when the lid is closed, etc, but even when it is in SUSPEND the battery is drained very quickly!

Perhaps it is because of the OS not supporting whatever XP uses to throttle the CPU, I don't know. But it's also strange that it uses so much battery power while in suspend mode...

Are there any fixes for this, like a package or something that deals with the hardware? Is there anything I can configure to squeeze out some more life out a charge?

Thanks!

weird, i noticed shroter battery life on ubuntu from xp on my T60, but in suspend i can go for well over 24 hours and the battery barely takes a hit.

what your ubuntu and kernel version?
go to a terminal and type:
uname -r


ive had the kernel update mess up suspend for me before :| but right now with ubuntu 8.10 its working fine. i had big problems with the later kernel updates in 8.04 where suspend didnt work and my wifi was spotty.
 

SickBeast

Lifer
Jul 21, 2000
14,377
19
81
You can just paste the "sudo" commands from steps 1 and 2 into the terminal application. Use crtl+shift+v as a shortcut to paste if you want.

You need to figure out what CPU your laptop has in order to determine its 'steps'. Actually, in that guide, they're saying if you paste "cpufreq-info -l" into terminal after installing the applications they suggest, it will tell you.

The rest looks like it involves editing some files. It's really no different than editing a .txt file in Windows, however you need to be "root" in order to do it usually. I installed a script so that I can right-click a file and "open as root".

Good luck! :)

 

aceO07

Diamond Member
Nov 6, 2000
4,491
0
76
Unfortunately Ubuntu sucks for laptops, if you're the type who want to get as battery life as possible. It just uses more power.

I've measure power usage with Windows XP and Ubuntu. Ubuntu always used more. On my desktop, it was as much as 30WATTS more.

There are ways to undervolt the processor in both Windows and Ubuntu/Linux. Windows is fairly easy. Ubuntu is harder. I haven't even attempted it. It's a bit of work (at least from the articles I've read). You need to get the right patch for the kernel, install programs, edit files. I wouldn't mind too much, but I'd hate to do it everytime a new kernel comes out and I'd have to wait for the patch too. Correct me if I'm wrong, I've love for it to be easy.
 

little elvis

Senior member
Sep 8, 2005
227
0
0
try installing powertop. It measures power usage and does offers some suggestions on reducing power usage.

That being said, I have a 9 cell battery and I'm lucky to get 4 hours battery life, since I don't use Windows I can't comment on what battery life I would get running it. However, I do have a friend with a very similar laptop and he gets 5.5 hours with 9 cell battery.
 

TBSN

Senior member
Nov 12, 2006
925
0
76
Well, I am going out on a limb and editing the cpufreqd.conf files as per the tutorial. There is actually some useful info in the cpufreqd man pages. Still, I don't know where to save the files...

*edit*
just figured it out, it is working. I will charge it up fully and see how long it lasts. I'll let you know how it goes. Its a lot easier than it looks, so I definitely recommend trying it. Otherwise, your CPU is at full speed even at idle.
 

TBSN

Senior member
Nov 12, 2006
925
0
76
Alright, here's how my battery lasted: after I set it up according to the tutorial, and put configured it, I got 2:50hr from the battery, doing mostly websurfing and some videos. When I turned the laptop off, I still had 15% battery left and I'm sure that it could have lasted for 3 1/2 hrs! That's a HUGE improvement over before; it could barely break an hour (in Ubuntu). I'll update the top of the thread.
 

SickBeast

Lifer
Jul 21, 2000
14,377
19
81
That's good news, OP. :)

It looks like Ubuntu 9.04 will be an awesome OS for laptops and netbooks.
 

TBSN

Senior member
Nov 12, 2006
925
0
76
Originally posted by: SickBeast
That's good news, OP. :)

It looks like Ubuntu 9.04 will be an awesome OS for laptops and netbooks.

Yeah, hopefully they'll have more options for power management in a GUI form, or just do it automatically like Windows does.
 
Dec 10, 2005
24,162
6,975
136
Originally posted by: TBSN
Originally posted by: SickBeast
That's good news, OP. :)

It looks like Ubuntu 9.04 will be an awesome OS for laptops and netbooks.

Yeah, hopefully they'll have more options for power management in a GUI form, or just do it automatically like Windows does.

Did you use the configuration files that guy used in the link you provided or did you edit them on your own?

Edit:
I used the "Laptop-Mode.conf" file he provided, but edited my own cpufreqd.conf file and basically put everything on battery as either "ondemand" from 10-100% and then 25% fixed when battery power drops below 35%. I only got an extra 10-20 minutes (so from 1hr, 15min to 1hr, 35min) on battery.

I can't wait for 9.04 if it will have better power management options in the gui. In fact, in some ways I wish there had been no need to compile my own ATI driver or a way to get my fn hotkeys working in OpenSuse, because it looked it had better power management. Even Kubuntu's KDE power manager looked more detailed than the shitty gnome one, but I couldn't get my touchpad to disable tap to click under Kubuntu...
 

TBSN

Senior member
Nov 12, 2006
925
0
76
Originally posted by: Brainonska511
Originally posted by: TBSN
Originally posted by: SickBeast
That's good news, OP. :)

It looks like Ubuntu 9.04 will be an awesome OS for laptops and netbooks.

Yeah, hopefully they'll have more options for power management in a GUI form, or just do it automatically like Windows does.

Did you use the configuration files that guy used in the link you provided or did you edit them on your own?

Edit:
I used the "Laptop-Mode.conf" file he provided, but edited my own cpufreqd.conf file and basically put everything on battery as either "ondemand" from 10-100% and then 25% fixed when battery power drops below 35%. I only got an extra 10-20 minutes (so from 1hr, 15min to 1hr, 35min) on battery.

I can't wait for 9.04 if it will have better power management options in the gui. In fact, in some ways I wish there had been no need to compile my own ATI driver or a way to get my fn hotkeys working in OpenSuse, because it looked it had better power management. Even Kubuntu's KDE power manager looked more detailed than the shitty gnome one, but I couldn't get my touchpad to disable tap to click under Kubuntu...

Yeah, I used his laptop-mode.conf, but changed some of the things in the cpufreqd.conf.
 
Dec 10, 2005
24,162
6,975
136
Originally posted by: TBSN
Yeah, I used his laptop-mode.conf, but changed some of the things in the cpufreqd.conf.

Oh well... I guess I'll take my extra 20 minutes and be happy; maybe play with the settings a little more. I'll just have to wait for 9.04 and improved power management features.

Kubuntu and Opensuse would have both been good for power management, but they both had flaws that I could not get over (and I didn't want to spend the large amount of time scouring the internet trying to find the fix for my problems).
 

TBSN

Senior member
Nov 12, 2006
925
0
76
Originally posted by: Brainonska511
Originally posted by: TBSN
Yeah, I used his laptop-mode.conf, but changed some of the things in the cpufreqd.conf.

Oh well... I guess I'll take my extra 20 minutes and be happy; maybe play with the settings a little more. I'll just have to wait for 9.04 and improved power management features.

Kubuntu and Opensuse would have both been good for power management, but they both had flaws that I could not get over (and I didn't want to spend the large amount of time scouring the internet trying to find the fix for my problems).

You might want to try the "conservative" governor for some of the profiles. I am pretty sure it scales up the CPU like ondemand, but does so more slowly...

Also, someone posted something about having the USB ports use less power, or none at all (not sure) but I'll try to find that. (I haven't done it myself).

*edit* http://lesswatts.org/ Lots of info on saving power in Linux. I haven't even looked at this myself, I forgot I had it bookmarked.
 
Dec 10, 2005
24,162
6,975
136
Originally posted by: TBSN
Originally posted by: Brainonska511
Originally posted by: TBSN
Yeah, I used his laptop-mode.conf, but changed some of the things in the cpufreqd.conf.

Oh well... I guess I'll take my extra 20 minutes and be happy; maybe play with the settings a little more. I'll just have to wait for 9.04 and improved power management features.

Kubuntu and Opensuse would have both been good for power management, but they both had flaws that I could not get over (and I didn't want to spend the large amount of time scouring the internet trying to find the fix for my problems).

You might want to try the "conservative" governor for some of the profiles. I am pretty sure it scales up the CPU like ondemand, but does so more slowly...

Also, someone posted something about having the USB ports use less power, or none at all (not sure) but I'll try to find that. (I haven't done it myself).

I guess I could try that. I'm first going to give Kubuntu another shot to see how the KDE power manager works compared with the stuff I adjusted under Ubuntu; I gave up on Kubuntu way too soon - I was just frustrated from dealing with OpenSuse 11.1 earlier and its quirks. It could be too that my laptop is 2.5 years old and the battery isn't as good under Windows as it thinks (I haven't really checked recently, but I think it gets me at least 2 hours still).
 

postmortemIA

Diamond Member
Jul 11, 2006
7,721
40
91
opensuse has worked great for me since 10.1 or so... always did CPUFreq thing properly and together with GNOME and KDE power scheme