Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 8 Mar 2004 15:01:55 -0500
From:      John Baldwin <jhb@FreeBSD.org>
To:        "Daniel O'Connor" <doconnor@gsoft.com.au>
Cc:        "M. Warner Losh" <imp@bsdimp.com>
Subject:   Re: cvs commit: src/usr.sbin/acpi/acpiconf acpiconf.c
Message-ID:  <200403081501.55307.jhb@FreeBSD.org>
In-Reply-To: <200403061118.32829.doconnor@gsoft.com.au>
References:  <200403051335.55836.doconnor@gsoft.com.au> <20040305.113544.68047468.imp@bsdimp.com> <200403061118.32829.doconnor@gsoft.com.au>

next in thread | previous in thread | raw e-mail | index | archive | help
On Friday 05 March 2004 07:48 pm, Daniel O'Connor wrote:
> On Sat, 6 Mar 2004 05:05, M. Warner Losh wrote:
> > I've just added the following, based on the other ioctl that you can
> > get battery info from:
> >
> > State:                  Present
> > Rate:                   50000 mWh
> > Cap:                    50000 mWh
> > Volt:                   10.0 V
> >
> > Note: My battery/ACPI has a bug where 'RATE' and 'CAP' are always the
> > same number.  I have a second bug where the CAP is listed as being
> > more than the last full capacity of the battery.  This makes it very
> > hard to do estimates for remaining battery life, but I'm not sure what
> > can be done about it.
>
> I think you have to massage the data a fair bit to throw obvious outliers
> away. Also I believe most implementations produce totally bogus values
> during charging so you ignore rate when the battery is charging.

During charging, implementations are supposed to tell you how fast it is 
charging so you can compute how much time is needed to get to a full charge, 
not how much battery life time is left.  However, many BIOS's are broken.  My 
old laptop never returned a sane value for rate and my new one always returns 
a rate of 0, both of which violate the spec.  *sigh*

-- 
John Baldwin <jhb@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve"  =  http://www.FreeBSD.org



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