Subject: Re: Bogus ACPI battery information in recent current
To: None <current-users@NetBSD.org>
From: Juan RP <juan@xtrarom.org>
List: current-users
Date: 12/13/2007 23:28:03
On Thu, 13 Dec 2007 22:18:21 +0000
"Steven M. Bellovin" <smb@cs.columbia.edu> wrote:

> 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.)

This used to work before jmcneill-pm, I can't confirm now because I don't
have a laptop but I suspect the new acpiec(4) code might be related to that.

The code does that: finds all SME_CLASS_ACADAPTER and SME_CLASS_BATTERY
devices registered in sysmon_envsys(9) and if the ac adapter is off
and all batteries are in critical or low state, sends the 'low-power' event.

-- 
Juan Romero Pardines	- The NetBSD Project
http://plog.xtrarom.org	- NetBSD/pkgsrc news in Spanish