Date: Wed, 09 May 2001 08:54:13 -0700 From: Nick Sayer <nsayer@quack.kfu.com> To: freebsd-mobile@freebsd.org Subject: Recommended addition to apmd: Battery state watching Message-ID: <3AF96825.50803@quack.kfu.com>
next in thread | raw e-mail | index | archive | help
My vaio has one annoying quality: When it runs out of battery, it shuts
off ungracefully.
The Sony way of thinking is to do everything possible in Software. The
lid switch on a vaio does nothing except turn off the backlight and flip
a bit in the spic device. apm state for graceful suspend at end of
battery is done in software, etc, etc, etc.
KDE has support for apm state watching, but I think this would be a job
better suited to apmd.
I would propose adding the follwing syntax to apmd.conf:
apm_batt ([0-9]+%|[0-9]+m) {
...
}
That is, as the battery state crosses from being above a given
percentage or minutes remaining to below the same, then execute the
given sequence. Obviously, this is only done if the machine is not on AC
power. Some level of hysteris would also be used just in case.
A prototypical usage would be
apm_batt 5% {
exec "logger -p kern.emerg *** Battery state low ***";
}
apm_batt 2% {
exec "logger -p kern.emerg *** Battery state critical -- suspending
immediately ***";
exec "sleep 10";
exec "apm -Z";
}
Anyone have any thoughts?
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-mobile" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3AF96825.50803>
