Subject: Re: AC adapter event
To: Takayoshi Kochi <kochi@NetBSD.org>
From: Alicia da Conceicao <alicia@engine.ca>
List: port-i386
Date: 05/04/2004 02:19:40
> This can be done in kernel (kernel thread or callouts) but also
> can be done in userland (using envsys(4)).
> As most necessary information is available via envstat(8), this
> userland thing is as easy as a simple shell script.
> I'm not inclined to abuse the kernel<->powerd interface for this
> matter.

Hi Takayoshi:

I agree, a simple userland app is all that is needed.  Some
ACPI laptops, including mine, can have more than one battery
connected at a time.  So currently I use my own simple ACPI app
to poll one or both batteries (apcibat0 & apcibat1) and beep
loudly many times if the combined battery power are low, below 7%,
so that I have time to properly save my work and halt my laptop.
It would be horrible to have powerd automatically force a shutdown
when the power is low, before one has a few minutes to save their
work!

If only ACPI sleep worked in NetBSD.

Alicia.