The Notebook Review forums were hosted by TechTarget, who shut down them down on January 31, 2022. This static read-only archive was pulled by NBR forum users between January 20 and January 31, 2022, in an effort to make sure that the valuable technical information that had been posted on the forums is preserved. For current discussions, many NBR forum users moved over to NotebookTalk.net after the shutdown.
Problems? See this thread at archive.org.

    Linux + Battery life, possible?

    Discussion in 'Linux Compatibility and Software' started by notquitehere188, Aug 2, 2007.

  1. notquitehere188

    notquitehere188 Notebook Enthusiast

    Reputations:
    0
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    5
    i have read about that crazy program for optimizing battery in linux, powertop or somesuch. Does this mean that i could use linux without losing battery life, or just get better battery than linux usually does?
     
  2. lupin..the..3rd

    lupin..the..3rd Notebook Evangelist

    Reputations:
    154
    Messages:
    589
    Likes Received:
    0
    Trophy Points:
    30
    Can you repeat that in the form of a coherent sentence please? I have no idea what you just asked.
     
  3. Romanian

    Romanian Notebook Evangelist

    Reputations:
    41
    Messages:
    448
    Likes Received:
    0
    Trophy Points:
    30
    Well, it's impossible to run your computer without losing battery life. That would mean no power is coming from your battery. Which means no power goes to your system. Concluding that you can't power on your system without power. So, I would expect if said program does exist, it would probably just optimize your notebook's battery for Linux.
     
  4. noahsark

    noahsark Notebook Evangelist

    Reputations:
    159
    Messages:
    687
    Likes Received:
    0
    Trophy Points:
    30
    Running linux, rather than windows, had no adverse effect on my notebook's battery life.
     
  5. t12ek

    t12ek Notebook Consultant

    Reputations:
    9
    Messages:
    190
    Likes Received:
    0
    Trophy Points:
    30
    I think what he was referring to was the fact that many people report lower battery life on their laptops when using Linux as opposed to Windows. As in, their laptop battery will last say, 3 hrs. in Windows, but only 2 hrs. when running Linux.

    As for the program he's referring to... I have no idea...
     
  6. noahsark

    noahsark Notebook Evangelist

    Reputations:
    159
    Messages:
    687
    Likes Received:
    0
    Trophy Points:
    30
    Right. I simply reported that I didn't have that problem. OS made no difference to my battery life. I know that cpu frequency scaling is built into the kernel, I would figure that's the chief culprit, next to the GPU. I know that ATI has powerplay working in linux, I don't know the nvidia equivalent, but seeing as their drivers are usually better than ATIs, I would be surprised if they hadn't implemented that feature for linux.

    I don't think Powertop will help you much w/ battery life. It just shows you what's using the power. You still have to figure out how to turn off that thing or reduce it's power consumption yourself. http://www.linuxpowertop.org/
     
  7. lemur

    lemur Emperor of Lemurs

    Reputations:
    524
    Messages:
    1,024
    Likes Received:
    0
    Trophy Points:
    55
    Well, if you don't install a CPU throttler in Linux your CPU is going to run at %100 all the time. It may vary from distribution to distribution and from motherboard chipset to chipset but that was certainly the case when I was running Debian on my Inspiron 600m: no throttler means %100 CPU all the time no matter what.

    Typically Windows installation have the throttler already there.

    The utility powertop is something new. It is supposed to help you find which applications are causing a power drain while you are on battery. For instance if you have some service running in the background that polls the HD too often, that defeats any kind of aggressive HD power management you may have set and so you want to turn that service when you are on the battery. I don't know how it works. As usual, google is your friend. [Edit: or even better, noahsark is your friend. :)]
     
  8. Pitabred

    Pitabred Linux geek con rat flail!

    Reputations:
    3,300
    Messages:
    7,115
    Likes Received:
    3
    Trophy Points:
    206
    Wait, what? 100% CPU? You mean at full frequency, right? It won't run at full utilization.
     
  9. lemur

    lemur Emperor of Lemurs

    Reputations:
    524
    Messages:
    1,024
    Likes Received:
    0
    Trophy Points:
    55
    Right, full freq. Not full load. Sorry about the ambiguity.
     
  10. band-aid

    band-aid Notebook Consultant

    Reputations:
    1
    Messages:
    128
    Likes Received:
    0
    Trophy Points:
    30
    Linux wouldn't be very appealing if ran at 100% cpu utilization now would it :D
     
  11. Patrick

    Patrick Formerly beat spamers with stiks

    Reputations:
    2,284
    Messages:
    2,383
    Likes Received:
    93
    Trophy Points:
    66
    cpufreq-utils FTW
     
  12. lemur

    lemur Emperor of Lemurs

    Reputations:
    524
    Messages:
    1,024
    Likes Received:
    0
    Trophy Points:
    55
    Yep. I've always used cpufreq-utils as part of my toolset to manage the CPU frequency. I don't know if there's anything else better out there competing with it but I'm starting to think the first reaction to someone who complains about battery life in Linux would be to say "show me the output of cpufreq-info."
     
  13. aaa

    aaa Notebook Consultant

    Reputations:
    6
    Messages:
    197
    Likes Received:
    0
    Trophy Points:
    30
    Have you tried and gotten less battery life in Linux? Apparently some people were, and we'd have no idea why, since apparently it hasn't happened to any of us. Were they using the wrong video drivers? Didn't have cpufreq enabled? Some other mysterious reason?

    Anyways, the effects of powertop should be seen in the next Ubuntu, 7.10. It just points out programs and settings that drain battery, They're fixing alot of battery-draining bugs in those programs. Presumably all these improvements will be put into the next release. You can run it yourself right now, but it would involve lots of recompiling.
     
  14. jeffsmythe

    jeffsmythe Notebook Geek

    Reputations:
    97
    Messages:
    98
    Likes Received:
    0
    Trophy Points:
    15
    The program powertop was released by intel, and it is meant to work like regular 'top', only, it lists precesses that are causing the CPU to wake up from a low-power state. It profiles the CPU and returns information about how often it was in each power saving state, and how often it was woken up (any by which process).

    So powertop will not actually save any battery life. What it will do, however, is identify the applications/processes that are preventing the CPU from running efficiently. Firefox is a known hog in this sense. The idea behind this tool is so that application developers, e.g., mozilla foundation, can make their apps be as efficient as possible.

    To use powertop, you should have a >= 2.6.21 kernel installed with TICKLESS enabled.
     
  15. ebrius

    ebrius Notebook Enthusiast

    Reputations:
    0
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    5
    Yes, cause then it would be windows :D

    But seriously, I've been using openSuSe 10.2 on my Thinkpad x61, and my battery life is better then when I run Vista. I've only had it a couple of days though, so I haven't gotten a chance to test out XP
     
  16. dickeywang

    dickeywang Notebook Consultant

    Reputations:
    4
    Messages:
    140
    Likes Received:
    0
    Trophy Points:
    30
    I know quite a few people who has the same experience with vista.
    Anyway, if I remember correctly openSUSE 10.2 by default comes with 2.6.18 kernel, so you should see more battery life if you switch to 2.6.21 or higher according to www.linuxpowertop.com:
     
  17. ebrius

    ebrius Notebook Enthusiast

    Reputations:
    0
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    5
    Hm, I'll have to try that out.

    I've gotten a chance to install XP Pro on my laptop now, it gets 6-7 hours of battery life when I have the display turned down low, not the lowest, usually one or two clicks above.
    Here are the results I've gotten from the different OSes (this is on casual use, web browsing and such):
    Vista Home: 4-5 hours
    SuSe (it is the 2.6.18 kernel btw): 5-6 hours
    XP Pro: 6-7

    Those are just rough numbers, note that when I was using Vista, it had all the bloatware installed, but my XP Pro install was clean.
     
  18. Paul

    Paul Mom! Hot Pockets! NBR Reviewer

    Reputations:
    759
    Messages:
    2,637
    Likes Received:
    0
    Trophy Points:
    55
    Well, I'm looking forward to Gutsy then. Currently (with 2.6.20), my CPU won't go below 1GHz, and I guess this might be why. Or maybe it's because the Core Duo 2.16 only goes down to 1GHz with Speedstep.
     
  19. Lysander

    Lysander AFK, raid time.

    Reputations:
    1,553
    Messages:
    2,722
    Likes Received:
    1
    Trophy Points:
    55
    That's your problem, they're locked at 1GHz.
     
  20. drbugs

    drbugs Notebook Consultant

    Reputations:
    19
    Messages:
    179
    Likes Received:
    0
    Trophy Points:
    30
    The kernel has power management stuff in it, in the ACPI section. It also has several govenors for managing cpu freqs. I use the ondemand govenor (I've been running gentoo on a compaq presario 2100 for a bit over four years), and I get pretty decent battery life, just a bit less than I do with XP. KDE has support for the kernel based power managemnet stuff. I don't have my laptop here, so I can't dig up the specifics, but in the KDE control panel, it's under the power management applet. You will need ACPI enabled to use it.

    Here's a good guide to powermanagement on laptops. It's on the Gentoo site, but a lot of it will work on any linux.

    Off the top of my head, you will need ACPI support, the module for your cpu (mine is an athlonXP mobile, so I have the powernow-k6 (I think) module loaded. This is the thing that actually interacts with your CPU to play games with the freq scaling. You will need to have the govenor loaded too. The ones I tend to use are mostly the ondemand, but I have tried the conservative one. For what I do, the conservatitve is too slow to ramp up the cpu (lots of compilations and the like). Loading the govenor can be done by KDE and Gnome (not sure where in gnome, but I know it can). You can also manually set it in /sys/devices/system/cpu/cpu0/cpufreq/current_scaling_gov (or something like that. I don't have my notebook with me).

    If you look in /sys/devices/system/cpu/cpu0/cpufreq you can see the kernel stuff related to cpufreq scaling. Also you can check your current speed in /proc/cpuinfo

    I can try and dig up more stuff tonite if anyone is interested. Power management works pretty darn good on linux, almost as good as windows in my experience. It's come a long way, but there is still an occasional problem ACPI implementation by the notebook vendors.

    Randy