Subject: Re: envsys framework won't let my system stay up!
To: Greg Troxel <gdt@ir.bbn.com>
From: Juan RP <juan@xtrarom.org>
List: current-users
Date: 07/17/2007 10:22:55
On Mon, 16 Jul 2007 20:11:53 -0400
Greg Troxel <gdt@ir.bbn.com> wrote:

> I updated to current on 16 1532Z July from April current, and it mostly
> seemed ok other than racoon not starting and some coda oddness.
> 
> I shut my Thinkpad T60 down and when I got home and plugged it in the
> orange charge light was flashing (indicating bad battery).  The system
> booted up and then:
> 
> ul 16 19:43:03 poblano /netbsd: boot device: wd0
> Jul 16 19:43:03 poblano /netbsd: root on wd0a dumps on wd0b
> Jul 16 19:43:03 poblano /netbsd: root file system type: ffs
> Jul 16 19:43:03 poblano /netbsd: acpibat1: critical capacity limit on
> 'acpibat1 charge'
> 
> and then it ran shutdown.  I booted again, not yet realizing blinking
> yellow was bad, and thinking that there would be enough charge to be
> above critical.  This time shutdown apparently had a time race and it
> was telling me: 'no logins; shutdown at 18:55' but it was after 18:55.
> I had to power cycle and fsck to recover.
> 
> So there are at least two bugs here:
> 
>   acpibat1 being critical while acpibat0 is at 99% is not cause to do
>   anything other than perhaps log the occurence.  This is just what
>   happens with two batteries.
> 
>   batteries being at critical charge while the AC adapator is present is
>   not cause for shutdown.
> 
> I'm inclined to turn the shutdown in /etc/powerd/scripts/sensor_battery
> into a warning until a cleaner solution is found - the current state is
> too dangerous.  Objections?

I don't see why it's "too dangerous", when you boot with your battery in
critical capacity the systems shutdowns.

I agree that it shouldn't be a reason to shutdown the system when the AC
Adapter is connected or if there are more batteries.

I'll look at these problems, anyway you can modify
your /etc/power/script/sensor_battery script for now.

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