Ubuntu QA:
BlogBrainstorm
Log in
Ubuntu QA
The Ubuntu community has contributed 8257 ideas, 36192 comments, 868024 votes

Idea #81: Power Management



bug This idea was marked as being in development the 18 March 08.
up
4219
down
Written by jsmidt the 28 Feb 08 at 16:49. Category: Others. Status: In development
Description
Ubuntu needs to go green. Powertop, Lesswatts and other tools have finally hit the Linux scene to pave the way for better power management. It needs to be said, "if you want your battery to last longest, or have your energy bill be the lowest, you better use Ubuntu Linux."


Attachments


Duplicates


Comments
BadChoice wrote on the 28 Feb 08 at 17:14
True, with my laptop I only have 1.45h of battery
using powertop and reducing brighten, reducing cpu frequence i get 1.50... (just compiz enabled)
with windows i get 2.40h, one more hour.

So I think it will be a very good idea to do a better power manager that lets control you different energy status, power save, just power save a little, and don't save power (but saving it more than now)

I know you know ways to do it, like stoping services... reducing cpu frequence etc...

I thinks its a very important question to take care about!

kazamx wrote on the 28 Feb 08 at 17:56
For most users its not really about being green, its about money and time.

If the OS uses less power then it saves me money on my desktop. If the OS uses less power, then it makes my laptop last longer. Both are great results.

sportman1280 wrote on the 28 Feb 08 at 19:12
Windows still has better battery life than Ubuntu on my laptop... and I hate that. I want to get the maximum possible amount of battery life in one charge.

I would LOVE to see Ubuntu last longer on one charge :-D.

jiri-s wrote on the 28 Feb 08 at 19:55
Yes, yes, yes. Ubuntu needs better power management.

F for Fragging wrote on the 28 Feb 08 at 20:49
This is probably the most important proposal for me, I use Ubuntu on my notebook, which I take along to university for taking notes during lectures. Lectures usually last a few hours, and power sockets are not available in the large lecture rooms. I always lower the screen brightness to the minimum to get the maximum out of the battery.

I'd really like to see the battery last longer as well, of course better hardware like LED-backlit or OLED displays, CPU's with a low energy consumption and batteries with a higher capacity can realise that, but as others said, when it comes to battery life Ubuntu is inferior to Windows XP on identical hardware.

I'm not sure what Ubuntu can do to reduce power usage, because Ubuntu is obviously dependent on the Linux kernel and GNOME/KDE/XFCE when it comes to power saving measures. Even so, I'd hope to see the developers give this a higher priority.

Ventsy wrote on the 29 Feb 08 at 00:02
Ubuntu definitely needs better power management. Most users nowadays buy laptops. I will hate to spend several hundreds or thousand dollars on laptop and then have to choose between half battery and Ubuntu or long battery life and windows.
My battery life on windows was significantly longer.
This didn't stopped me from whipping windows though ;)

legalizemeth wrote on the 29 Feb 08 at 00:12
I'm with Ventsy. This is very important. Most new computers sold are laptops, and the percentage of laptops sold will only increase.

Both my girlfriend and I have laptops running Gutsy, and we get about half the battery life in Ubuntu than we do in Windows! (Of course, we still use Ubuntu all the time!)

wfpearson wrote on the 29 Feb 08 at 00:19
I'd like to see a specific innovative idea to extend battery life, rather than a generic directive. Like "provide a warning in Synaptic and apt when a user is about to install a application or service (something persistent) that will shorten battery life. This along with an process to identify resource hungry applications will enable the user to make green application choices." This is directive is a lot more specific. It identifies a specific cause of shortened battery life and provides a solution.

stbaker wrote on the 29 Feb 08 at 00:33
I personally would like more control over power management - currently I can only set how dim my monitor gets when I switch to battery, unless I start fiddling with gconf settings or writing power management scripts. It'd be great if there was an easy, graphical way to set cpu frequency scaling policies, video card power management, and wireless power management (both turning on/off wifi and bluetooth, as well as wifi power management through iwpriv)

legalizemeth wrote on the 29 Feb 08 at 01:13
I'd like to see a specific innovative idea to extend battery life, rather than a generic directive.

I would too, but I don't think that will be possible. If there was one single switch to flip to get better battery life, someone would have flipped it already. Rather, I suspect lots of small tweaks and optimizations will be needed. Think of all the things powertop suggests. No one has a huge effect, but taken together they can be substantial.

