hal and battery status

David Zeuthen david at fubar.dk
Mon Jul 5 14:42:05 PDT 2004


On Sun, 2004-07-04 at 23:31 -0400, Nathaniel McCallum wrote:
> Well, just this last week I disected the acpid and acpi kernel code.
> So, while I have it fresh in my mind, how can I help?
> 

That would be nice - I'm not sure myself how best to do this, ACPI seems
utterly complex and I haven't even looked at how Apple or other
architectures handles this

I guess hashing out some kind of design first would be a good start?  I
mean we want to make a portable design; here are some thoughts

 o Should we have a separate HalDevice for e.g. power buttons,
   lid buttons, battery bays? My answer to that is probably yes.

 o We should add HalDevice objects for CPU's as well.

 o Fans and thermal zones seem to be less important, I mean the
   kernel or firmware enforces policy here, right?, so only the effects
   are visible, e.g. the kernel emits a "processor is overheating"
   signal at the appropriate time and we should proxy this in HAL and
   emit a DeviceCondition at the appropriate time.

   Now, the desktop can enforce policy by lowering the CPU frequency
   or something in response to this.

 o What about stuff like disabling a media bay? My old Dell Inspiron
   7500 got such a thing and this works on Windows so I can replace
   my DVD/LS120 combo with a CD-RW/floppy combo. I think this should
   be handled by existing power management in the kernel, when that
   works that is, e.g. at some point we can export the Suspend() or
   Standby() method on a HalDevice.

We need to keep the scope in mind, we always need to keep the scope in
mind :-) So, the sole reason for adding such functionality to HAL is to
be able to easily write policy agents, e.g. provide all the needed
information  to make a policy decision in an easily accessible place
that abstracts the underlying system, e.g. HAL. 

Thus, sticking to 

 o Power, Standby and Lid etc. buttons
 o Battery bays
 o CPU

with suitable generic properties might be a good choice? Now, granted,
I'm curious what other peoples take on this is :-)

Thanks,
David



_______________________________________________
hal mailing list
hal at freedesktop.org
http://freedesktop.org/mailman/listinfo/hal



More information about the Hal mailing list