[PATCH 0/3] CPU frequency scaling addon

Richard Hughes hughsient at gmail.com
Mon Aug 14 11:22:37 PDT 2006


On Mon, 2006-08-14 at 19:54 +0200, Holger Macht wrote:
> On Mon 14. Aug - 18:48:23, Richard Hughes wrote:
> > On Sat, 2006-08-12 at 12:34 +0200, Holger Macht wrote:
> > > Just save the mail. diff ignores everything except the diff.
> > 
> > Yes, that worked, thanks.
> > 
> > Apart from looking in /org/freedesktop/Hal/devices/computer:info.addons
> > for the hald-addon-cpufreq addon name, is there a way for desktop
> > programs to find out if HAL can manage CPU scaling?
> > 
> > Maybe we need a power_management.can_do_cpu_scaling key or something
> > more suitable.
> 
> 
> Maybe checking if the CPUFreq methods are listed in the
> org.freedesktop.Hal.Device.SystemPowerManagement.method_names key is
> enough?
> 
> And if so, use the GetCPUFreqAvailableGovernors method to check if there
> are governors to be used.

Hmm. It's making it a bit difficult for applications to work out "can I
control the cpu frequency with HAL" but I guess it works for me.

> > 
> > I also noticed the addon doesn't exit if the computer doesn't have
> > a /sys/devices/system/cpu/cpu0/cpufreq/ directory which would probably
> > be a good thing.
> 
> But if a cpufreq driver (e.g. speedstep_centrino) or a governor is loaded
> after the addon exited but during runtime of HAL, the system suddenly gets
> CPUFreq capabilities but it couldn't be used anymore.

Yes, I wondered this. I figured the modules normally would be loaded
before HAL started and thus wouldn't be a problem. Agreed this wouldn't
be ideal.

Is there a way we can get an event from the kernel like "new cpufreq
module inserted" so can can then match and run the addon if not already
started?

Richard.




More information about the hal mailing list