Hello.<br><br>I'm running Linux EeeOS 2.6.24-1-686 on my 701 and found that gnome-power-manager don't warn me when battery is low and my system runs out of battery until it shuts down uncleanly making errors on my filesystem.<br>
<br>Probably there's some other power manager daemon that works well, but I've written a stupid script that looks for remaining battery every 2 minutes warning me with an xmessage when battery is lower than 20% and shutting down my machine cleanly when it reaches 10%.<br>
<br>Here it is:<br><br><blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote">##!/bin/sh<br>while true<br>do<br>if ! grep -q on-line /proc/acpi/ac_adapter/AC0/state ; then<br>
BAT_DIR=/proc/acpi/battery/BAT0<br> FULL_BAT=`grep 'last full capacity' ${BAT_DIR}/info | awk '{ print $4 }'`<br> CUR_BAT=`grep 'remaining capacity' ${BAT_DIR}/state | awk '{ print $3 }'`<br>
AVG=`expr $(expr ${CUR_BAT} \* 100) / ${FULL_BAT}`<br><br> if [ "$AVG" -le "20" ]; then<br> xmessage Warning, Low Battery... $AVG &<br> fi<br> if [ "$AVG" -le "10" ]; then<br>
xmessage I'll shut down in 2 minutes unless you connect to AC. &<br> sleep 120<br> if ! grep -q on-line /proc/acpi/ac_adapter/AC0/state ; then</blockquote><blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote">
# YOU MAY CHANGE THIS ACCORDING TO YOUR DE.<br> gdm-control --shutdown<br> lxsession -exit<br> fi<br> fi<br>fi<br>sleep 120<br><br>done<br><br></blockquote><div>
<br>I just run it in background when my lxsession starts.<br><br>Hope to be helpfull and excuse my bad English.<br><br></div>