Slashdot Mirror


Getting Better Battery Life w/ Linux?

Nuclear Elephant asks: "After a little hacking, Linux has been running great on my Thinkpad T30 for about a year now. I can talk to my cellphone and bluetooth devices, do all kinds of neat hacking on wireless, and just about everything you'd expect to be able to do from a Windows machine, except make the battery last. Even after the standard optimizations (like cpufreq, laptop_mode, brightness, turning off useless processes, etc.) my battery still only lasts about an hour running under Linux as opposed to 2 1/2 hours in Windows. Has anybody come up with some innovative battery conservation ideas for Linux? It seems to be the only thing lacking in this fine operating system." What kernel options might one look into, for saving laptop battery power? Also, what desktop settings (both for Gnome and KDE) would work best, for this situation?

17 of 69 comments (clear)

  1. Answered your own question. by yotaku · · Score: 5, Insightful

    "and just about everything you'd expect to be able to do from a Windows machine, except make the battery last."

    Sounds like you basically answered your own question. Use the best tool for the job. If windows allows you to do all that AND make the battery last - then maybe you should just use windows.

    1. Re:Answered your own question. by RzUpAnmsCwrds · · Score: 4, Insightful

      I always hate this.

      Someone asks, "how can I make my > work better"? Someone replys "get a >". Unless the situation is extreme ("how can I make linux run better on my 286?"), the original poster doesn't *want* information on other products. If they had, they would have asked "what notebook should I get?".

      Macs may be great little UNIX boxes. I personally have a $300 Armada M300 off of eBay. It is 3.2lbs and very small, PIII 600, 384MB SDRAM, ATI GPU (slow 3D, but fine for 2D), 13GB HDD. It runs about 2 1/2 hours (under Windows). Linux is considerably shorter, perhaps because SpeedStep (that throttles down your CPU voltage and clock) isn't working.

      Some people said to turn off graphical effects. This may help, but, in reality, they probably don't make a whole lot of difference.

      Here are some tips:
      - Get your CPU's clock throttling enabled. I believe that "longrun" can do this. Particularly on AMD CPUs (also on Pentium-M) you can choose 4 different clocks. AMD CPUs can also dynamically adjust their clock based on CPU load (they call it "PowerNow!").
      - Decrease your screen brightness. This is a biggie. The backlight sucks a lot of power.
      - Disconnect any optical drives (you probably don't have them connected very often anyway)
      - Set your HDD spin-down options
      - Suspend your computer when you aren't using it
      - Charge your computer whenever you can (the less you drain Li-Ion batteries, the longer they last - there is no "memory effect", so *don't* drain them fully)
      - Get a new battery or replace the cells in your battery. Many batteries use 18650 cells which can be purchased on eBay for around ~$30 for 8.

  2. Use less power by redog · · Score: 3, Informative

    If you use and unload kernel modules, wireless NIC, sound card, hotplug, usb etc etc... your laptop should consume a bit less power, also look to see if your laptop supports processor frequency scaleing

  3. the usual... by ajagci · · Score: 3, Informative

    Have the harddisk spin down (e.g., hdparm, noflushd), dim the screen, lower the processor speed (e.g., longrun). In general, it shouldn't take a lot of effort to get similar battery life using Windows and Linux.

    If you buy your machine from a vendor that supports and pre-installs Linux (e.g., emperorlinux.com), they probably will take care of the necessary configuration for you.

  4. Smller WM by camelrider · · Score: 3, Interesting

    A WindowManager that uses less cup and graphics horsepower may help with your battery life. IceWM is available in many distros and you can run Gnome or KDE from within IceWM when you need to.

  5. tpctl for thinkpads by doja · · Score: 5, Informative

    Since you have a Thinkpad, you should download and install tpctl. It comes with a daemon called apmiser that controls power use according to CPU usage.

    1. Re:tpctl for thinkpads by aparrish · · Score: 3, Informative

      Apmiser works really well on my X24. I usually get between three and four hours on a charge, as long as I don't "emerge" and compile any huge Gentoo source packages while it's unplugged.

  6. Graphics card by ballwall · · Score: 3, Interesting

    I've got a T40, probably the same graphics card as the poster (Mobility Radeon 7500) and I can't figure out how to enable the power saving features under Linux. I know when I'm in windows power saving the vid card gives me a huge longetivity boost life.

    Anyone know how to do that with Linux?

    1. Re:Graphics card by PD · · Score: 3, Informative

      Those features are probably not supported. There are people working on them, but at best you'll have to compile your own copy of XFree86. I only know this because I spent a couple hours yesterday getting DRI to work on my T30. I read a lot of docs.

  7. I know it's not Linux specific but... by Will2k_is_here · · Score: 3, Informative

    Don't forget to decrease the brightness and contrast of your display. I found this can add an extra half an hour or so to your battery life.

    And, as was hinted at by others, take off anything that will cause your processor to do more work than you need. This means removing big GUI's, and use basic software (like anything but Gnome and KDE, Firefox instead of Mozilla Suite, Mutt instead of Evolution, etc.)

  8. thinkpad utils by tellurian · · Score: 5, Informative
    Go get these from Dag's site:
    • kernel-module-thinkpad
    • tpctl
    • configure-thinkpad
  9. Read the Mini-Howto -- Esp Syslog section by Snerdley · · Score: 5, Informative

    There is the "Battery Powered Mini-HOWTO" up on the Linux Documentation Project site: http://www.tldp.org/HOWTO/Battery-Powered/index.ht ml

    Of course, you probably looked there first before you asked Slashdot :)

    Seriously, read the section on syslogd(8). In addition to their suggestions, we have also setup a central log server which allows logging to only go over the network, and not to the local disk at all.

    If you are in a LAN (or wireless) environment, you might want to consider that although the wireless might cost you more powering the NIC than it would hitting the disk (after you disabled syncing).

  10. pcmcia by nri · · Score: 3, Interesting

    service pcmcia stop
    service lpd stop
    hdparm -E 4 /dev/dvd
    hdparm -S 12 /dev/hdaX

    --
    if :w! doesn't work, try :!cvs commit -m""
  11. Re:HD sleep by jthj · · Score: 4, Informative

    You could use a loger like metalog which caches writes to reduce the amount of hard drive use. Also setting the noatime option in fstab will reduce writes to do the disk when you are browsing directories. This will not help the fact that the drives always spinning though. To avoid that you would pretty much need to turn of logging which may not be a good idea. Anyway that's just my .02

  12. ACPI by Fluffy+the+Cat · · Score: 4, Informative

    One of the single best things you can do is enable ACPI support, which enables higher levels of CPU power saving when idle. This gives me about half an hour of extra battery power, but suspend support is still somewhat flaky.

  13. Inverse results by consolidatedbord · · Score: 3, Interesting

    I currently run Linux on my Dell Inspiron 8200 and get about 1 hour more battery runtime than in Windows XP or 2000. Stock, with OEM Windows XP I would peak at about 2.5 hours of battery time, as opposed to peak of 3 hours running Linux. I have since used the i8k-tools (obviously not for Thinkpad) to control things like temperature thresholds to trigger the fans. Not sure about your laptop, but mine has 2 fans, so spinning those down if possible saves a lot of battery time. With the fans running at about 5k RPM as opposed to 9K RPM (full speed) I easily save 45 minutes, making my top peak with Linux damn near 4 hours. Your best bet to save battery life would have to be to find some thinkpad-specific software to slow the fans down and speed up at given temperatures. (not sure if that tpctl can do that or not)

    --
    while true ; do echo this is my sig; done
  14. Fans are not likely the issue by Andy+Dodd · · Score: 4, Informative

    Given that the default fan thresholds of the 8200 are VERY aggressive w.r.t. power management (i.e. they run the CPU *damn hot* and you should NOT be slowing down the fans compared to the BIOS defaults), I don't think this is the reason for your long battery life with the 8200.

    But I can confirm that my battery life with my I8200 is comparable to, if not better than, under Windows.

    Power management features I use:

    cpufreq (Both speedstep-ich and p4-clockmod as modules - Load speedstep-ich, set the "powersave" governor to step down the voltage/speed, then load p4-clockmod to drop the clock speed even more. I've been running my P4-M 1.7 at 600 MHz lately, it's more than responsive enough for AIM and web browsing.)

    nvclock (Does not support mobile chipsets out of the box, but I disabled the code that causes nvclock to not touch mobile chipsets and it works fine on my GeForce 4 Go 440. I'm assuming the devs of nvclock disabled this because it's an overclocking tool and overclocking mobile GPUs is a bad idea, they forgot that mobile users might actually want to UNDERCLOCK their GPUs...)

    Get LOTS of memory. Enough to allow you to disable swap. If you have swap enabled, it seems that even with an idle machine, it'll page stuff in/out just enough to FUBAR any attempts to make the HD sleep.

    --
    retrorocket.o not found, launch anyway?