Hi there, I have a ThinkPad X220 with a i7-2640M Sandy Bridge CPU and a serious problem with the intel_pstate driver. After booting up, everthing is fine. I use the powersave governor and run the following commands to throttle the CPU a bit and keep the machine cool and quiet: root /sys/devices/system/cpu/intel_pstate # echo 70 > max_perf_pct root /sys/devices/system/cpu/intel_pstate # echo 0 > min_perf_pct root /sys/devices/system/cpu/intel_pstate # echo 1 > no_turbo root /sys/devices/system/cpu/intel_pstate # cat * 70 0 1 After suspending and resuming the CPU is stuck at 800 MHz and the frequency simply won't go up. The whole machine is significantly slower. Trying to run the same commands as above results in this: root /sys/devices/system/cpu/intel_pstate # echo 70 > max_perf_pct root /sys/devices/system/cpu/intel_pstate # echo 0 > min_perf_pct root /sys/devices/system/cpu/intel_pstate # echo 1 > no_turbo root /sys/devices/system/cpu/intel_pstate # cat * 31 0 1 There's simply no way I can get everything back to normal unless I do a reboot. Is there any chance that this could be fixed in the next kernel version? Thanks in advance.
Hi: This is a regression? Please provide the output of "grep. /sys/bus/cpu/devices/cpu*/cpufreq/*" with root privilege.
I suppose you meant cat instead of "grep."?! Here's the output (after having done a suspend/resume): root ~ # cat /sys/bus/cpu/devices/cpu*/cpufreq/* 0 784000 3500000 800000 4294967295 0 performance powersave intel_pstate powersave 3500000 800000 <unsupported> 1 784000 3500000 800000 4294967295 1 performance powersave intel_pstate powersave 1900000 800000 <unsupported> 2 784000 3500000 800000 4294967295 2 performance powersave intel_pstate powersave 1500000 800000 <unsupported> 3 784000 3500000 800000 4294967295 3 performance powersave intel_pstate powersave 1100000 800000 <unsupported>
Sorry for later response. Could you check this on the v3.12-rc1? The intel pstate driver worked on x220 at last v3.9.3 from other reporter who tested on x220i . I guess this is triggered by recent change. https://bugzilla.kernel.org/show_bug.cgi?id=58531
Hi there, I've just tested 3.12-rc1 but there's no improvement. After a resume CPU frequency is still locked to 800 MHz and I cannot tweak the max_perf_pct value until I reboot.
I have reproduced this bug a fix will follow shortly
Please try the following patch: commit a54717512211712e79604aa319a3100d5ff8baa0 Author: Dirk Brandewie <dirk.j.brandewie@intel.com> Date: Mon Oct 14 08:53:55 2013 -0700 cpfreq/intel_pstate: Fix max_perf_pct on resume If the system is suspended while max_perf_pct is less than 100 percent or no_turbo set policy->{min,max} will be set incorrectly with scaled values which turn the scaled values into hard limits. Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com> --- drivers/cpufreq/intel_pstate.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c index 32b3479..3335f55 100644 --- a/drivers/cpufreq/intel_pstate.c +++ b/drivers/cpufreq/intel_pstate.c @@ -652,9 +652,8 @@ static int intel_pstate_cpu_init(struct cpufreq_policy *policy) else policy->policy = CPUFREQ_POLICY_POWERSAVE; - intel_pstate_get_min_max(cpu, &min_pstate, &max_pstate); - policy->min = min_pstate * 100000; - policy->max = max_pstate * 100000; + policy->min = cpu->pstate.min_pstate * 100000; + policy->max = cpu->pstate.turbo_pstate * 100000; /* cpuinfo and default policy values */ policy->cpuinfo.min_freq = cpu->pstate.min_pstate * 100000;
Hi there, I've been running a patched kernel with lots of suspends today. The patch has solved the issue. Thanks!
commit 52e0a509e5d6f902ec26bc2a8bb02b137dc453be Author: Dirk Brandewie <dirk.j.brandewie@intel.com> Date: Tue Oct 15 11:06:14 2013 -0700 cpufreq / intel_pstate: Fix max_perf_pct on resume Entered Linus' tree as of v3.12-rc6.