Panel battery plugin (libbattmon) - wrong percentage

edscott wilson garcia edscott at
Mon Jan 12 23:09:20 CET 2004

On Mon, 2004-01-12 at 13:45, (Curne) Simon Conrad-Armes wrote:
> Hi,
> 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 
> /proc/acpi/battery/BAT0/state:
> 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 
> xfce4-battery-plugin-0.1.2).
> 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?

Just a guess... Maybe "last full capacity" refers to the last time
battery was full, not this time. If that is so, run your battery down
and then "last full capacity" should be the full capacity you are seeing

> Curne

More information about the Xfce4-dev mailing list