Ondemand Frequency Governor broken in Ubuntu Natty (11.04) and work around
Dermot McDonnell
dmcdonnell at hotmail.com
Tue Apr 5 13:29:28 UTC 2011
I have had ubuntu for some time on a Dell Studio 1735 laptop with the latest bios. I have used ubuntu natty (11.04) 64-bit for two weeks and subscribe to daily updates. Last Friday, I upgraded my cpu to an Intel core 2 duo T7500 from an Intel mobile celeron dual core T1500. The T7500 has a 2.2GHz maximum cpu clock and a four times larger level 2 cache than the T1500 which has a maximum 1.86GHz cpu clock. Both cpus, T1500 & T7500, are rated 35W TDP (thermal design power).
The old T1500 always ran at 1861MHz according to the Ubuntu System Profiler and Benchmark utility. Sadly, the T7500 ran at 1200MHz upon installation regardless of what applications were running. The power supply for my Dell Studio is a 65W unit. Upon first boot with the T7500 cpu, the bios reported I should be using the Dell 95W power supply.
I examined /sys/devices/system/cpu/cpu0/cpufreq/bios_limit which reported 1200000 (1200MHz) as the cpu frequency limit imposed by the Dell bios. No changes to the Dell bios settings made any difference to this limit. After doing some research, I followed an on-line suggestion which fixed that issue - I added the line:
GRUB_CMDLINE_LINUX="processor.ignore_ppc=1"
to /etc/default/grub (see http://techmonks.net/bypassing-the-dell-unrecognized-adapter-issue). Remember to update grub if you do this!
The /sys/devices/system/cpu/cpu0/cpufreq/bios_limit now reports 2201000 (2201MHz) as the cpu frequency limit. However, the actual cpu frequency rate remained stubbornly at 1.2GHz regardless of load. cpufreq-info reported:
current policy: frequency should be within 1.20 GHz and 2.20 GHz.
The governor "ondemand" may decide which speed to use
within this range.
current CPU frequency is 1.20 GHz.
I had some success editing /etc/inid.d/local, inserting the lines:
sudo cpufreq-set -c 0 -g conservative -d 1.6GHz
sudo cpufreq-set -c 1 -g conservative -d 1.6GHz
This script is executed at boot. In the above case, cpufreq-set, imposes a minimum frequency, -d 1.6GHz, on each cpu core, -c 0 & -c 1, and hands control to the governor "conservative" via -g conservative. This worked great for a brief period, only for the governor to change back to "ondemand" automagically and a complete end to any frequency scaling.
Further research led me to edit the shell script /etc/init.d/ondemand which seems to get run regularly, imposing the seemingly broken "ondemand" governor instead of the perfectly functional "conservative" governor. I replaced the word "ondemand" with "conservative":
for CPUFREQ in /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
do
[ -f $CPUFREQ ] || continue
echo -n conservative > $CPUFREQ
done
My laptop now responds wonderfully well to load and I have no power supply issues or over heating.
Best regards to all,
Dermot McDonnell
Castlebar, Mayo, Ireland.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-bugsquad/attachments/20110405/164d1856/attachment.html>
More information about the Ubuntu-bugsquad
mailing list