Slashdot Mirror


Longer Laptop Battery Life under Linux

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!"

12 of 45 comments (clear)

  1. Not Just Laptops by Bad+to+the+Ben · · Score: 5, Insightful

    Why just the emphasis on laptops?

    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.

    1. Re:Not Just Laptops by cnelzie · · Score: 4, Insightful

      Since when do desktop PCs feature throttle capable PCs, adjustable brigthness Flatpanels and other software adjustable power settings? (Besides putting the PC into the ever energy wasting "Sleep" mode.)

      --
      If you ignore the other uses of a tool, does that make the tool less useful, or you less useful?
    2. Re:Not Just Laptops by Bad+to+the+Ben · · Score: 4, Informative

      AMD's Cool 'n' Quiet technology supposedly intelligently scales.

      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.

    3. Re:Not Just Laptops by ThinkingInBinary · · 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)users.sourceforge.net.

    4. Re:Not Just Laptops by arivanov · · Score: 2, Interesting

      Every Pentium 4 ever shipped has it. All Intel chipsets for Pentium 4 have it as well.

      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.

      --
      Baker's Law: Misery no longer loves company. Nowadays it insists on it
      http://www.sigsegv.cx/
  2. Not so great... by FunnyLookinHat · · Score: 4, Interesting

    It still has some issues with it being set to run or not. I run this on my ubuntu setup for my IBM T43 and if you unplug the laptop and plug it back in, it thinks it is still unplugged. Thus, the screen turns off after set ammount of time, etc. etc. (which I prefer to be always on if it's plugged in). And changing it's settings are buggy.

    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)

    1. Re:Not so great... by ThinkingInBinary · · 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.

  3. Random comments by belg4mit · · Score: 2

    No laptop to try it on, but the code seems to be not awful (though a file named
    "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.

    --
    Were that I say, pancakes?
  4. hard drive problems and pm by Anonymous Coward · · Score: 2, Interesting

    One of the issues I see coming up on the debian/gnome planets is developers whose notebook hard drives are dying prematurely because of all the parking/unparking of the heads etc. I have seen recommendations to disable power management on notebook hard drives for this reason and have done so on my own. The constant sound of the hard drive parking and unparking is annoying and on another thinkpad, i hear a regular soft beep every couple of seconds which is supposedly related.

    due to these issues (and slashdot stories of burned cd's and dvd's expiring prematurely) i have bought some USB flash keys and an external usb hard drive (which i keep off except when i use it) for backups!

  5. Not only laptops by ggambett · · Score: 4, Informative

    I've recently went through this, but not for a laptop, but a Pentium 100 with 64 MB, running FC3 acting as an ADSL router and Subversion server (!).

    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".

    1. Re:Not only laptops by ars · · Score: 2, Informative

      "set the hard drives to spin down after 30 seconds"

      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 so much.

      Also, with a 3.5inch disk, the energy used just to spin it up is more then the energy used in letting it spin. Approxmiately a spin up costs as much as 30 seconds of spin time. 2.5 inch disks are much lighter, and they are designed to read data before it's fully spun up.

      --
      -Ariel
    2. Re:Not only laptops by ars · · Score: 2, Informative

      "I don't understand... Since when does a head ever come in contact with a platter surface?"

      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 hear one) is bearings that died.

      Also, the hd parks it's heads before letting them touch the surface, so they touch a special area of the platter that has no data on it.

      --
      -Ariel