Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Jul 2012 15:45:23 +0700
From:      Erich Dollansky <erichfreebsdlist@ovitrap.com>
To:        Lars Engels <lars.engels@0x20.net>
Cc:        freebsd-current@freebsd.org
Subject:   Re: Script to monitor battery status on X220
Message-ID:  <201207201545.23915.erichfreebsdlist@ovitrap.com>
In-Reply-To: <20120720053108.GD70259@e-new.0x20.net>
References:  <201207201004.59451.erichfreebsdlist@ovitrap.com> <20120720053108.GD70259@e-new.0x20.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi,

On Friday 20 July 2012 12:31:08 Lars Engels wrote:
> On Fri, Jul 20, 2012 at 10:04:59AM +0700, Erich Dollansky wrote:
> > Hi,
> > 
> > I forget yesterday to share these two scripts:
> > 
> > http://www.alogreentechnologies.com/freebsd/checkbattery
> > 
> > checks the battery status of an X220 and shuts the machine down when the battery falls to 2% or below.
> > 
> > The status is checked every minute.
> > 
> > It calls the following script to shut the machine down:
> > 
> > http://www.alogreentechnologies.com/freebsd/poweroff
> > 
> > You must run the first script as root to enable it to power the machine off at the end.
> > 
> > I found that the battery life of my machine was higher using a simple window manager like blackbox compared to things like GNOME or KDE. This might depend on the usage pattern.
> > 
> > Erich
> 
> Is it necessary to poll? Usually devd generates an event when the
> battery status and/or percentage changes. Just read the events from
> /var/run/devd.pipe.
> 
this is a good idea. I did not like this solution either but did not get a better idea when I did it.

Erich



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