From owner-freebsd-current@FreeBSD.ORG Tue Jul 26 05:26:17 2005 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1CA5916A41F; Tue, 26 Jul 2005 05:26:17 +0000 (GMT) (envelope-from nate@root.org) Received: from ylpvm12.prodigy.net (ylpvm12-ext.prodigy.net [207.115.57.43]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9D89143D45; Tue, 26 Jul 2005 05:26:16 +0000 (GMT) (envelope-from nate@root.org) Received: from pimout5-ext.prodigy.net (pimout5-int.prodigy.net [207.115.4.21]) by ylpvm12.prodigy.net (8.12.10 outbound/8.12.10) with ESMTP id j6Q5Q7Hv031918; Tue, 26 Jul 2005 01:26:07 -0400 X-ORBL: [64.171.187.230] Received: from [10.0.5.50] (adsl-64-171-187-230.dsl.snfc21.pacbell.net [64.171.187.230]) by pimout5-ext.prodigy.net (8.13.4 outbound domainkey aix/8.13.4) with ESMTP id j6Q5QB7c089748; Tue, 26 Jul 2005 01:26:12 -0400 Message-ID: <42E5C96C.9060105@root.org> Date: Mon, 25 Jul 2005 22:26:04 -0700 From: Nate Lawson User-Agent: Mozilla Thunderbird 1.0.6 (X11/20050723) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Marcin Jessa References: <42E1481F.5040306@root.org> <20050723133819.36efb537.lists@yazzy.org> <42E29CAA.1020007@root.org> <20050724215818.55f951ae.lists@yazzy.org> <42E42F10.3030309@root.org> <20050725091221.106a0368.lists@yazzy.org> <42E5134F.706@root.org> <20050726011943.0abe83a0.lists@yazzy.org> In-Reply-To: <20050726011943.0abe83a0.lists@yazzy.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: acpi@freebsd.org, freebsd-current@freebsd.org Subject: Re: acpi battery rework patch X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jul 2005 05:26:17 -0000 Marcin Jessa wrote: > On Mon, 25 Jul 2005 09:29:03 -0700 > Nate Lawson wrote: >>Marcin Jessa wrote: >> >>>On Sun, 24 Jul 2005 17:15:12 -0700 >>>Nate Lawson 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? -- Nate