[PATCH 1/3] CPU frequency scaling addon
Richard Hughes
hughsient at gmail.com
Wed Aug 16 15:48:47 PDT 2006
On Fri, 2006-08-11 at 19:45 +0200, Holger Macht wrote:
> diff --git a/fdi/policy/10osvendor/10-power-mgmt-policy.fdi b/fdi/policy/10osvendor/10-power-mgmt-policy.fdi
> index 3c292fd..27f837f 100644
> --- a/fdi/policy/10osvendor/10-power-mgmt-policy.fdi
> +++ b/fdi/policy/10osvendor/10-power-mgmt-policy.fdi
> @@ -26,6 +26,8 @@
> <match key="info.udi" string="/org/freedesktop/Hal/devices/computer">
> <append key="info.interfaces" type="strlist">org.freedesktop.Hal.Device.SystemPowerManagement</append>
>
> + <append key="info.addons" type="strlist">hald-addon-cpufreq</append>
> +
> <append key="org.freedesktop.Hal.Device.SystemPowerManagement.method_names" type="strlist">Suspend</append>
> <append key="org.freedesktop.Hal.Device.SystemPowerManagement.method_signatures" type="strlist">i</append>
> <append key="org.freedesktop.Hal.Device.SystemPowerManagement.method_argnames" type="strlist">num_seconds_to_sleep</append>
Been testing some more...
Holger, with your patch applied, does:
dbus-send --system --print-reply --dest=org.freedesktop.Hal \
/org/freedesktop/Hal/devices/computer \
org.freedesktop.Hal.Device.SystemPowerManagement.Suspend \
int32:0
work correctly? When I comment out the hald-addon-cpufreq bit (and restart haldaemon), i.e.
<!--<append key="info.addons" type="strlist">hald-addon-cpufreq</append>-->
Suspend and Hibernate start to work correctly.
Changing the append to
<append key="info.addons" type="strlist">hald-addon-fubar</append>
also let Suspend and Hibernate work.
Looking at the cpufreq addon source some more, I see:
+ if (!libhal_device_claim_interface(halctx, udi,
+ "org.freedesktop.Hal.Device.SystemPowerManagement",
So this means the addon claims o.f.h.d.SystemPowerManagement for it's
sole use? This means that the other stuff won't ever be used :-(
I'm guessing the interface it claims should be:
o.f.h.d.CpuFreqPowerManagement
or something similar, but not generic like SystemPowerManagement.
David, is this correct? If an addon claims an interface then nothing
else can use it (hal methods included)?
I think this needs to be fixed before the patches are merged IMO.
Richard.
More information about the hal
mailing list