ACPI

Lamont R. Peterson lamont at gurulabs.com
Wed Aug 2 17:17:11 UTC 2006


On Wednesday 02 August 2006 10:03am, Andy Green wrote:
> Lamont R. Peterson wrote:
> > I would love to see battery life with Fedora right up there with the
> > other Linux & BSD systems.  I don't know what to try, either.  So far,
> > I've just resigned myself to the fate that battery life is just going to
> > be shorter with Fedora.
>
> Just an idea -- on this laptop at least the ACPI reports the current
> being drawn from the battery with good resolution, eg, when plugged in
> and charged
>
> cat /proc/acpi/battery/BAT1/state
>
> cat /proc/acpi/battery/BAT1/state
> present:                 yes
> capacity state:          ok
> charging state:          charged
> present rate:            0 mA
> remaining capacity:      4500 mAh
> present voltage:         12493 mV
>
> and when running from Battery
>
> present:                 yes
> capacity state:          ok
> charging state:          discharging
> present rate:            1283 mA  <--------
> remaining capacity:      4500 mAh
> present voltage:         12338 mV
>
> The "present rate" value is very sensitive to backlight level, HDD on or
> off, USB stuff plugged in, CPU load and so on.  I have this hooked up to
>   the KDE "System Guard" telemetry displays in the kicker.
>
> At least this allows you to put a number on exactly how much worse
> Fedora does than another distro you can run on the same laptop, and to
> objectively determine any improvement from evasive actions.

Yup.  Done such things before.  Here are the "latest" rough results from this 
notebook (an Inspiron 4150):

[ root at corsair /root ]
2006/08/02 10:59:37 [0]# cat /proc/acpi/battery/BAT0/state
present:                 yes
capacity state:          ok
charging state:          charged
present rate:            unknown
remaining capacity:      65120 mWh
present voltage:         16737 mV
[ root at corsair /root ]
2006/08/02 11:00:01 [0]# cat /proc/acpi/battery/BAT0/state
present:                 yes
capacity state:          ok
charging state:          discharging
present rate:            26083 mW
remaining capacity:      21530 mWh
present voltage:         16141 mV

As you can see, mine is showing different units than your does (/me shrugs).  
BTW, the LCD backlight dims automatically (like most notebooks do) when I 
unplug the AC.

However, running the math, it would look like I should be able to get about 50 
minutes:

echo "60*21530/26083" | bc -l
49.52651152091400529080

However, if I sit here doing nothing (not logged in, even), this thing will 
die in only 25 minutes, max.  If I turn the LCD backlight off entirely, I get 
about 30 minutes.  The battery is old, so I'm sure the sensors aren't 
entirely to blame for this discrepancy.  This is with FC5, but I'm using the 
2.6.16-1.2080_FC5 kernel because something is wrong with the initrd images 
produced after that preventing them from booting (but that's a different 
conversation).

Now, if I do the same thing under SUSE Linux 10.1 (which I also have installed 
on this notebook), sitting here doing nothing and not being logged in, it 
takes about 45 minutes to die.  If I turn off the backlight, it's about 52 
minutes.

So, I'm not sure what's different about the default configurations of these 
two distributions that would account for the difference and I have spent 
almost no time looking.  I do know that on both this and my other notebook 
I've seen a similar ratio between the Fed Hat & SUSE distributions' effects 
on battery life, even when logged in and doing something.  I don't have a lot 
of hard numbers, but I have paid close attention to it enough times over the 
years to see the pattern.

I've heard other people mention similar experiences with other distros, too.  
It makes sense, after all, the different distributions make different 
decisions about how to do things.  The sad part is that it always seems to be 
Red Hat & Fedora that get the worst battery life.  So much other stuff is 
done so well, that I don't really mind.  If I really need to, I can just boot 
up SUSE when I'm stuck on a plane with no external power source.  But it 
would be nice to see laptop power management become one of the bright spots.
-- 
Lamont R. Peterson <lamont at gurulabs.com>
Senior Instructor
Guru Labs, L.C. [ http://www.GuruLabs.com/ ]
GPG Key fingerprint: F98C E31A 5C4C 834A BCAB  8CB3 F980 6C97 DC0D D409
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/fedora-devel-list/attachments/20060802/d2c48aed/attachment.sig>


More information about the fedora-devel-list mailing list