Disabling cpu frequency scaling from user space at boot time
Hello, I have a notebook with a 1.5 GHz Mobile Celeron processor running Crux Linux. The kernel options for speedstep are compiled in and the default cpu governor is set to "performance" [1]. Nevertheless the cpu does not always run with its highest frequency. This makes usage of the notebook unresponsive. E.g. it takes almost a second to switch from one virtual screen to another when running X. I have found out that I can disable cpu frequency scaling running the following command: "cpufreq-selector -g performance" So I have put this command into rc.local. But having it in rc.local does not have the desired effect. The cpu frequency continues to scale down after booting until I issue the above command again when being logged in. Why does the above command in rc.local have no effect? Or is there another command I could put into rc.local to disable frequency scaling at boot time? I do not run the laptop on battery so saving battery life time is not an issue. [1] kernel 2.6.26 config: CONFIG_X86_SPEEDSTEP_CENTRINO=y CONFIG_X86_SPEEDSTEP_CENTRINO_TABLE=y CONFIG_X86_SPEEDSTEP_ICH=y # CONFIG_X86_SPEEDSTEP_SMI is not set CONFIG_X86_SPEEDSTEP_LIB=y # CONFIG_X86_SPEEDSTEP_RELAXED_CAP_CHECK is not set # CPU Frequency scaling CONFIG_CPU_FREQ=y CONFIG_CPU_FREQ_TABLE=y # CONFIG_CPU_FREQ_DEBUG is not set # CONFIG_CPU_FREQ_STAT is not set CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y # CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set # CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set # CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set # CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set CONFIG_CPU_FREQ_GOV_PERFORMANCE=y CONFIG_CPU_FREQ_GOV_POWERSAVE=y CONFIG_CPU_FREQ_GOV_USERSPACE=y CONFIG_CPU_FREQ_GOV_ONDEMAND=y CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y # CPUFreq processor drivers CONFIG_X86_ACPI_CPUFREQ=y # CONFIG_X86_CPUFREQ_NFORCE2 is not set CONFIG_X86_ACPI_CPUFREQ_PROC_INTF=y Regards, Markus
Markus Heinz wrote:
Hello,
I have a notebook with a 1.5 GHz Mobile Celeron processor running Crux Linux. The kernel options for speedstep are compiled in and the default cpu governor is set to "performance" [1]. Nevertheless the cpu does not always run with its highest frequency. This makes usage of the notebook unresponsive. E.g. it takes almost a second to switch from one virtual screen to another when running X.
I have found out that I can disable cpu frequency scaling running the following command: "cpufreq-selector -g performance" So I have put this command into rc.local. But having it in rc.local does not have the desired effect. The cpu frequency continues to scale down after booting until I issue the above command again when being logged in. Why does the above command in rc.local have no effect? Or is there another command I could put into rc.local to disable frequency scaling at boot time?
I do not run the laptop on battery so saving battery life time is not an issue.
[1] kernel 2.6.26 config:
CONFIG_X86_SPEEDSTEP_CENTRINO=y CONFIG_X86_SPEEDSTEP_CENTRINO_TABLE=y CONFIG_X86_SPEEDSTEP_ICH=y # CONFIG_X86_SPEEDSTEP_SMI is not set CONFIG_X86_SPEEDSTEP_LIB=y # CONFIG_X86_SPEEDSTEP_RELAXED_CAP_CHECK is not set # CPU Frequency scaling CONFIG_CPU_FREQ=y CONFIG_CPU_FREQ_TABLE=y # CONFIG_CPU_FREQ_DEBUG is not set # CONFIG_CPU_FREQ_STAT is not set CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y # CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set # CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set # CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set # CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set CONFIG_CPU_FREQ_GOV_PERFORMANCE=y CONFIG_CPU_FREQ_GOV_POWERSAVE=y CONFIG_CPU_FREQ_GOV_USERSPACE=y CONFIG_CPU_FREQ_GOV_ONDEMAND=y CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y # CPUFreq processor drivers CONFIG_X86_ACPI_CPUFREQ=y # CONFIG_X86_CPUFREQ_NFORCE2 is not set CONFIG_X86_ACPI_CPUFREQ_PROC_INTF=y
Regards,
Markus _______________________________________________ CRUX mailing list CRUX@lists.crux.nu http://lists.crux.nu/mailman/listinfo/crux
Are you sure the processor is capable? I'm not suggesting that it is not, just being sure. Run: cat /proc/cpuinfo and look for the "est" flag. Have you read this: http://softwarecommunity.intel.com/articles/eng/1611.htm There are a few script there that can help you out (bottom of article). As I recall, all I did was hide this command in my network startup script: echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor and everything worked fine. In fact, I hide everything powertop (http://www.lesswatts.org/projects/powertop/) suggests in my network startup script; but I'm on battery. If you plan on keeping your cpu at full throttle, are you going to monitor the temperature as well? Perhaps something like this (I have not tried this): http://kubuntuforums.net/forums/index.php?topic=3095144.0 Chris
Hello, On Sun, 03 Aug 2008 11:36:22 -0500 Chris Pemberton <cjpembo@gmail.com> wrote:
Markus Heinz wrote:
Hello,
I have a notebook with a 1.5 GHz Mobile Celeron processor running Crux Linux. The kernel options for speedstep are compiled in and the default cpu governor is set to "performance" [1]. Nevertheless the cpu does not always run with its highest frequency. This makes usage of the notebook unresponsive. E.g. it takes almost a second to switch from one virtual screen to another when running X.
I have found out that I can disable cpu frequency scaling running the following command: "cpufreq-selector -g performance" So I have put this command into rc.local. But having it in rc.local does not have the desired effect. The cpu frequency continues to scale down after booting until I issue the above command again when being logged in. Why does the above command in rc.local have no effect? Or is there another command I could put into rc.local to disable frequency scaling at boot time?
I do not run the laptop on battery so saving battery life time is not an issue.
[1] kernel 2.6.26 config:
CONFIG_X86_SPEEDSTEP_CENTRINO=y CONFIG_X86_SPEEDSTEP_CENTRINO_TABLE=y CONFIG_X86_SPEEDSTEP_ICH=y # CONFIG_X86_SPEEDSTEP_SMI is not set CONFIG_X86_SPEEDSTEP_LIB=y # CONFIG_X86_SPEEDSTEP_RELAXED_CAP_CHECK is not set # CPU Frequency scaling CONFIG_CPU_FREQ=y CONFIG_CPU_FREQ_TABLE=y # CONFIG_CPU_FREQ_DEBUG is not set # CONFIG_CPU_FREQ_STAT is not set CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y # CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set # CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set # CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set # CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set CONFIG_CPU_FREQ_GOV_PERFORMANCE=y CONFIG_CPU_FREQ_GOV_POWERSAVE=y CONFIG_CPU_FREQ_GOV_USERSPACE=y CONFIG_CPU_FREQ_GOV_ONDEMAND=y CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y # CPUFreq processor drivers CONFIG_X86_ACPI_CPUFREQ=y # CONFIG_X86_CPUFREQ_NFORCE2 is not set CONFIG_X86_ACPI_CPUFREQ_PROC_INTF=y
Are you sure the processor is capable? I'm not suggesting that it is not, just being sure.
Run:
cat /proc/cpuinfo
and look for the "est" flag.
Does the "est" stand for "enhanced speed step technology"? If yes, my cpu is not capable of it. It only supports the old (pre centrino) speedstep technology.
Have you read this:
This is a good resource to read. Thanks.
If you plan on keeping your cpu at full throttle, are you going to monitor the temperature as well?
I am not sure if my notebook supports temperature monitoring. But it can run with full trottle and high loads (e.g. compiling something complex) without problems. Now here is how I stopped the not wanted behaviour of throtteling down the cpu: I have found out that the default cpu governor (performance) is in use after booting until I log in with gdm. gdm starts "gnome-power-manager", even if I log in into XFCE which I usually do. This process changes the cpu governor to "ondemand". This causes the cpu frequency to scale down if there is no load for the cpu to process. Adding the following line to rc.local stops the scaling down: echo 1500000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq This sets the mininum cpu frequency to the highest supported value. Now the "ondemand" governor, which is still set by "gnome-power-manager", will not scale down the frequency any more. Thanks for the help. Regards, Markus
participants (2)
-
Chris Pemberton
-
Markus Heinz