Subject: Re: Bogus ACPI battery information in recent current
To: Steven M. Bellovin <smb@cs.columbia.edu>
From: Sverre Froyen <sverre@viewmark.com>
List: current-users
Date: 12/13/2007 17:31:22
On Thursday 13 December 2007, Steven M. Bellovin wrote:
> On Thu, 13 Dec 2007 14:27:50 -0700
>
> Sverre Froyen <sverre@viewmark.com> wrote:
>
> > With the latest current, I'm seeing bogus values for the battery
> > information. An example (4.99.42 from this morning):
...
>
> I wonder if this is related to my "sudden shutdown" issue. (I alluded
> to it on tech-userlevel in a different thread.) Here's some
> curious output, using a kernel from this afternoon's source:
It is indeed. About 30 seconds after I booted the new kernel for the first
time, it shut down. after that time, I'm testing in single user mode. I
also see the sequence of normal -> critical -> normal -> critical messages.
I suspect the reported values keep changing.
> b129$ grep powerd /var/log/messages
> Dec 13 17:03:41 berkshire root: /etc/powerd/scripts/acadapter: Full
> performance mode Dec 13 17:04:25 berkshire root:
> /etc/powerd/scripts/sensor_battery: (charge state) state changed to
> CRITICAL [acpibat0] Dec 13 17:05:03 berkshire root:
> /etc/powerd/scripts/sensor_battery: (charge state) capacity reached normal
> state [acpibat0] Dec 13 17:06:05 berkshire root:
> /etc/powerd/scripts/sensor_battery: (charge state) state changed to
> CRITICAL [acpibat0] Dec 13 17:07:02 berkshire root:
> /etc/powerd/scripts/sensor_battery: (charge state) capacity reached normal
> state [acpibat0] Dec 13 17:08:04 berkshire root:
> /etc/powerd/scripts/sensor_battery: (charge state) state changed to
> CRITICAL [acpibat0] Dec 13 17:08:36 berkshire root:
> /etc/powerd/scripts/sensor_battery: (charge state) capacity reached normal
> state [acpibat0] b130$ date -r `cat /kern/boottime`
> Thu Dec 13 17:03:05 EST 2007
>
> The charge level has been over 40% the entire time since this reboot. I
> have no idea why it shows several transitions. If the AC adapter status
> is somehow subject to similar glitches, it would explain why the machine
> frequently powers down when going multiuser. (Aside: I changed the
> 'shutdown now' in /etc/powerd/scripts/sensor_battery to 'shutdown +5',
> to give me a chance to do something sane when the kernel gets it wrong.)
>
> --Steve Bellovin, http://www.cs.columbia.edu/~smb