DeviceKit-power patches

Richard Hughes hughsient at gmail.com
Tue Jun 24 04:09:48 PDT 2008


On Mon, 2008-06-23 at 16:39 +0200, Arnaud Quette wrote:
> Hi Richard, David and the list,
> 
> pleased to see you back on this subject, Richard ;-)

Sure, thanks. :-)

> > This can make g-p-m a really small and lightweight applet, rather than
> > the complex thing it is today.
> 
> I've also started to audit DK-p, and have some feedback.
> The most important is that I find the variable naming to be unclear
> and not suitable for expansion. For example, changing "charge" to
> "energy" is not a good thing.

Yes, I think it's better that the HAL mapping, but it's still very
confusing.

> Moreover, before going further, I would like that we (HAL/DK-p, GPM,
> NUT, ...) discuss the variable naming, and more generally the scope of
> DK-p.
> 
> For the variable naming, I would like to propose a draft,
> merging/modifying/extending the base from the current HAL battery /
> ac_adaptor collections and NUT variables [1].

Right.

> My general idea (already exposed iirc) is to promote a "Power Module"
> notion, composed of one or more power component (battery, input,

Not input -- I think we should leave all input to INPUT and XOrg.

> output, outlet, ...). This would allow a clean handling of laptop
> batteries, UPSs, smart outlets, ... in a generic way.

Sure. One thing I expose in g-p-m is the concept of physical and logical
batteries. This could mean you have two physical batteries, but they
work together to form one logical battery. The logical battery just has
the average percentage of both batteries, and you can use some
heuristics to accurately calculate the time remaining based on the
physical battery discharge rate and the discharge profile of the laptop.

> There is also a notion of power chain (imagine a UPS powering a smart
> strip, with some boxes and peripherals ; managed smartly, like
> powering on a printer on demand...), with a Power Module hierarchy...

Hmm, I'm not sure that's in scope -- I'm not sure DavidZ wanted a tree
to populate and navigate. Correct me if I'm wrong.

> So, David, same question: is it the right place to talk about that?

We'll discuss on the new list :-)

Richard.




More information about the hal mailing list