Subject: Re: acpi/apm code only uses last battery?
To: Greg Troxel <gdt@ir.bbn.com>
From: Steven M. Bellovin <smb@cs.columbia.edu>
List: port-i386
Date: 10/11/2006 11:19:56
On Wed, 11 Oct 2006 08:22:02 -0400, Greg Troxel <gdt@ir.bbn.com> wrote:

> 
> > If we want to keep supporting APM, it
> > should really export data via envsys.
> 
> I think we should keep apm support for quite a while, at least as long
> as people have working boxes with apm and no acpi.

Agreed.  Note that there are many programs in pkgsrc that use /dev/apm;
these would all have to be updated to use the new interface.

In a separate vein, the laptop support for ACPI just isn't good enough
yet; it doesn't provide enough functionality.  I'd love to run ACPI
(partly because I want the better battery status information), but I'd have
to give up USB support, which just isn't worth it.  There was a wonderful
burst of progress a few months ago, but nothing recently.
> 
> > If /dev/apm can't accurately represent multiple batteries present in a
> > system, this is a problem with that specific interface, not the  ACPI
> > /dev/apm implementation in general.
> 
> Well perhaps, but in my view if there's a single "% charged" variable
> in an interface, then one should fill that in with "100 * \sum current
> / \sum lastchargedcap", rather than pretending that the
> highest-numbered battery is the only battery.  Whether that work is
> worth doing is another question.

It is worth doing.  The more subtle point is whether the percentage should
be relative to design capacity or last full capacity.  If I recall
correctly, we're currently using the former; Windows and the current APM
battery interface seem to do the latter.


		--Steven M. Bellovin, http://www.cs.columbia.edu/~smb