Subject: Re: ACPI and battery status
To: Martti Kuparinen <martti.kuparinen@iki.fi>
From: Gilbert Fernandes <gilbertf@netbsd-fr.org>
List: current-users
Date: 06/11/2004 20:04:49
On Fri, Jun 11, 2004 at 10:40:43PM +0300, Martti Kuparinen wrote:

> How can I read the current battery status using ACPI (and maybe APM)?
> Do we have any examples of this somewhere?

cd /usr/src/sys/arch/i386/conf
cp GENERIC GAPM

edit it, find the #apm line and remove the #
if you got a thinkpad model (6xx and up) also
remove the # in front of the following line:

options APM_DISABLE_INTERRUPTS=0

then compile your kernel :

config GAPM
cd ../compile/GAPM
make depend && make

we install it :

cp /netbsd /netbsd.old
cp netbsd /

then we add the apmd daemon :

echo "apmd=YES" >> /etc/rc.conf

reboot

type "apm" to check battery status.

ACPI will report much more stuff. try it too :)

-- 
Gilbert Fernandes