Out of battery indicator.

Pawel Jakub Dawidek pjd at FreeBSD.org
Sun May 1 04:18:18 PDT 2005


On Tue, Mar 08, 2005 at 11:07:36PM +0000, Sarunas Vancevicius wrote:
+> On 19:21, Sat 05 Mar 05, Josef Karthauser wrote:
+> > Does anyone have a solution to running out of battery using ACPI (5.3?).
+> > I keep forgetting to plug in my power supply and the machine dies rather
+> > suddenly without beeping or giving me any warning that it was out of
+> > battery.
+> > 
+> > Any ideas?  I would have thought that this was an O/S task rather than a
+> > third party app task.
+> > 
+> > Joe
+> 
+> Hi All,
+> 
+> For rather complex solution:
+> 
+> # kldload speaker
+> # chmod 660 /dev/speaker
+> 
+> Checkout source code for battd utility in DragonFly
+> (http://dragonflybsd.org/cvsweb/src/usr.sbin/battd/).  Compile, install
+> and run it with something like:
+> 
+> $ battd -p 10 -e $HOME/bin/beep_speaker
+> 
+> And where $HOME/bin/beep_speaker:
+> 
+> #/bin/sh
+> TUNE="l2b.f+.p16a.c+.p l4mn<b.>e8a2mspg+e8c+f+8b2"
+> /bin/echo $TUNE > /dev/speaker
+> 
+> Which will play "opening bars of the theme from Star Trek Classic" when
+> the battery will reach approximately 10%.  There are more tunes in
+> src/usr.sbin/spkrtest/spkrtest.sh, and you can always make your own ;-).
+> 
+> A long string of 'A's will produce unpleasant beeping, which will remind
+> you to turn on turn on your power supply :-).

We should probably integrate this functionality into powerd(8).

-- 
Pawel Jakub Dawidek                       http://www.wheel.pl
pjd at FreeBSD.org                           http://www.FreeBSD.org
FreeBSD committer                         Am I Evil? Yes, I Am!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-mobile/attachments/20050501/8b478f3e/attachment.bin


More information about the freebsd-mobile mailing list