Longer Laptop Battery Life under Linux 45
ThinkingInBinary writes "Want easier power management and better battery life on your Linux laptop? Try powermgr, a daemon that automatically (or manually, if you choose) switches your system between power "profiles". It has support for ACPI (of course) as well as Asus, Dell, IBM, Omnibook, and Toshiba extensions. It can control CPU governor, screen brightness, wireless card, laptop mode (via services), runlevel, services, and more, and can switch based on AC adapter and battery state, load average, temperature, running processes, and more. Tests indicate that it can prolong battery life by 20 minutes to almost two hours, depending on what the system is doing. Try it out!"
Re:I'm Running Gentoo... (Score:1)
Oh, you're not the only one! ;-)
Personally I prefer to run compiles overnight while it's plugged in, but... to each his own. BTW, powermgr is great at minimizing the impact of compilation to your battery life. Just set PORTAGE_NICENESS to a positive value and then select a CPU governor that ignores nice time. Then compiles won't make your CPU run faster, but your own processes will.
Not Just Laptops (Score:5, Insightful)
Wasted energy from a wall outlet is still wasted energy. Transferring the energy-saving mindset to the desktop would likely have some positive results, especially for all those people using a 3GHz machine to play Freecell and send a few emails.
Re:Not Just Laptops (Score:4, Insightful)
Re:Not Just Laptops (Score:2)
Re:Not Just Laptops (Score:5, Informative)
In addition, you can already do things such as underclock video cards, and disable certain boards such as NICs and sound cards via software. I can't see why it couldn't be added to a power management function.
You are correct about the flatpanel one AFAIK.
Re:Not Just Laptops (Score:3, Informative)
I'd be glad to add features to do such things to powermgr; just tell me what package is required and the command to execute, and I'll add support for it. Personally, I only have an Asus laptop, so the Dell, IBM, Omnibook, and Toshiba features were mostly added by reading the man pages for the respective tools. Thus I would need a good description of how to activate a feature before I can implement it.
Once you know how, post it in the SF.net tracker, or, if you can't, email it to me at thomastuttle(at)use
Re:Not Just Laptops (Score:2)
Re:Not Just Laptops (Score:2)
I have an Athlon64 (desktop) with C&Q, and it didn't do that on its own. I had to set up cpuspeed daemon to do that. It is quite effective. When idling at 1GHz, the CPU draws about 21W, as opposed to 67 when running at 2GHz.
Furthermore, it seems to me that C&Q is more about the CPU fan speed than just scaling. My system does automatically slow the fan when the CPU is cool (~3400-4000 RPM), and it speeds it up when the chip heats up (up to ~5500 RPM, very very noisy)
Re:Not Just Laptops (Score:2)
Re:Not Just Laptops (Score:2)
Re:Not Just Laptops (Score:2)
Re:Not Just Laptops (Score:2)
At the very least, users concerned about power management should make sure that the idle loop uses HLT (if that works, which it should on most modern PCs), and a little poking around like here for old Athlons [tldp.org] and you can usually find ways to kick your computer into a much lower-power state.
And I cannot understand why people think Sleep mode
Re:Not Just Laptops (Score:2)
Since at least last fall. Motherboard/chipset combos from several manufacturers support CPU clock throttling for Pentium M on the desktop. A couple of examples are DFI's 855GME-MGF and AOpen's i915GMm-HFS. There's another AOpen model (name escapes me) that also supports independent FSB clock throttling.
Re:Not Just Laptops (Score:2)
Shame that sleep mode (suspend to ram) doesn't work for me.
Re:Not Just Laptops (Score:3, Interesting)
Same for Pentium 4 derived Xeons.
Same for Via though it really starts to play from Nehemia core upwards. That is if you are interested in dropping your power consumption from 7W to 1W.
Same for Opteron, but there is no proper SMP support in most motherboards. Dunno about Duron. Do not smoke that...
I run it on everything even servers. Drops idle power consumption by up to 75-80W per CPU.
Re:Not Just Laptops (Score:1)
So if you use an Athlon or Duron system I suggest to give this tool a try.
Stefan
Re:Not Just Laptops (Score:1)
There's no particular emphasis on laptops; it's just that laptops are the main use for it. It would probably work just as well on a desktop, but it would be less useful, because its main "feature" is the ability to automatically select profiles. If you just want to set up a CPU governor in the kernel to keep your CPU cooler when idle, you don't need powermgr. Also, more laptops have proprietary (non-ACPI and non-cpufreq) systems with nonstandard driver interfaces, and po
Re:Not Just Laptops (Score:1)
Woooh! 20 minutes more time for Slashdot... (Score:1, Troll)
Not so great... (Score:4, Interesting)
It does get me over 3 hours of battery life, however, with my centrino processor which I really can't complain about. And with full brightness I still get 2 hours so long as I'm not doing any gaming or anything (DVD = over 2 hours low brightness)
Re:Not so great... (Score:2, Informative)
This is probably due to a timing issue where powermgr is still checking the system when you plug it back in the second time; I'll take a look at it. Please post bug reports on the SF.net tracker or, if you don't have a SF.net login, email them to thomastuttle(at)users.sourceforge.net. I'd be glad to try to fix any problems you have.
Random comments (Score:3)
"include" for a few subs out in its own place on the drive is questionable). A
direct link on the sf site instead of a hlaf-dozen clicks would be nice. The
biggest thing of note is that it seems to be slightly Gentoo specific:
#!/sbin/runscript in powermgr, and the use of an external binary named osd_cat.
Re:Random comments (Score:1)
Thanks. ;-) The code is pretty good, given that it was my first attempt at a not-tiny, not-CGI project in Perl. Sorry about the linkage, but it saves me from having to update the link on the homepage (powermgr.sf.net) every time I put out a new release.
I'll take a look at the Gentoo-specific issues; if you could file a bug report on the tracker or, in lieu of that, send me an email at thomastuttle(at)users.sourceforge.net, I'll probably get to it sooner.
hard drive problems and pm (Score:2, Interesting)
due to these issues (and slashdot
Not only laptops (Score:5, Informative)
Essentially I activated the "laptop mode" kernel variable (/proc/sys/vm/laptop_mode or similar), set the hard drives to spin down after 30 seconds using hdparm, killed all the unneeded services, and cleaned up the crontab; sa in particular was causing the hard disks to spin up every 10 minutes, which I wanted to avoid. This took me a while to figure out.
Now I have a very silent, very cool (as in temperature) "server".
Re:Not only laptops (Score:1)
Re:Not only laptops (Score:2)
Re:Not only laptops (Score:1)
Re:Not only laptops (Score:3, Informative)
You better have good backups. Desktop hard disks aren't designed to spin up/down that often. Remember each spin up and down means contact and rubbing on the head surface.
I'd be suprised if the hd lasted more then a year.
Laptop hd's are (hopefully) designed with loading technology that move the heads aways from any contact at all with the surface. They do that a: for spin up/down and also b: so you minimize the risk of a head slap, what with laptops moving s
Re:Not only laptops (Score:1)
In my experience, that usually creates a truly frightening sound and an extreme amount of data loss...
Re:Not only laptops (Score:3, Informative)
Every time you turn it on and off. Really. It rubs on the surface until the platter spins fast enough to provide lift (like a wing) for the head. That's why I keep mine on 24x7. IBM patented a head load unload safety ramp to stop this from happening. But as far as I know no one else uses it.
"In my experience, that usually creates a truly frightening sound and an extreme amount of data loss..."
No, the noise (if you hea
Re:Not only laptops (Score:2)
Re:Not only laptops (Score:2)
The heads could still stick to the safe area, but a good whack should unstick them.
noatime (Score:2)
Re:noatime (Score:1)
The laptop-mode-tools script that powermgr calls (or that you use, without powermgr) can and should do this automatically.
Re:Not only laptops (Score:1)
Since very few people run desktop and server drives with frequent start/stops, manufacturers have little experience with it. It's one of those specs like MTBF that's pretty theoretical, and, worse, impossible to prove unless you run a large population with frequent start/stops, since there's no field dat
Re:Written in perl? (Score:1)
Ruby?! Now thats a foriegn language to us all.
better use powersave (Score:1, Interesting)
it has a nice front end - namely kpowersave.
Features:
1. Auto suspend when inactive after x minutes
2. hard disk settings
3. all CPU governors are derived from kernel
Nifty idea (Score:1)
Alternative: Laptop Mode (Score:1)
http://www.xs4all.nl/~bsamwel/laptop_mode/ [xs4all.nl]