[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: System halt on low power



On Fri, 20 Jul 2001, Adam Bell <abell@intersys.com> wrote:

>	I'll bet there is a very easy answer to this, so here goes.
>
>	I have a laptop on a LAN which should be on all the time.  HOWEVER, our 
>power grid has been known to have trouble, so if the AC should go and the 
>batter gets low, I would like the computer to do an orderly system halt 
>before things get drastic.  Is there an easy way to do this?

apmd (in the apmd package) can do this. But this requires that reading
the state of the battery actually works, which is quite a different
question. In any case you need to recompile the kernel with apm
support unless you haven't already done so and run "apm" on the
console first to see if you get meaningful results.

If you can't get the actual charge state (which is not only a APM/BIOS
issue but also requires a battery that supports it; the one in my
cheapo laptop doesn't although apm works quite well apart form that),
you could still have apmd issue a shutdown command when switching form
AC to battery.

-- 
Philipp Lehman <lehman@gmx.net>



Reply to: