Re: hw.acpi.battery.time reports inconsistent values

From: Ben Kaduk <minimarmot_at_gmail.com>
Date: Fri, 29 Jul 2005 06:14:40 +0000
On 7/29/05, Eric Anderson <anderson_at_centtech.com> wrote:
> Ben Kaduk wrote:
> > Hi all -- I don't know whether or not this is related to the recent
> > battery rework, but I'm running
> > prolepsis# uname -a
> > FreeBSD prolepsis.math.uiuc.edu 7.0-CURRENT FreeBSD 7.0-CURRENT #5:
> > Thu Jul 28 07:42:25 UTC 2005
> > kaduk_at_prolepsis.math.uiuc.edu:/usr/obj/usr/src/sys/PROLEPSIS  i386
> > and this afternoon I had my laptop running off its battery (basically
> > as a jukebox), which is somewhat unusual since normally I plug it in.
> > I wanted to see how
> > fast I was draining the battery, so I did some `sysctl
> > hw.acpi.battery'-ing (see transcript below), and then proceeded to get
> > very confused.
> >
> > Is there a known race in this sysctl code, or should I be looking for
> > something else (like a broken acpi)?
>
> Re-cvsup and rebuild - Nate Lawson committed a fix for this today, after
> your build that fixed me up.
>
> Eric
>
>
>
>
> --
> ------------------------------------------------------------------------
> Eric Anderson        Sr. Systems Administrator        Centaur Technology
> Anything that works is better than anything that doesn't.
> ------------------------------------------------------------------------
> _______________________________________________
> freebsd-current_at_freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscribe_at_freebsd.org"
>

Thanks for the pointer, Eric -- I probably read the commit message as
I was compiling!  I rebuild (with NOCLEAN) world, and there seems to
be
a difference, in that I'm no longer getting insane values for
hw.acpi.battery.time, but I'm not entirely sure that it's fully fixed
-- its behaviour over time is not particularly monotone, but as I
mentioned earlier, I don't often run this machine off the battery, so
I don't know if this behaviour is normal:

bash-2.05b$ sysctl hw.acpi.battery
hw.acpi.battery.life: 99
hw.acpi.battery.time: -1
hw.acpi.battery.state: 0
hw.acpi.battery.units: 2
hw.acpi.battery.info_expire: 5
bash-2.05b$ sysctl hw.acpi.battery
hw.acpi.battery.life: 99
hw.acpi.battery.time: -1
hw.acpi.battery.state: 0
hw.acpi.battery.units: 2
hw.acpi.battery.info_expire: 5
bash-2.05b$ sysctl hw.acpi.battery
hw.acpi.battery.life: 99
hw.acpi.battery.time: -1
hw.acpi.battery.state: 0
hw.acpi.battery.units: 2
hw.acpi.battery.info_expire: 5
bash-2.05b$ sysctl hw.acpi.battery
hw.acpi.battery.life: 99
hw.acpi.battery.time: 147
hw.acpi.battery.state: 1
hw.acpi.battery.units: 2
hw.acpi.battery.info_expire: 5
bash-2.05b$ sysctl hw.acpi.battery
hw.acpi.battery.life: 99
hw.acpi.battery.time: 147
hw.acpi.battery.state: 1
hw.acpi.battery.units: 2
hw.acpi.battery.info_expire: 5
bash-2.05b$ sysctl hw.acpi.battery
hw.acpi.battery.life: 99
hw.acpi.battery.time: 147
hw.acpi.battery.state: 1
hw.acpi.battery.units: 2
hw.acpi.battery.info_expire: 5
bash-2.05b$ sysctl hw.acpi.battery
hw.acpi.battery.life: 96
hw.acpi.battery.time: 91
hw.acpi.battery.state: 1
hw.acpi.battery.units: 2
hw.acpi.battery.info_expire: 5
bash-2.05b$ sysctl hw.acpi.battery
hw.acpi.battery.life: 96
hw.acpi.battery.time: 108
hw.acpi.battery.state: 1
hw.acpi.battery.units: 2
hw.acpi.battery.info_expirbash-2.05b$ sysctl hw.acpi.battery
hw.acpi.battery.life: 96
hw.acpi.battery.time: 108
hw.acpi.battery.state: 1
hw.acpi.battery.units: 2
hw.acpi.battery.info_expire: 5
bash-2.05b$ sysctl hw.acpi.battery
hw.acpi.battery.life: 96
hw.acpi.battery.time: 89
hw.acpi.battery.state: 1
hw.acpi.battery.units: 2
hw.acpi.battery.info_expire: 5
bash-2.05b$ sysctl hw.acpi.battery
hw.acpi.battery.life: 96
hw.acpi.battery.time: 89
hw.acpi.battery.state: 1
hw.acpi.battery.units: 2
hw.acpi.battery.info_expire: 5
bash-2.05b$ sysctl hw.acpi.battery
hw.acpi.battery.life: 96
hw.acpi.battery.time: 90
hw.acpi.battery.state: 1
hw.acpi.battery.units: 2
hw.acpi.battery.info_expire: 5
bash-2.05b$ sysctl hw.acpi.battery
hw.acpi.battery.life: 92
hw.acpi.battery.time: 90
hw.acpi.battery.state: 1
hw.acpi.battery.units: 2
hw.acpi.battery.info_expire: 5
bash-2.05b$ sysctl hw.acpi.battery
hw.acpi.battery.life: 92
hw.acpi.battery.time: 90
hw.acpi.battery.state: 1
hw.acpi.battery.units: 2
hw.acpi.battery.info_expire: 5
bash-2.05b$ sysctl hw.acpi.battery
hw.acpi.battery.life: 92
hw.acpi.battery.time: 90
hw.acpi.battery.state: 1
hw.acpi.battery.units: 2
hw.acpi.battery.info_expire: 5
bash-2.05b$ sysctl hw.acpi.battery
hw.acpi.battery.life: 92
hw.acpi.battery.time: 105
hw.acpi.battery.state: 1
hw.acpi.battery.units: 2
hw.acpi.bash-2.05b$ sysctl hw.acpi.battery
hw.acpi.battery.life: 92
hw.acpi.battery.time: 105
hw.acpi.battery.state: 1
hw.acpi.battery.units: 2
hw.acpi.battery.info_expire: 5
battery.info_expire: 5



Is this magnitude fluctuation normal (depending on the instantaneous
load on the machine)?

Thanks

Ben Kaduk
Received on Fri Jul 29 2005 - 04:14:41 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:40 UTC