more weird hal errata
Richard Hughes
hughsient at gmail.com
Tue Dec 6 01:20:19 PST 2005
On Mon, 2005-12-05 at 23:56 -0500, Ryan Lortie wrote:
> More reports from the land of messed-up laptop ACPI implementations:
>
> http://bugzilla.gnome.org/show_bug.cgi?id=323186
>
> Basically, this guy's laptop reports a discharge (or is it a charge?)
> rate of 1mA even when the laptop isn't charging or discharging at all.
> This causes battstat to believe that the battery is very slowly
> discharging and reports an unreasonably high time remaining (79 hours).
>
> I think the correct workaround for this would be to have HAL force the
> rate to 0 if the battery is in the "charged" state (ie: both charging
> and discharging are false).
>
> I've attached a patch to do this. It sets the "normalised" rate to 0 in
> the case that the battery is neither charging nor discharging. The
> "reporting" rate is left unchanged since these are meant to be the raw
> values from ACPI (however incorrect they may be).
>
> As with all my ACPI patches this code is completely untested. It looks
> benign but testing is still appreciated.
Looks okay to me, I can test this for a few days on my machine, but I
would say it's logically correct.
Richard.
More information about the hal
mailing list