[ltp] UPS signals for shutdown

Henrique de Moraes Holschuh linux-thinkpad@linux-thinkpad.org
Sat, 15 Mar 2008 19:11:12 -0300


On Sat, 15 Mar 2008, Helmut Hullen wrote:
> when the battery goes low it sends some signals. Can I use these signals  
> for a controlled shutdown?

Yes, but not easily.

First you need to identify the signals (did you? I don't fancy nearly
depleting my battery to track them down, unless someone sends me a T43
battery of any type I could use for that sort of testing).

Then, you need to do something, typically an hibernate request or a shutdown
request.

So far so good.  The real crap happens when the thinkpad is suspended.  You
*need* the EC to wake up the box when it enters the critical battery state,
and AFAIK not all thinkpads do this (maybe you need to setup something in
the BIOS?).

One way to avoid problems with suspend-to-RAM is to do a suspend-to-RAM-
and-disk (aka RediSafe).  tux-on-ice can do that.  If the box shutdowns
while sleeping, no data loss happens (it will wake up as if suspended from
disk).

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh