More CPU Scaling Problems

Evan eapache at gmail.com
Sun May 17 20:06:32 UTC 2009


On Sun, May 17, 2009 at 2:30 AM, Stefan Lesicnik <stefan at lsd.co.za> wrote:

>
>
> On Sun, May 17, 2009 at 2:08 AM, Evan <eapache at gmail.com> wrote:
>
>> 1. What does Ubuntu use to scale CPU frequencies? Does it use the kernel
>> method, as described at [1], or something else?
>> 2. Did the method change between Intrepid and Jaunty?
>>
>> I ask these two questions because in Intrepid it worked fine
>> out-of-the-box, and in Jaunty it's been doing some really creepy things.
>>
>> I originally started looking at this because the ignore_nice_load default
>> value (discussed previously) appeared to have changed. I wanted to change it
>> back, so as per the instructions at [1] I added the proper lines to my
>> /etc/rc.local file. The value was ignored, and I filed a bug regarding it at
>> [2].
>>
>> I recently decided to change the default state of my cores from ondemand
>> to powersave, and since I saw no easier way to do it, I added another few
>> lines to rc.local. These also appeared to be ignored. Since I can change the
>> governor manually using the same cmd I added to rc.local, and I know
>> rc.local is being properly read, I knew something was fishy, so I did a few
>> experiments.
>>
>> This is what I determined: every few minutes, something changes the
>> governor on my CPU cores back to ondemand. I have a relatively vanilla
>> install of Jaunty 64, and I know I haven't installed anything extra that
>> should be touching my cpu governors (feel free to prove me wrong on this).
>> Both the gnome monitor applet and /sys/devices have been used to change the
>> governor, and both agree that it changes back. The ignore_nice_load value
>> doesn't seem to change, but the fact that it's being ignored seems like it's
>> probably related.
>>
>> Is something funny going on, or am I barking up the wrong tree?
>>
>> Evan
>>
>> [1] http://www.pantz.org/software/cpufreq/usingcpufreqonlinux.html
>> [2] https://bugs.launchpad.net/ubuntu/+source/cpufreqd/+bug/368809
>>
>>
>>
> Hi Evan,
>
> I am not sure (i looked at it briefly a while back), but I think its using
> HAL.  Thats why  /usr/lib/hal/hald-addon-cpufreq runs as a process.
> Therefore the corresponding stuff is probably in
> /usr/share/hal/fdi/policy/10osvendor/10-cpufreq.fdi, and you can use the
> hal-get-property and hal-set-property commands to query and set.
>
> If you want to do other stuff, i think killing that hald cpufreq process
> should let you then... (although there may be a safer saner way to do this)
>
> Stefan


I don't know if that's right. I've attached my cpufreq.fdi file, and as you
can see, it's pretty empty. I've never worked with Hal before so I can't say
for sure, but I don't see anything relating to governors or frequencies in
there.

I looked up Hal on google and found something interesting at [1], but I keep
getting DBus access denied errors even when I run dbus-send with sudo. I've
never worked with DBus before either, so just to be sure I've copied the
whole text of my call and the response below:

eapache at evan-ubuntu:~$ sudo dbus-send --system --dest=org.freedesktop.Hal
> --print-reply /org/freedesktop/Hal/Device/CPUFreq
> "org.freedesktop.Hal.SetCPUFreqConsiderNice" boolean:false



> Error org.freedesktop.DBus.Error.AccessDenied: Rejected send message, 1
> matched rules; type="method_call", sender=":1.83" (uid=0 pid=4979
> comm="dbus-send --system --dest=org.freedesktop.Hal --pr")
> interface="org.freedesktop.Hal" member="SetCPUFreqConsiderNice" error
> name="(unset)" requested_reply=0 destination="org.freedesktop.Hal" (uid=0
> pid=2935 comm="/usr/sbin/hald "))
>

I read somewhere that Karmic will be migrating from Hal to devicekit. Does
that mean that this whole thing is going to change again when I upgrade?

Evan

[1]
http://people.freedesktop.org/~david/hal-spec/hal-spec.html#interface-cpufreq<http://people.freedesktop.org/%7Edavid/hal-spec/hal-spec.html#interface-cpufreq>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-devel-discuss/attachments/20090517/5998a102/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 10-cpufreq.fdi
Type: application/octet-stream
Size: 266 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/ubuntu-devel-discuss/attachments/20090517/5998a102/attachment.obj>


More information about the Ubuntu-devel-discuss mailing list