kpowersave stuck at battery charging

Danny Kukawka danny.kukawka at web.de
Wed Jan 2 11:35:10 PST 2008


On Mittwoch, 2. Januar 2008, Andrey Borzenkov wrote:
> On Wednesday 02 January 2008, Danny Kukawka wrote:
> > On Mittwoch, 2. Januar 2008, Andrey Borzenkov wrote:
> > > battery.charge_level.percentage = 94
> >
> > Here is your problem. KPowersave simply check this value and this say the
> > battery isn't full.
>
> It is not my problem; it is HAL problem :)
>
> As I already asked in another reply - how do you calculate 100%? 

(battery.charge_level.current/battery.charge_level.last_full)*100

> You assume 
> that last_full is going to be always reached. That is not correct. In my
> case charging stops before. While this means degraded battery, it is still
> charged up to 100% of new (degraded) capacity.

and normaly 'last full capacity' get set to the correct value in this case. 
What prints: 'grep . /proc/acpi/battery/*/*' ?

> While this condition warrants some sort of warning to user, it is probably
> wrong to indefinitely claim "battery is charging" when in fact it is not.

There are batteries which not start charging at e.g. >= 95%. So we can't 
assume that not charging and not discharging means 100% full.

> > Btw. As I already wrote in an other thread: There are some bugs in the
> > HAL code for the ACPI batteries which are shown as power supply devices
> > in sysfs. You can with kernel 2.6.24 and HAL 0.5.10 only trust the
> > batteries from the proc interface on ACPI machines.
>
> So far all information I got from HAL was correct.

Then try it please with proc battery information and check if you get the 
same.

Danny


More information about the hal mailing list