Re: acpi battery rework patch

From: Marcin Jessa <lists_at_yazzy.org>
Date: Tue, 26 Jul 2005 09:33:17 +0200
On Mon, 25 Jul 2005 22:26:04 -0700
Nate Lawson <nate_at_root.org> wrote:

> Marcin Jessa wrote:
> > On Mon, 25 Jul 2005 09:29:03 -0700
> > Nate Lawson <nate_at_root.org> wrote:
> >>Marcin Jessa wrote:
> >>
> >>>On Sun, 24 Jul 2005 17:15:12 -0700
> >>>Nate Lawson <nate_at_root.org> wrote:
> >>>>
> >>>>Marcin, if your system reports a valid rate of use, we can calculate 
> >>>>time.  If you're on AC power, there is no time available (since your 
> >>>>batteries aren't discharging at any rate).  Try a previous 
> >>>>kernel/acpi.ko to be certain what the behavior used to be.
> >>>
> >>And with a 7-current kernel, everything is the same except "time" is 
> >>always -1 both on and off AC power?
> >>
> >>Please try this patch with 7-current and report its output both on and 
> >>off power.  It prints out more debugging info each time the battery is read.
> > 
> > Test results:
> > 
> > Running on 6.0-BETA1 #4: Sat Jul 23 17:35:13 CEST 2005 
> > - AC:
> > hw.acpi.battery.life: 99
> > hw.acpi.battery.time: -1
> > hw.acpi.battery.state: 0
> > 
> > - Battery:
> > hw.acpi.battery.life: 87
> > hw.acpi.battery.time: 103
> > hw.acpi.battery.state: 1
> 
> Completely fine.  Time should be -1 (unknown) while on AC power.  And 
> state is "discharging" when on battery.
> 
> > Running on FreeBSD 7.0-CURRENT #5: Mon Jul 25 22:21:05 CEST 2005 without the patch
> > - AC:
> > hw.acpi.battery.life: 100
> > hw.acpi.battery.time: -1
> > hw.acpi.battery.state: 0
> > 
> > - Battery:
> > hw.acpi.battery.life: 99
> > hw.acpi.battery.time: 113
> > hw.acpi.battery.state: 1
> 
> Um, this is exactly the same as above before my battery rework commit. 
> I fail to see anything wrong with it.
> 
> > Running on FreeBSD 7.0-CURRENT #5: Mon Jul 25 22:21:05 CEST 2005 with the patch:
> 
> The patch should not change anything since it just adds printfs to help 
> get more info in case you had some bug.
> 
> > - AC:
> > hw.acpi.battery.life: 70
> > hw.acpi.battery.time: -1
> > hw.acpi.battery.state: 2
> 
> This is fine.  On AC power and state is charging.
> 
> > - Battery:
> > hw.acpi.battery.life: 70
> > hw.acpi.battery.time: 125
> > hw.acpi.battery.state: 1
> 
> Time is valid and state is "discharging".
> 
> There is no bug here, this info is correct and matches the kernel 
> behavior before my commit.  So what is the buggy behavior?
> 

In the first email i could not see the remining time when running on battery but then after a short while I sent one more email as reply to my own saying it showed up and this was propably becouse ACPI did not manage to get the battery state yet.
I dont know if there was any bug. I thought you had some issues so I tried to help. 
It seems like we both wasted our time on a perfectly good code becouse you missed my second email :)

Cheers,
Marcin.

P.S Do you still need my dmesg ?
Received on Tue Jul 26 2005 - 05:33:15 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:39 UTC