kcin1204 wrote on the 29 Feb 08 at 02:13
for the mean time all of you should download powertop "sudo aptitude install powertop" once you do that and run it follow the suggestions that are displayed on the bottom. But to make these settings stick when you need longer battery life just collect all of those statements and make a script file out of them.

this process alone gives me another hour of battery life

ex
#!/bin/bash
#shuts down the check to see if cdrom has new disk
hal-disable-polling --device /dev/scd0 'hal'

#enters laptop mode
echo 5 > /proc/sys/vm/laptop_mode
laptop_mode start
#reduces power to wifi careful in places that have weak signals
#iwpriv eth1 set_power 5

echo 3500 > /proc/sys/vm/dirty_writeback_centisecs
#makes it so that file system doesnt change access times on files
mount -o remount,noatime /
#syndaemon -i .8 -d

#disables firewall to ban users that keep attacking your system
/etc/init.d/fail2ban stop

#if you have vmware installed stop's service
/etc/init.d/vmware stop

willjcroz wrote on the 29 Feb 08 at 02:20
Apparently there is paradox with the tickless kernel: people think that low cpu speeds will save power, but on cpu wakeup (from cpu sleep state - not suspend) a faster speed will sometimes save power by doing whatever needed to be done faster and allowing the cpu to sleep sooner.Its "known as race to idle":
http://www.lesswatts.org/projects/applications-power-management/race-to-idle.ph p

Gnome power manager has hardly any amount of control, e.g. on my laptop I want to kill the display if user input is idle for 5 minutes - minimum is 11 ! Wtf? There is no cpu power management incorporated (compare this to Kpowersave which has a lot more features)

Also a problem is that when I want to leave my system doing something useful for a while (download, compiling etc) without changing my power prefs each time Gnome power manager will still suspend mid task. It does not seem very aware of apps that are doing something useful.

There seems to be a dbus interface called 'inhibit' that gpm (gnome power manager) devs have made (its mentioned somewhere on freedesktop.org) that allows apps to register with gpm to say 'dont go into suspend' or whatever. The problem is that we cant expect all apps to use it if its gpm specific. What is really needed is a standard daemon or kernel interface (that everyone will use) to allow apps to register themselves as busy (by using wrapper scripts if necessary), and prevent suspending that way.

Niels Olson wrote on the 29 Feb 08 at 04:24
besides saving the polar bears, energy-efficient also means more comfortable legs and fingertips when you're actually holding your laptop in your lap! Heat = discomfort. Frequency-throttling is good.

mike.thorton wrote on the 29 Feb 08 at 10:58
I'm quite disappointed with gutsy, it takes cca 19 W on my nc6400 intel core 2 duo 'green' notebook.

Even with 54WHr battery it is ready only for 1:45h :(

Pleaaaaaase pay attention to this problem :)

johno wrote on the 29 Feb 08 at 13:03
Shorter default timeout before engaging low power mode on monitor

Working suspend-to-ram

Create a configuration where the hard disk can stay spun down when not in use.

Ability to use a usb/flash disk to cache disk writes while hard disk is spun down.

Software to analyse typical disk access to pre-cache likely reads into ram and flash before spinning down the hard disk.

MakotoTheKnight wrote on the 29 Feb 08 at 14:47
Anything that helps squeeze more life out of our batteries is always a big plus to me.

laervian wrote on the 29 Feb 08 at 15:42
Agreed. But I swear I do NOT understand the gripes many have about windows lasting longer - maybe it is just me, but on my Dell Inspiron 6400 I can make the battery last ~4 hrs on Vista, while with Ubuntu Gutsy and enabling all the tricks with powertop etc, I can make it last even 5-6 hrs! :-)

Andrei Zhekov wrote on the 29 Feb 08 at 16:56
you know, there was a HUG day about gnome-power-manager etc. power problems - it seems that the problem is in the power-manager itself 'cause I have 1h45min on 47W.h battery in stock gutsy install and around 2h40min in gutsy with 2.6.24 kernel installed. Also I've noticed that power-manager is known to teach itself how much can your battery life last....so try and go on....

