From owner-freebsd-current@FreeBSD.ORG Tue Jul 26 07:33:15 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 1659E16A41F; Tue, 26 Jul 2005 07:33:15 +0000 (GMT) (envelope-from lists@yazzy.org) Received: from mail.yazzy.org (mail.yazzy.org [217.8.140.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8E6BD43D4C; Tue, 26 Jul 2005 07:33:14 +0000 (GMT) (envelope-from lists@yazzy.org) Received: from 217-13-2-82.dd.nextgentel.com ([217.13.2.82] helo=h311r4z3r) by mail.yazzy.org with esmtps (TLSv1:AES256-SHA:256) (YazzY.org) id 1DxJvq-0003D3-6d; Tue, 26 Jul 2005 09:32:56 +0200 Date: Tue, 26 Jul 2005 09:33:17 +0200 From: Marcin Jessa To: Nate Lawson Message-Id: <20050726093317.522452a6.lists@yazzy.org> In-Reply-To: <42E5C96C.9060105@root.org> 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> <42E5C96C.9060105@root.org> Organization: YazzY.org X-Mailer: Sylpheed version 2.0.0rc (GTK+ 2.6.8; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Score: -2.5 (--) 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 07:33:15 -0000 On Mon, 25 Jul 2005 22:26:04 -0700 Nate Lawson wrote: > 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? > 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 ?