[8.04] battery runtime

Discussion in 'Linux' started by HCeline, Aug 2, 2008.

  1. HCeline

    HCeline

    Joined:
    Aug 2, 2008
    Messages:
    5
    Likes Received:
    0
    When I installed 8.04 and UNR on my One I realized, that my battery runtime dropped quite significantly. Running ubuntu with "common workload" (i.e. wlan, firefox3, pidgin, maybe a few image viewing) on lowest to 2-step up brightness, i get roughly 2 hours of runtime. On Linpus my battery gave me about 2h45m.

    My question is, if there's anything tweakable about battery runtime, or if anyone else experienced longer runtimes than I do. Since I spend quite much time in public transport, battery runtime is crucial for me and Acer still keeps me waiting for the 6-cell....
     
    HCeline, Aug 2, 2008
    #1
  2. HCeline

    casainho

    Joined:
    Jul 21, 2008
    Messages:
    88
    Likes Received:
    0
    I get the same result of you. I did put the processor frequency scaling working... do you have your working?

    Right now I am very worried about fan noise... I believe that here is some problem with software control of fan and it is always working :-(

    Also we can find a way to disable the wireless If we are not using it -- although you are running yours.
     
    casainho, Aug 2, 2008
    #2
  3. HCeline

    HCeline

    Joined:
    Aug 2, 2008
    Messages:
    5
    Likes Received:
    0
    Yes, I have frequency scaling enabled and i use to keep the setting on "ondemand", because fixing cpu speed at 800 MHz results in regular speeddowns when surfing websites with flash/heavy script-usage.

    In fact you should be able to turn wireless off with "iwconfig ath0 tx-power off" in a terminal, but but I'd also like having quite a bit more runtime even when using wireless - Linpus could deliver this.
     
    HCeline, Aug 2, 2008
    #3
  4. HCeline

    dmit

    Joined:
    Aug 2, 2008
    Messages:
    4
    Likes Received:
    0
    I have the same battery time dropdown with Ubuntu installed, CPU scaling enabled the way used in eeebuntu distro (removed powernowd, installed cpufreq etc). Still same 2 hours uptime...

    Disabling wifi is simple - just use the hardware wifi switch, although the led indication is not working it still does the RF-killing stuff).

    Linpus is widely using Moblin project to get better powersaving on Atom CPU and they declared 25% improvement in runtime compared to traditional distros. Moblin itself is a project initiated by Intel to get open source support for advanced powersaving features of their upcoming Atom CPUs. Still in doubt why Canonical being the most contributing participant to the project has not included the code in their ubuntu release yet....o_O

    Moblin uses idea of applying different "Power Policies" depending on situation, utilizes advanced Atom powersaving features and was developed mostly for the use on netbooks based on Intel Atom (www.moblin.org).
     
    dmit, Aug 2, 2008
    #4
  5. HCeline

    dmit

    Joined:
    Aug 2, 2008
    Messages:
    4
    Likes Received:
    0
    Just for reference:

    "...Linpus Technologies announced it will join Intel's "Moblin" Linux project, aimed at developing software for low-cost notebooks based on Intel Atom processors. The mature Linux distributor says its "Linux Lite" distribution runs 20 percent longer under batteries when using software developed by the Moblin project...."

    "...The centerpiece of Moblin is a graphical tool aimed at helping developers build optimized software within a three-tiered chroot-based build environment, using an optimized compiler and libraries. Since Atom chips use in-order execution, they benefit significantly from compiler optimizations, similar to pre-Isaiah Via architectures. Another available Moblin tool, Powertop, helps developers make their Atom applications more power-efficient, and is also fun to use to extend battery life on normal Core2 Duo laptops running Linux. Intel gives away the compiler and associated tools, with free support for 15 days, offering optional support for $600 a year...."

    "...Ubuntu Netbook Remix leverages Moblin technologies optimized for the Intel Atom processor. Intel and Canonical are working to create a next generation computing experience across a new category of affordable Internet-centric, portable devices; including Mobile Internet Devices (MIDs), netbooks, nettops and embedded devices based on Intel Atom processor technology. Canonical is a founding contributor to Moblin and will continue to work with Intel to ensure the best open source applications become available to users and OEMs through Moblin...."

    o_O

    The latter statement makes me much curious as I do not see any real Atom optimizations in UNR right now, and even the ume-config-netbook package supposed to contain some Atom tweaks has been recently removed from the project as "not needed anymore". Sounds quite strange as I do not see any real 'Atomic' powersaving improvements neither in Ubuntu Netbook Remix nor in full Ubuntu Desktop release.
     
    dmit, Aug 3, 2008
    #5
  6. HCeline

    foobar

    Joined:
    Aug 3, 2008
    Messages:
    8
    Likes Received:
    0
    My AA1 with 1.5 GB of RAM (amount of it affects power usage), Ubuntu 8.04.1 with just basic terminal in X running (minimum screen brightness) and WLAN active but system otherwise idle shows 9.5 Watt power usage on powertop at minimum without any tuning. I have been able to drop it to 8.5 Watts by putting the following in /etc/rc.local:

    Code:
    #!/bin/sh -e
    
    # Set audio to power save after 15 seconds of idle
    # After this, couple first seconds of audio can be missed!
    echo 15 > /sys/module/snd_hda_intel/parameters/power_save
    
    echo 1 > /sys/devices/system/cpu/sched_smt_power_savings
    cat /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate_max > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate
    
    ethtool -s eth0 wol d
    
    # Causes external USB ports do become unusable, saves ~0.15W?
    # rmmod uhci_hcd
    
    # Agressively lower USB device power usage on the background
    nice /bin/sh -c 'while : ; do sleep 60 ; for i in /sys/bus/usb/devices/*/power/level ; do echo auto > $i ; done ; done' &
    
    exit 0
    Notes: I've seen once even 8.3W, but in practice power usage hovers around 8.5-8.7W in an otherwise idle system. I doubt that the powertop power consumption reading varies a bit depending on the battery charge level. What I find really strange is that disabling compiz (by putting WHITELIST=none to ~/.config/compiz/compiz-manager) reduces the amount of wakeups, but seems to increase power usage. Go figure.
     
    foobar, Aug 4, 2008
    #6
  7. HCeline

    2manydjs

    Joined:
    Jul 16, 2008
    Messages:
    300
    Likes Received:
    0
    Thanks for the tip. Have you noticed any negative effects from the USB entry?
    Does anybody know what PowerTOP reports on the Linpus install?
     
    2manydjs, Aug 4, 2008
    #7
  8. HCeline

    foobar

    Joined:
    Aug 3, 2008
    Messages:
    8
    Likes Received:
    0
    rmmod entry essentially disables the user-accessible USB ports, and it's commented out in the code I sent, as well as on my tests. It makes sense only if you're not even planning to handle USB usage in a reasonably automatic way.

    Regarding the USB power management code... I've tried it with a memory stick and a Bluetooth adapter, and I haven't noticed any ill effects, but I can't say anything about other devices.
     
    foobar, Aug 4, 2008
    #8
  9. HCeline

    2manydjs

    Joined:
    Jul 16, 2008
    Messages:
    300
    Likes Received:
    0
    Powertop shows me a power usage of about 12 watt with an idle system and wlan connected.. More than 40% of the of the wakups are caused by wifi usage. Is there some way to tweak this? I like to go down to 8,5 watts! (haven't tried the rc.local tip yet)
    Edit
    BTW my processor activity suggests my machine is running at 800 mhz. Or am I misinterpreting?
    Code:
    Cn                Avg residency       P-states (frequencies)
    C0 (cpu running)        (98.9%)         1.60 Ghz     0.0%
    C1                0.0ms ( 0.0%)         1333 Mhz     0.0%
    C2                0.0ms ( 0.0%)         1066 Mhz     0.0%
    C3                1.7ms ( 1.1%)          800 Mhz   100.0%
     
    2manydjs, Aug 5, 2008
    #9
  10. HCeline

    foobar

    Joined:
    Aug 3, 2008
    Messages:
    8
    Likes Received:
    0
    Are you sure your display brightness is turned to minimum, and have you waited for several minutes and looked what's the lowest wattage reading you can see? If that's the case, you have some major power hog in your machine, because mine rarely goes over ten watts even on a moderate load.
     
    foobar, Aug 5, 2008
    #10
  11. HCeline

    dmit

    Joined:
    Aug 2, 2008
    Messages:
    4
    Likes Received:
    0
    Please check this post, there are some tuning instructions based on original Linpus setup. And some of them are quite similar to those above in this topic:

    viewtopic.php?f=28&t=164&start=160#p5329

    Not sure if startup time is really faster then before - 40 sec till GDM login screen appears, but it fixes some SD card and power issues as well.
     
    dmit, Aug 5, 2008
    #11
  12. HCeline

    aabxx

    Joined:
    Aug 9, 2008
    Messages:
    13
    Likes Received:
    0
    I have done your tweaks + others, use no swap space, disabled any unneeded services etc. but I only went from 9.5 watts to 9.0 watts. Either you did something freaky somewhere that I cannot replicate or it's simply a matter of different hardware. I seem to recall there's two types of SSD-cards, one slower and one faster? Maybe that can account for 0.5 watts. I'm using a norwegian machine, with norwegian keyboard (and a big return key :D), so there might be more differences too.

    Anyway, would be interesting if more people posted their numbers.

    I'll try tweaking more, but I quickly reached 9.0 watt, and from then on, more tweaking never really helped.
     
    aabxx, Aug 9, 2008
    #12
  13. HCeline

    aabxx

    Joined:
    Aug 9, 2008
    Messages:
    13
    Likes Received:
    0
    The watt usage at idle desktop with included OS is 9.3W. A few times going as low as 9.1W.

    If these numbers are accurate than basically our tweaked ubuntus can match or even be slightly better than the default system .
     
    aabxx, Aug 13, 2008
    #13
  14. HCeline

    foobar

    Joined:
    Aug 3, 2008
    Messages:
    8
    Likes Received:
    0
    Is that "lowest value you see over a while" (like five minutes or so) on a machine with its display turned to minimal brightness? If so, it's pretty interesting, that was my method of trying to figure out power usage (filter most of random system activity and other power drain from the results).
     
    foobar, Aug 14, 2008
    #14
  15. HCeline

    aabxx

    Joined:
    Aug 9, 2008
    Messages:
    13
    Likes Received:
    0
    It was default system idle for a while at lowest brightness. Not 5 minutes though but I don't believe that makes a difference.

    I've got my debian down to 7.9 at idle :) I'm no supertweaker but debian is by default less resource intensive than ubuntu so it wasn't difficult. Boot time is 30 seconds, and I haven't even tried to tweak that in particular (but other tweaks do help here as well).

    Btw, I can just see foobar running and installing debian now. Maybe he'll beat my number as well. Which would be cool. I'd be interested in seeing how low you can go. Maybe one of those small linux distros which use older kernels could be even better to use? If they work well at all. As far as I've been led to believe, the debian kernel I'm using doesn't even have the same support for atom as does the newer kernel used in ubuntu...

    Personally, I'm more concerned about making something useful out of my debian at this point. I'm obsessed with finding the best collection of applications for my use on this low powered machine. It's fun to explore alternative applications which I wouldn't have looked at on my desktop machine.

    So much fun, this machine :)
     
    aabxx, Aug 14, 2008
    #15
  16. HCeline

    foobar

    Joined:
    Aug 3, 2008
    Messages:
    8
    Likes Received:
    0
    I suspect that these watt readings can vary considerably (5-10 percent or so) between different battery charge levels (like 95% vs 85% vs 75% vs 50% full) and cause this sort of an illusion that some things tested at correct time look better than they actually are...

    I'm way too lazy to experiment with Debian just to try it, anyway. ;)
     
    foobar, Aug 14, 2008
    #16
  17. HCeline

    jbesada

    Joined:
    Aug 18, 2008
    Messages:
    25
    Likes Received:
    0
    Mine has a much lower battery life (around 1 1/2 hours), although it should be taken into account I am using a 3G USB stick I imagine is having a great impact on battery.

    I wanted to evaluate it, and therefore installed powertop, just to see an error (i am translating from spanish) regarding the lack of capability to measure power usage through acpi. It provides data regarding interrupts, but no power (or current) consumption estimate. I am starting to think maybe I have some problem regarding power usage and acpi configuration. do you have any ideas of what could I investigate?

    Thanks in advance
     
    jbesada, Aug 18, 2008
    #17
  18. HCeline

    jbesada

    Joined:
    Aug 18, 2008
    Messages:
    25
    Likes Received:
    0
    after restarting the computer powertop is providing me with data regarding power consumption, now I am between 10.5 and 11.5 W, ... I will need to find out the problem ...
     
    jbesada, Aug 18, 2008
    #18
  19. HCeline

    aabxx

    Joined:
    Aug 9, 2008
    Messages:
    13
    Likes Received:
    0
    I'm getting 7.3 watts with wifi turned off. I used it at uni for first time today. Not much difference between text editing and idle really. i got more than 3 hours of battery life today :) So basically this machine can be used for 4 class hours (45 mins) which is enough for me. actually with active power saving, you could manage 4.5-5 class hours as a lot of the time you're not really using the machine in class.

    This reporting was fairly consistent but I did notice when battery was nearing end, that power usage went up. So I agree it goes up and down with different charge. This observation suggested to me that maybe it is typical that at the end of the charge usage will be relatively high. Otherwise the difference has not seemed big.
     
    aabxx, Aug 22, 2008
    #19
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.