PS. compiz is known power hungry application according to lesswatts.org and other sites...it causes (for me in part.) the PowerMizer function in Forceware driver to turn on higher frequences...also about Vista - the life time in it IS NOT LINEAR - I mean you have for example 3h when AC is down, but watch what'll happen after 1 hour (looking at your watch) - the time is not 2 hours remaining!

C-- wrote on the 29 Feb 08 at 18:14
Yeah, I get an extra half hour of battery life in Vista at the same settings. Battery life is definitely an important issue in Ubuntu right now.

audiodrumm wrote on the 29 Feb 08 at 20:47
I dual boot Vista/Gutsy on a Sony Vaio N series and I get at least 45 mins extra battery time on Gutsy so maybe it's Vista that's the true power hog :p But back to the point I do agree that it would be nice to have more power adjustment options other than brightness.

I've also noticed that when I leave my laptop running (on AC) for extended periods and then go on battery, Gutsy says it switches to battery yet the brightness levels remain as if on AC. Just a minor gripe but it would be good if this could be addressed/incorporated in future releases.

I also think that any new power management interface should have some way to save customizable profiles that would be easily accessible, such as an applet in the panel.

rawsausage wrote on the 29 Feb 08 at 21:24
Some things such as the "hal-disable-polling --device /dev/scd0 'hal'" really break functionality (couple media player applications break with that one, they won't access the dvd drive anymore). Perhaps good first step would be ensuring that the cpu speed stepping works with all the CPUs and well.

Also, asking for all enabled wifi drivers to enable the automatic power saving functionality would be nice. They are disabled by default afaik.

Also, gnome-panel could get an applet for showing how green you are running!

Neven wrote on the 29 Feb 08 at 21:55
And all of this doesn't go for laptops only, but desktops as well. I have tested and compared Ubuntu to XP and Vista: http://www.silentpcreview.com/forums/viewtopic.php?t=45975

Especially the fact that it's dead easy to undervolt your CPU in XP and Vista makes a vast difference.

Therefore, one thing I would really like to see implemented in Ubuntu is PHCtool and/or linux-phc: http://phc.athousandnights.de/

I'm absolutely certain that Ubuntu can be 10% more efficient than Microsoft operating systems. It would be a great way to push Ubuntu into the (environmental) spotlight.

rotarychainsaw wrote on the 29 Feb 08 at 23:30
And besides the laptops which can always use longer life, businesses are now looking to save money on power bills. If Linux uses less power, a large deployment of linux workstations in a business will have a lower TCO compared to windows. Of course MS is still beating the TCO fud drum, so if can prove that we use electricity, it will be a win.

default.aspx wrote on the 1 Mar 08 at 00:41
I know that Microsoft Windows (both XP and Vista) has very easy power management. I myself can easily change or view power settings quite easily, both on my Dell Inspiron XPS Generation 2 notebook PC (which runs Vista) and on my XP laptops too. Linux has never been so easy for me in this respect. Perhaps that is because I do not know Linux well enough. Or it might be that it just does not have the same power options, as some people say above. Again I have not used Linux well enough to judge that. I know that Dell has recently began using higher capacity batteries (capacity as in battery life) in laptops to make laptops (specifically Vista laptops, as I read in their report) have longer battery life. Of course, if Vista laptops last longer than they used to last, then the same can be said of Ubuntu. But unfortunately, this is Dell-specific and does not apply to Ubuntu in general.

Of course, this idea is not specific to laptops and battery life. Let us not forget that desktops exist too! And they are not about to disappear just yet - on the contrary, I think that they will still remain for many years, although they will become less popular.

madbwoy wrote on the 1 Mar 08 at 01:07
IBM T40
New (NEW!) 6 cell battery

Windows XP: 2:30 hrs (the most, brightness 8/10)
Windows XP: 3:20 hrs (Wifi Disabled, I never use it like this)

Ubuntu Gutsy Gibbon 1:40 hrs (the most, PowerTop enabled, Wifi enabled/disabled, No CD)

Why?? tell me why???? I used to think ubuntu use less resources (therefore less power)... This thing just killed my adventure spirit. Anyway it's sweet and fully customizable-> I'll keep it alive.

Please solve this problem for normal users :)

hardyn wrote on the 1 Mar 08 at 05:26
Tweaking laptop mode gave me a great improvement with battery life, but still about 45min short of windows. I know that power saving features of my 2915 wireless card are not being used at all. I was able with employ them using another users script, but did not always work... this is something that could definitely improved upon.

