device model wakeup

David Zeuthen david at fubar.dk
Thu Apr 12 13:07:28 PDT 2007


On Wed, 2007-04-11 at 22:00 +0200, Johannes Berg wrote:
> Hi,
> 
> First off, let me say that I'm not looking at the latest hal at the
> moment. In my hal, I see a lot of:
> 
>   usb_device.can_wake_up = true  (bool)
> 
> etc. However, the device model allows any kind of device to have a
> non-empty power/wakeup file. Is there anything planned that would allow
> changing the contents of those files via hal? Right now, I'm not sure
> how the usb_device.can_wake_up properties are created, but I think that
> there should be power.can_wake_up and power.may_wake_up in accordance to
> the kernel device model.
> 
> It has been proposed to move the ACPI wakeup options to new platform
> devices like "lid" or "button" etc. so a nice UI that showed all devices
> that can trigger wakeup would be great. However, this requires hal
> involvement.
> 
> Thoughts? Ideas? Patches welcome?

I'm all for supporting this; if I understand correctly this is
replacing /proc/acpi/wakeup functionality, yes?

So I think if this is the case we just introduce a new capability
"wakeup" along with an interface with two methods

 bool org.freedesktop.Hal.Device.Wakeup.GetWakeUp()
 void org.freedesktop.Hal.Device.Wakeup.SetWakeUp(bool should_wakeup)

and then gpm, kpowersave and other policy agents can present a nice UI
around that for common devices like keyboards / mice etc.? Would that
work?

     David




More information about the hal mailing list