Re: Script to monitor battery status on X220

From: Erich Dollansky <erichfreebsdlist_at_ovitrap.com>
Date: Fri, 20 Jul 2012 17:01:09 +0700
Hi,

On Friday 20 July 2012 16:13:56 Matthias Apitz wrote:
> El día Friday, July 20, 2012 a las 03:45:23PM +0700, Erich Dollansky escribió:
> 
> > > ... 
> > > 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.
> 
> I wrote and used something similar for my netbook EeePC 900; it turned
> out that the battery is not showing the remaining capacity in a linear

this is also true on the X220.

> way; the last 5% are 'consumed' in a few seconds, i.e. below 20% I
> polled every 2 seconds;

I did some tests until I ended at the 2%. There was always enough energy left in the battery to restart the machine.

I wonder anyway how they do it. I developed battery monitors a long time ago. As the voltage drop is not linear and the tolerances are very high. They might calibrate each battery when it reaches certain levels.

Erich
Received on Fri Jul 20 2012 - 07:58:55 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:29 UTC