Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Jul 2005 09:33:17 +0200
From:      Marcin Jessa <lists@yazzy.org>
To:        Nate Lawson <nate@root.org>
Cc:        acpi@freebsd.org, freebsd-current@freebsd.org
Subject:   Re: acpi battery rework patch
Message-ID:  <20050726093317.522452a6.lists@yazzy.org>
In-Reply-To: <42E5C96C.9060105@root.org>
References:  <42E1481F.5040306@root.org> <d9175cad050723030041dd7387@mail.gmail.com> <20050723133819.36efb537.lists@yazzy.org> <42E29CAA.1020007@root.org> <d9175cad0507232047160cc758@mail.gmail.com> <20050724215818.55f951ae.lists@yazzy.org> <42E42F10.3030309@root.org> <20050725091221.106a0368.lists@yazzy.org> <42E5134F.706@root.org> <20050726011943.0abe83a0.lists@yazzy.org> <42E5C96C.9060105@root.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 25 Jul 2005 22:26:04 -0700
Nate Lawson <nate@root.org> wrote:

> Marcin Jessa wrote:
> > On Mon, 25 Jul 2005 09:29:03 -0700
> > Nate Lawson <nate@root.org> wrote:
> >>Marcin Jessa wrote:
> >>
> >>>On Sun, 24 Jul 2005 17:15:12 -0700
> >>>Nate Lawson <nate@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 ?








Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050726093317.522452a6.lists>