PowerNow! frequency scaling causes stalls
I have a new laptop with an AMD Mobile Sempron, and I'm experimenting with the PowerNow! frequency scaling. It seems to work, but on every frequency change, everything stalls for 3-4 seconds, even the X mouse pointer! Keyboard input seems to be buffered though. Is this normal?
I'm currently using the builtin frequency scaling "governors" of the kernel with the following settings:
echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor echo 15000000 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate
echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/ignore_nice
However, using the powernow daemon results in the same behavior.
Here are the relevant kernel (2.6.13.2) options:
#
# CPU Frequency scaling
#CONFIG_CPU_FREQ=yCONFIG_CPU_FREQ_TABLE=y CONFIG_CPU_FREQ_DEBUG=y CONFIG_CPU_FREQ_STAT=y CONFIG_CPU_FREQ_STAT_DETAILS=y
# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y 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_POWERNOW_K6 is not set
# CONFIG_X86_POWERNOW_K7 is not setCONFIG_X86_POWERNOW_K8=yCONFIG_X86_POWERNOW_K8_ACPI=y
# CONFIG_X86_GX_SUSPMOD is not set
# CONFIG_X86_SPEEDSTEP_CENTRINO is not set
# CONFIG_X86_SPEEDSTEP_ICH is not set
# CONFIG_X86_SPEEDSTEP_SMI is not set
# CONFIG_X86_P4_CLOCKMOD is not set
# CONFIG_X86_CPUFREQ_NFORCE2 is not set
# CONFIG_X86_LONGRUN is not set
# CONFIG_X86_LONGHAUL is not set
This is reported in /var/log/messages:
Oct 3 22:04:35 acer kernel: CPU: AMD Mobile AMD Sempron(tm) Processor 3000+ stepping 02 [...] Oct 3 22:04:35 acer kernel: powernow-k8: Found 1 AMD Athlon 64 / Opteron processors (version 1.50.3) Oct 3 22:04:35 acer kernel: powernow-k8: 0 : fid 0xa (1800 MHz), vid 0xa (1300 mV) Oct 3 22:04:35 acer kernel: powernow-k8: 1 : fid 0x8 (1600 MHz), vid 0xc (1250 mV) Oct 3 22:04:35 acer kernel: powernow-k8: 2 : fid 0x0 (800 MHz), vid 0x13 (1075 mV) Oct 3 22:04:35 acer kernel: cpu_init done, current fid 0xa, vid 0xa
Signature · 3 lines
Dick Streefland //// Altium BV [email protected] (@ @) http://www.altium.com --------------------------------oOO--(_)--OOo---------------------------
[email protected] (Dick Streefland) wrote:
| I have a new laptop with an AMD Mobile Sempron, and I'm experimenting | with the PowerNow! frequency scaling. It seems to work, but on every | frequency change, everything stalls for 3-4 seconds, even the X mouse | pointer! Keyboard input seems to be buffered though. Is this normal?
I found out that the pauses only occur when the X server is running, not when I work on the console, or remotely. I can easily reproduce the problem by playing an mp3 file in a console with mpg321, and then running burnK7 to force frequency scaling. Without X server running, everything works fine, but when the X server is running, the music skips on frequency changes. However, when I start the X server, but switch back to the console with CTRL-ALT-F1, there are no skips.
Apparently, some Ubuntu users experienced the same problem:
http://ubuntuforums.org/archive/index.php/t-17816.html
https://bugzilla.ubuntu.com/show_bug.cgi?id=7121
I already recompiled the kernel with CONFIG_PREEMPT, but that doesn't help. Is this some timing issue in the X server (X.org 6.8.2)? Is there something else to try?
Signature · 3 lines
Dick Streefland //// Altium BV [email protected] (@ @) http://www.altium.com --------------------------------oOO--(_)--OOo---------------------------
[email protected] (Dick Streefland) wrote:
| I found out that the pauses only occur when the X server is running, | not when I work on the console, or remotely. I can easily reproduce | the problem by playing an mp3 file in a console with mpg321, and then | running burnK7 to force frequency scaling. Without X server running, | everything works fine, but when the X server is running, the music | skips on frequency changes. However, when I start the X server, but | switch back to the console with CTRL-ALT-F1, there are no skips.
It's me again :-). I solved the problem by changing the X.org video driver from "vesa" to "sis". So it looks like the vesa driver (or frame buffer?) is doing something funky.
Signature · 3 lines
Dick Streefland //// Altium BV [email protected] (@ @) http://www.altium.com --------------------------------oOO--(_)--OOo---------------------------