multiple batteries in BatteryMonitor

edscott wilson garcia edscott at prodigy.net.mx
Mon Apr 19 15:02:39 CEST 2004


El lun, 19-04-2004 a las 03:26, Ylosar Goer escribió:

> I applied this patch against v0.2.0 (because http://developer.berlios.de/ where i presume the cvs repository is, seems to be offline) and it effectively monitors the last battery to drain.
> 
> But i find strange that my BAT0 is batteries[1] (instead of batteries[0]) and i wonder if readdir (in check_acpi()) is really supposed to give batteries in reversed order. Is that an defined behavior ? Could readdir gives the content of /proc/acpi/batteries/ in a different order if... let's says... i were using a different filesystem type, or a different compiler (or someting) ?

You could probably change it by modifying the kernel acpi module, but it
is probably not worth changing.

> 
> It also shows 2 problems:
> 
> 1/ When the monitored battery is not (yet) discharging, the remaining time displayed is wrong (it showed 72000 hours last time i checked, as far as i remember). The time displayed becomes ok as soon as the battery start to drain.

I have no idea why this happens. You would have to play around a bit
with the code while testing on a 2 battery system to figure it out.

> 
> 2/ Something weird: currently, according to /proc, my main battery remainging capacity is greater than its last full capacity (i wonder why!) and that gives me a '101% AC on-line' status, with a "panel level bar" having no color. The status and the bar becomes ok as soon as the main battery has been drained a little.
> 

Maybe a bug in the battery circuits, or in the kernel acpi module. Not
much the battery plugin can do about that. Except, maybe, instead of
monitoring one battery, add all batteries and use the sums. You might
want to try an tweak libacpi.c and see if that works better.

Edscott

> yop at wok yop $ cat /proc/acpi/battery/BAT0/info 
> present:                 yes
> design capacity:         71990 mWh
> last full capacity:      70880 mWh
> battery technology:      rechargeable
> design voltage:          11100 mV
> design capacity warning: 3000 mWh
> design capacity low:     1000 mWh
> capacity granularity 1:  200 mWh
> capacity granularity 2:  200 mWh
> model number:            DELL 4P259 
> serial number:           1541
> battery type:            LION
> OEM info:                Panasonic
> yop at wok yop $ cat /proc/acpi/battery/BAT0/state 
> present:                 yes
> capacity state:          ok
> charging state:          unknown
> present rate:            unknown
> remaining capacity:      71990 mWh
> present voltage:         12476 mV
> 
> 
> voila,  hope it helps a litte
> _______________________________________________
> Xfce mailing list
> Xfce at xfce.org
> http://lunar-linux.org/mailman/listinfo/xfce
> http://www.xfce.org
> 




More information about the Xfce mailing list