<div class="gmail_quote">On Sun, May 17, 2009 at 2:30 AM, Stefan Lesicnik <span dir="ltr"><<a href="mailto:stefan@lsd.co.za" target="_blank">stefan@lsd.co.za</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div></div><div><br><br><div class="gmail_quote">On Sun, May 17, 2009 at 2:08 AM, Evan <span dir="ltr"><<a href="mailto:eapache@gmail.com" target="_blank">eapache@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
1. What does Ubuntu use to scale CPU frequencies? Does it use the kernel method, as described at [1], or something else?<br>2. Did the method change between Intrepid and Jaunty?<br><br>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.<br>
<br>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].<br>
<br>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.<br>
<br>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.<br>
<br>Is something funny going on, or am I barking up the wrong tree?<br><br>Evan<br><br>[1] <a href="http://www.pantz.org/software/cpufreq/usingcpufreqonlinux.html" target="_blank">http://www.pantz.org/software/cpufreq/usingcpufreqonlinux.html</a><br>
[2] <a href="https://bugs.launchpad.net/ubuntu/+source/cpufreqd/+bug/368809" target="_blank">https://bugs.launchpad.net/ubuntu/+source/cpufreqd/+bug/368809</a><br>
<br><br></blockquote></div><br></div></div>Hi Evan,<br><br>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.<br>
<br>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)<br><font color="#888888"><br>Stefan</font></blockquote><div><br>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.<br>
<br>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:<br>
<br><blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote">eapache@evan-ubuntu:~$ sudo dbus-send --system --dest=org.freedesktop.Hal --print-reply /org/freedesktop/Hal/Device/CPUFreq "org.freedesktop.Hal.SetCPUFreqConsiderNice" boolean:false</blockquote>
<div> <br></div><blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote">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 "))<br>
</blockquote><br>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?<br><br>Evan<br><br>[1] <a href="http://people.freedesktop.org/%7Edavid/hal-spec/hal-spec.html#interface-cpufreq" target="_blank">http://people.freedesktop.org/~david/hal-spec/hal-spec.html#interface-cpufreq</a><br>
</div></div>