I really believe the biggest problem is the video drivers. Where ATI has made some effort for a reduced power consumption mode, which could be pretty easily scripted in if one knew how to hook into the power-applied power-removed events... not something i know how to do.

As far as i know Nvidia has made no such effort... and the NV driver is best way i know how to overheat the 6600go in my notebook... the binary driver is much better.

Both ATI and nvidia have pretty effective throttling in windows... but the drivers really seem to be desktop centered in linux.

ShadowVlican wrote on the 1 Mar 08 at 05:44
yes, something similar to RMClock (for windows) for people who want to manually control their CPU's performance and throttling behaviours

oh, and these programs should come installed out of the box SHOULD the computer be a laptop/notebook (i'm sure there's a way to detect that)

aks wrote on the 1 Mar 08 at 10:46
This problem is the greatest problem I'm experiencing with Ubuntu. The battery life is about 1:30h which is half of the time I get with Windows XP. And the second problem (which is probably connected with this one) is, that my laptop is considerably hotter when running Ubuntu than when running Windows. And when I say hotter, I really mean _hotter_. :)

jackhynes wrote on the 1 Mar 08 at 13:21
Sometimes I get all of 30 minutes battery life on Ubuntu which then takes a good 4 hours to fully recharge. Windows doesn't have anywhere near this battery battery consumption.

NicolBolas wrote on the 1 Mar 08 at 13:31
My Dell D620 with its mediabay battery offers me less than 3h30 on batery, where XP Pro can run up to 6hours. Ubuntu doesn't differenciate the main and secondary battery and the remaining time estimation isn't accurate.

funnylookinhat wrote on the 1 Mar 08 at 17:48
This is really a sad truth about Linux: that it hasn't fully adopted it's power-saving abilities. I was forced to put Leopard (Mac OS 10.5) back on my laptop simply because it DOUBLED my battery life. I had tried tweaking powertop and using several tools to maximize my battery life in Ubuntu, but nothing came close. I'm missing apt-get too... :(

gvy wrote on the 1 Mar 08 at 19:38
> you better use Ubuntu Linux
That's wrong goal in the first place: not about making something better but about pushing it onto others.

Well, I've filed idea#2279 on that... you'd better just use Windows, probably.

