DeviceKit-power patches

Kay Sievers kay.sievers at vrfy.org
Tue Jun 24 07:34:00 PDT 2008


On Tue, Jun 24, 2008 at 13:09, Richard Hughes <hughsient at gmail.com> wrote:
> 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.

Can we please get entirely rid of the idea of "physical", it's the
same fundamental mistake HAL did. With virtualization and all that
stuff, we have nothing that comes close to that. The concept of
combining several power sources to a "meta device" seems totally fine,
sure, but please never call anything "physical" anymore. :)

Thanks,
Kay


More information about the hal mailing list