Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 Dec 1998 22:31:43 -0700
From:      Warner Losh <imp@village.org>
To:        wcp@lpds.sublink.org
Cc:        hackers@FreeBSD.ORG
Subject:   Re: Auto power off for poor people 
Message-ID:  <199812160531.WAA09345@harmony.village.org>
In-Reply-To: Your message of "Tue, 15 Dec 1998 19:17:18 %2B0100." <13942.39950.631562.882793@luppolo.lpds.sublink.org> 
References:  <13942.39950.631562.882793@luppolo.lpds.sublink.org>  

next in thread | previous in thread | raw e-mail | index | archive | help
In message <13942.39950.631562.882793@luppolo.lpds.sublink.org> "Walter C. Pelissero" writes:
: Since I think it might be of general interest (I saw a few requests in
: freebsd-questions), here are the patches I made to a 2.2.7 system to
: get the power-off-on-shutdown feature.

I think that Mike Smith has already implemented this.

: While at this.  It would be nice to have a shutdown on power-off
: switch in FreeBSD 3.0.  Judging from the switch block in
: apm_processevent() function it seems there is not even an hook for a
: daemon doing this kind of job.  PMEV_POWERSTATECHANGE is ignored.  Am
: I wrong?

FreeBSD power management is in the kernel.  There are no provisions
for having a daemon control this.  I'd like there to be either a
loadable module that copes, or a userland daemon with an expansion of
the apm interface.

I have a kludge shell script somewhere that is a proof of concept for
a battery daemon for my Libretto so I could suspend it when idle and
the machine is plugged in and the battery charge isn't 100%.  It would
sleep for 2x 100 - the percentage of battery minutes and then wake up
again.  My Libretto 50 doesn't charge while on....  However, the
script is a total kludge and I'd rather have some simple tcl driven
(or perl drive, I don't care which scripting language) powerd that
would allow me to do things like this.

Warner

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199812160531.WAA09345>