Lorenz wrote on the 1 Mar 08 at 20:07
I agree about that too. Sorry to say, but since I use Ubuntu on the laptop I basically cannot use it without the charger plugged in :(

drumlight wrote on the 1 Mar 08 at 22:19
I'd love to be able to spin down my USB hard drive when it's not being used. It only contains Media files but spins constantly. If you could set sleep times in the power management preferences it would be great.

gaaies wrote on the 2 Mar 08 at 01:48
I agree that Ubuntu/linux should work on better powermanagement, ACPI is still not well supported (mostly due to buggy bios'es ?!?);

Who btw cares that XP lives a bit longer on a laptop than ubuntu ? I rather drive a BMW M5 (ubuntu) which consumes a bit more fuel/energy than that Suzuki Alto (XP), this comparison works looking at perfomance AND features ;)

thumb6455 wrote on the 2 Mar 08 at 13:15
there are some techniques like , turn off USB port and wifi ,right?
I think user should be able to turn on/off device in their laptop + manage services + screen brightness + CPU loads etc.
all integrated in something like 'Power center' which will be enable by default only in laptop.

Redrazor39 wrote on the 2 Mar 08 at 19:17
YES! Ubuntu needs a "Power Center" that's built into System > Preferences > Power Center and you can create power plans like in Vista, except they'll be called something else like "Power Profiles" or something so some obscure copyright is not violated. Then, there will be three profiles pre-created. "Full Power", which uses a good amount of power and enables everything, "Optimized", which is kinda in the middle which keeps services and devices on, but puts them in lower power mode, and lastly, one either called "Long Life" or "Economy" that disables things like the CD drive, wireless, and dims the screen a good amount.

And make it so you can create custom power plans or edit them and choose what is turned off, what devices are put in power saver mode (if possible for that device), and what is left on. Then you can rename your power profiles and have a menu pop up when you click the battery icon on the panel that allows you to choose from any of your power profiles instantly.

elbuntu wrote on the 3 Mar 08 at 01:13
One very simple and stupid problem in modern linux:es seem to be all the programs accessing disks when the machine is idle, thus preventing them from spinning down.
This creates unnecessary noise, generates heat, and may well be the main reason for linux laptops poor battery life.

In the old 2.2.x kernel based distros all you had to do was to stop the "cron" service and the spin down worked just fine, but now with 2.6.x, even in "single user mode" the root disk spins up again after a few seconds.

There's probably a lot of deamons (service programs) that has to be fixed so they don't touch disks that are standby (stopped) unless they really absolutely have to.

And the anacron deamon should reschedule anything that touches the disk until its on ac power

Or perhaps the kernel could provide some means of saying "the disk hasn't changed since the last time you asked, because it is in standby mode" to help polling programs


Aleks wrote on the 3 Mar 08 at 02:04
Does 7.10's kernel have the dynticks (or something like that) feature? Because I heard that in terms of power saving it worked really well. I'm reserving my vote for this, because I can easily get close to 3 hours out of my laptop when I dim the screen a little. And even more if I turn off my wireless card.

kestaz wrote on the 3 Mar 08 at 02:57
Mac OSX(Darwin) has tickless power management ?

I should say Darwin definitely uses better power management

blueglow wrote on the 4 Mar 08 at 02:26
I agree... Excessive power usage is a really big issue for laptop users.

Also, why the hell does the "Put display to sleep when inactive for..." in Power Manager _start_ at 5 minutes? My screen takes

blueglow wrote on the 4 Mar 08 at 02:39
The above comment was cut off because i dared use a less-than symbol... please fix that, too!

For what it's worth, the res of the message was:
"... My screen takes less than 2 seconds to wake up again, and I'd much prefer to save the power from 2 minutes of inactivity onwards. The LCD in my laptop is big and juicy, five minutes is way too long,

erland wrote on the 4 Mar 08 at 02:59
If I could vote more than once for this one I would. Absolutely necessary for those with laptops and long journeys. Thanks.

weiji wrote on the 4 Mar 08 at 16:29
We must necessarily improve management of portable battery!

manosdoc wrote on the 4 Mar 08 at 21:17
Should be made easy to choose Powersave and Stick to it there.
it makes our laptops Cooler and less noise.

hunteke wrote on the 5 Mar 08 at 14:22
Seems to me that a large part of power management would be fixing the suspend to ram issues. It wouldn't be the active power management that I think was originally intended by this post, but for a vast majority of folks, it would go a long way. Is this already in the mix? Is this why this idea is already on the "Being worked upon" list and not the just-as-many-votes suspend idea?

nofatya wrote on the 9 Mar 08 at 09:34
My laptop (Thinkpad X61s) can work easy about 4 hours if it is powered by Windows Vista. But Windows Vista is exceptionally bad operating system, so I want more powersaving by my dear lovely beautiful Ubuntu Linix.

Thanks!

hunt.topher wrote on the 10 Mar 08 at 18:23
YES, thank you for saying this! Ubuntu is in the perfect position to adopt a "super-efficient" image. Given our current political and economic state, this image would be a very, very good thing to have.

JeromeHall wrote on the 17 Mar 08 at 16:23
This should be a top priority for Ubuntu, a largely personal distribution, where Laptops are used ALOT. This switch is a HUGE issue for new users. I think this has got to be my top issue.

mcwest wrote on the 17 Mar 08 at 19:34
less power more money,more money more pleasure I agree!

eliaspoveda wrote on the 20 Mar 08 at 13:41
Why is this considered as low priority?!? I also have read that the progress is being slow.

I'm sure that Mark Shuttleworth has a laptop. He doesn't see the problem?

buggyman wrote on the 21 Mar 08 at 05:07
most important point to improve in my opinion - all laptop users with ubuntu will be VERY happy.

korvins wrote on the 23 Mar 08 at 17:21
That should definitely have the highest priority, because there is a lot of room to improve (See Xp and MacOS).

It is the main problem Ubuntu has for me. When I am in the train or in the bus, I have to use WinXp because it lasts one hour more, even after trying powertop, reducing the screen to the minimum dim, and enabling all the power saving options.

Apart from all those restrictions and with the better tuning I can get it stills sucks more power than WinXP or Mac. Why is that?

Compiz off, dim to the minimum, CPU frequency to the lowest, everything deactivated, and it stills sucks more than Xp.

We may propose this to google summer of code, since it looks to be a issue where all the help is needed.

mattycoze wrote on the 25 Mar 08 at 10:55
especially important for laptop users; I somewhat miss the 4.5 hrs battery time i got out of my HP with Vista installed (of all operating systems!).
ubuntu Linux runs like a charm, but the power management is nothing to write home about; 2.5hrs if lucky...

Get Greener Linux!

qense wrote on the 30 Mar 08 at 10:07
I fully support this idea. Maybe this can be improved with joining the Green Grid, like I suggested in idea #3100.

elitepenguin wrote on the 7 Apr 08 at 07:48
I probably would not say green, but I would like to be able to work on battery on Ubuntu as long as I can do this on windows.

On my Laptop (HP Compaq 8510p) I guess the main issue is that the GPU driver (radeonhd) does not correctly support the power management of the gpu. So we need better drivers..

johno wrote on the 11 Apr 08 at 00:59
What about using USB flash devices as a write-back cache for the hard disk, so that the hard disk doesn't need to be spun up for writes?

bochecha wrote on the 14 Apr 08 at 06:53
"you better use Ubuntu Linux."
Would be even better if it read "you better use Linux." ;)

