Subject: Re: Bogus ACPI battery information in recent current
To: Sverre Froyen <firstname.lastname@example.org>
From: Steven M. Bellovin <email@example.com>
Date: 12/16/2007 16:01:46
On Sat, 15 Dec 2007 20:09:37 -0700
Sverre Froyen <firstname.lastname@example.org> wrote:
> On Saturday 15 December 2007, you wrote:
> > On Sat, 15 Dec 2007 18:42:24 +0000
> > "Steven M. Bellovin" <email@example.com> wrote:
> > > On Sat, 15 Dec 2007 10:59:30 -0700
> > >
> > > Sverre Froyen <firstname.lastname@example.org> wrote:
> > > > Hi,
> > > >
> > > > After a cvs update this morning, envstat reports sensible
> > > > values for the battery and the delays are gone (fixed perhaps
> > > > by acpi_ec.c revision 1.46).
> Please note that I did a full cvs update. My intent was to just
> update the acpi_ec.c file, but my cvs update in the acpi directory
> pulled over several additional updates and eventually I had to update
> the whole source tree. My user land is from 6 Dec.
> > > I think I'm still seeing some delays, though I haven't monitored
> > > that closely. I did run 'envstat -i 5' for about 45 minutes,
> > > with no failures of battery charge level or state.
> > In a 2 hour test, polling battery state every 5 seconds (envstat -i
> > 5), I'm still seeing some failures, though not as many as before:
> I've been running time envstat in a shell loop every 30 sec for
> several hours and every "real" time was less than 0.1 sec.
> > $ sort /tmp/battlog | uniq -c
> > 868
> > 3 charge: 64.480 Wh (95.81%)
> > 297 charge: 65.610 Wh (97.49%)
> > 563 charge: 65.630 Wh (97.52%)
> > 1 charge: 412.640 Wh (613.14%>)
> > 4 charge: 417.760 Wh (620.74%)
> > 819 charge state: NORMAL
> > 49 charge state: CRITICAL
> I get a much more consitent result:
> 144 charge: 43.710 Wh (97.18%)
> 180 charge: 43.720 Wh (97.20%)
> 176 charge: 43.730 Wh (97.22%)
> 500 charge state: NORMAL
> > Also note that it only did 868 polls; in two hours, it should have
> > done 1440 of them if each poll took 0 time.
> > > > There is a (minor) remaining issue in that the AC adaptor is
> > > > reported as ON (present) even when I disconnect it.
> More testing shows that its state is detected correctly at boot but
> that it never changes after that (no matter how many times I connect
> or disconnect the adaptor).
> > > Hmm -- does estd notice that it's disconnected?
> > On my T42, powerd does notice AC adapter disconnects.
> This is a little strange since I am using a T42 as well (IBM
> 2378FVU). BIOS version is 3.23 and embedded controller version is
> 3.04 (both of them should be up to date).
I'll have to check my BIOS versions. My current situation is that both
battery and adapter status is working properly on a T61, the latter
works well on a T42, but the former does not.
--Steve Bellovin, http://www.cs.columbia.edu/~smb