Panel battery plugin (libbattmon) - wrong percentage

(Curne) Simon Conrad-Armes curne at
Mon Jan 12 20:45:10 CET 2004


After upgrading to Linux 2.6, ACPI is finally working for me, which is 
very nice indeed, but created a strange behaviour in the Panel Battery 
Monitor. When fully charged, the monitor indicated I had 114% battery 
capacity. While impressive, I did not for a second believe that the 
battery monitor was boosting my batteries past their factory capacity.

Hold the theories! I found the problem and I fixed it. In 
/proc/acpi/battery/BAT0/info the information is presented as follows:

present:                 yes
design capacity:         65120 mWh
last full capacity:      58190 mWh
battery technology:      rechargeable
design voltage:          14800 mV
design capacity warning: 3000 mWh
design capacity low:     1000 mWh
capacity granularity 1:  200 mWh
capacity granularity 2:  200 mWh
model number:            LIP8120DLP
serial number:           5367
battery type:            LION
OEM info:                Sony Corp.

Now, notice the lines calls "design capacity" and "last full capacity". 
The "last full capacity" is noticably lower than the design capacity. 
This would be a bummer, IF it were true. From 

present:                 yes
capacity state:          ok
charging state:          unknown
present rate:            unknown
remaining capacity:      65120 mWh
present voltage:         16584 mV

Funny thing, isn't it? The current "remaining capacity" is higher than 
the "last full capacity". Battery Monitor (quite sensibly) calculates 
the percentage against the "last full capacity", but when this is wrong, 
you get a wrong reading. I suspect the wrong data is coming from my 
crappy Dell notebook. What I did, was change the battery monitor to 
calculate against the "design capacity" (see attached patch against 

This is obviously not the solution for everyone. I thought of creating a 
patch for the config window where you could choose whether to calculate 
against one or the other figure, but this is jive because 1) battmon is 
agnostic about whether it is using acpi or apm and 2) it's wrong to 
configure your way out of a hardware bug.

So comments, thoughts? Has anyone else experienced strange percentages?


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: xfce4-battery-plugin-0.1.2-fix_capacity.diff
URL: <>

More information about the Xfce4-dev mailing list