However, improvements have already been made on this topic, but this is definitely a never-acheived goal.

Ubuntu already managed to make Linux user-friendly, it would be awesome if Ubuntu could make Linux environment-friendly :)

noahod wrote on the 17 Apr 08 at 04:06
I think the main problem with ubuntu power management is that it completly ignores GPU throttling. If I run aticonfig -set-powerstate 1 on my system I get an extra hour of battery life and much cooler running.

I also agree with spin down improvements so that things are preloaded into ram and swap is not used until it has to, with provision for USB/Flash caching as well.

Redrazor39 wrote on the 18 Apr 08 at 22:08
I am SO MAD that they put this as a Low priority development. THIS IS HORRIBLE!

At least put it as medium!

bochecha wrote on the 24 Apr 08 at 23:01
"I am SO MAD that they put this as a Low priority development. THIS IS HORRIBLE!

At least put it as medium!"

Come on, it's not like it was an issue lot's of people are voting for... :S

enigma_0Z wrote on the 28 Apr 08 at 19:29
I too would like to see the stuff from lesswatts.org levereraged.

After several tweaks (bluetooth off, writeback time increased, commit interval in mount options, etc.) I've managed to bring my idling power consumption down on my notebook as follows:

Laptop: Intel-based Dell Vostro 1400 w/ nVidia Graphics card. And yes, compiz is running.

Tweaks applied:
laptop-mode
hald-addon-storage
turn bluetooth off
HDA-intel power saving mode
vm_dirty_writeback_timeout
some other proc tunables
Cpu Governor: Powersave
Disable btnx

Lid open, display @ 50% brightness: 12-15 watts
Lid closed, (display off): 10-11 watts

Active, web browsing, etc.: 13-20 watts (it spikes a lot)
average according to powertop: 18-22 watts

Battery life estimates:
When on low power, 6.5 hours
When spiking at 22 watts and more: 3.5 hours
When being moderately used (18 watts or so) 4 hours

Basically, Hardy should definitely implement these tweaks.

AdminAdmin nand (Brainstorm admin) wrote on the 29 Apr 08 at 08:35
Some nice results already: check this comparison between Hardy and Vista power consumption.

Veichtlbauer wrote on the 7 May 08 at 12:38
Sorry, I dont want to sound disgrateful or something, but comparing with the monster known as Vista is not going to cut it. Comparing with already bad competition is not the goal I think. In the end, the goal is to strife for the best results possible, not beating Microsoft.
Fact is that power consumption in Ubuntu can be reduced HEAVILY by applying stuff found on lesswatts.org - this should somehow be integrated, preferrably easily configurable (talk power policy manager).

olskar wrote on the 12 May 08 at 10:38
The comparison has been made while the computers are idle=not being used? Therefore this comparison is good for nothing I think. If you have your laptop unplugged and not using it, it propably is turned of or in some kind of standbymode. An interesting comparison would be how the battery is drained when USING the computer (what it is designed for) to for example wordprocessing, gaming, movies e.t.c


Post your comment