7

I'm running kubuntu 15.10 on a Lenovo Y50-70, and I have a very annoying problem with the CPU clock: Whenever the computer resumes from sleep, the CPU clock has a lower maximum, and this does not happen only once, but after every resume the clock is slower, until it's down from initially 3.6 GHz to ~600 MHz.

alain@alain-Y50-70:~$ sudo -i
[sudo] password for alain: 
root@alain-Y50-70:~# cpupower frequency-info
analyzing CPU 0:
  driver: intel_pstate
  CPUs which run at the same hardware frequency: 0
  CPUs which need to have their frequency coordinated by software: 0
  maximum transition latency: 0.97 ms.
  hardware limits: 800 MHz - 3.60 GHz
  available cpufreq governors: performance, powersave
  current policy: frequency should be within 800 MHz and 3.60 GHz.
                  The governor "powersave" may decide which speed to use
                  within this range.
  current CPU frequency is 817 MHz (asserted by call to hardware).
  boost state support:
    Supported: yes
    Active: yes
root@alain-Y50-70:~# cat /sys/devices/system/cpu/intel_pstate/max_perf_pct
100
root@alain-Y50-70:~# cpupower frequency-info
analyzing CPU 0:
  driver: intel_pstate
  CPUs which run at the same hardware frequency: 0
  CPUs which need to have their frequency coordinated by software: 0
  maximum transition latency: 0.97 ms.
  hardware limits: 800 MHz - 3.60 GHz
  available cpufreq governors: performance, powersave
  current policy: frequency should be within 800 MHz and 2.88 GHz.
                  The governor "powersave" may decide which speed to use
                  within this range.
  current CPU frequency is 800 MHz (asserted by call to hardware).
  boost state support:
    Supported: yes
    Active: yes
root@alain-Y50-70:~# cat /sys/devices/system/cpu/intel_pstate/max_perf_pct
80
root@alain-Y50-70:~# cat /sys/devices/system/cpu/intel_pstate/max_perf_pct
60
root@alain-Y50-70:~# cat /sys/devices/system/cpu/intel_pstate/max_perf_pct
40
root@alain-Y50-70:~# cat /sys/devices/system/cpu/intel_pstate/max_perf_pct                                 
40                                                                                                         
root@alain-Y50-70:~# cpupower frequency-info                                 
analyzing CPU 0:                                                                                           
  driver: intel_pstate                                                                                     
  CPUs which run at the same hardware frequency: 0                                                         
  CPUs which need to have their frequency coordinated by software: 0                                       
  maximum transition latency: 0.97 ms.                                                                     
  hardware limits: 800 MHz - 3.60 GHz                                                                      
  available cpufreq governors: performance, powersave                                                      
  current policy: frequency should be within 800 MHz and 1.44 GHz.                                         
                  The governor "powersave" may decide which speed to use                                   
                  within this range.                                                                       
  current CPU frequency is 699 MHz (asserted by call to hardware).                                         
  boost state support:                                                                                     
    Supported: yes                                                                                         
    Active: yes                                                                                            
root@alain-Y50-70:~# cat /sys/devices/system/cpu/intel_pstate/max_perf_pct                                 
40                                                                                                         
root@alain-Y50-70:~# cpupower frequency-info                                 
analyzing CPU 0:                                                                                           
  driver: intel_pstate                                                                                     
  CPUs which run at the same hardware frequency: 0                                                         
  CPUs which need to have their frequency coordinated by software: 0                                       
  maximum transition latency: 0.97 ms.                                                                     
  hardware limits: 800 MHz - 3.60 GHz                                                                      
  available cpufreq governors: performance, powersave                                                      
  current policy: frequency should be within 800 MHz and 1.44 GHz.                                         
                  The governor "powersave" may decide which speed to use                                   
                  within this range.                                                                       
  current CPU frequency is 605 MHz (asserted by call to hardware).                                         
  boost state support:                                                                                     
    Supported: yes                                                                                         
    Active: yes                                                                                            
root@alain-Y50-70:~#                                                                                       

I put the computer asleep between the commands above. As you can see, first the max_perf_pct is reduced in steps until it reaches 40, then it stays 40 but the clock speed continues to be reduced. It doesn't matter if the laptop is plugged in or not, and the temperature is normal.

I think it may be related to this bug: https://bugzilla.kernel.org/show_bug.cgi?id=90421


The biggest problem is that I can't find a way to manually set the max clock back to 3.6 GHz. First I tried cpupower frequency-set -u 3.60GHz:

root@alain-Y50-70:~# cpupower frequency-set -u 3.60GHz
Setting cpu: 0
Setting cpu: 1
Setting cpu: 2
Setting cpu: 3
Setting cpu: 4
Setting cpu: 5
Setting cpu: 6
Setting cpu: 7
root@alain-Y50-70:~# cpupower frequency-info
analyzing CPU 0:
  driver: intel_pstate
  CPUs which run at the same hardware frequency: 0
  CPUs which need to have their frequency coordinated by software: 0
  maximum transition latency: 0.97 ms.
  hardware limits: 800 MHz - 3.60 GHz
  available cpufreq governors: performance, powersave
  current policy: frequency should be within 800 MHz and 1.44 GHz.
                  The governor "powersave" may decide which speed to use
                  within this range.
  current CPU frequency is 699 MHz (asserted by call to hardware).
  boost state support:
    Supported: yes
    Active: yes
root@alain-Y50-70:~# cat /sys/devices/system/cpu/intel_pstate/max_perf_pct
40

but that seems to be the wrong way because the Intel P-State driver is used, so I tried echo 100 >/sys/devices/system/cpu/intel_pstate/max_perf_pct with no effect:

root@alain-Y50-70:~# echo 100 >/sys/devices/system/cpu/intel_pstate/max_perf_pct
root@alain-Y50-70:~# cpupower frequency-info
analyzing CPU 0:
  driver: intel_pstate
  CPUs which run at the same hardware frequency: 0
  CPUs which need to have their frequency coordinated by software: 0
  maximum transition latency: 0.97 ms.
  hardware limits: 800 MHz - 3.60 GHz
  available cpufreq governors: performance, powersave
  current policy: frequency should be within 800 MHz and 1.44 GHz.
                  The governor "powersave" may decide which speed to use
                  within this range.
  current CPU frequency is 700 MHz (asserted by call to hardware).
  boost state support:
    Supported: yes
    Active: yes
root@alain-Y50-70:~# cat /sys/devices/system/cpu/intel_pstate/max_perf_pct
40

I also tried the performance governor, with no success.

How can I set the maximum clock frequency back to 3.6 GHz?

7
  • Weird, I'm having the exact same issue on Arch Linux on my Lenovo Y50-70! It has been working fine up until a week or so ago. I thought that it is something with the kernel because I use Liquorix patchset (I have encountered the issue on 4.4.3 kernel and it is still present in 4.4.4). Which kernel do you use? Actually, I don't believe I am affected by the bug you point in the bugzilla since it used to work fine two weeks ago and before that. – Vlad Frolov Mar 12 '16 at 13:59
  • I use 4.2.0-30-generic #36-Ubuntu SMP Fri Feb 26 00:58:07 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux. I'm not sure when this problem started. – alain Mar 12 '16 at 14:04
  • One the second read, it seems that the issue on the bugtracker and the mentioned precedent issue bugzilla.kernel.org/show_bug.cgi?id=66581 are exactly what I see on my end. Have you tried to do wrmsr 0x19a 0 as described in this thread bbs.archlinux.org/viewtopic.php?id=199922 ? (It haven't helped me, but some people report that it worked for them.) – Vlad Frolov Mar 12 '16 at 14:39
  • Thanks for the suggestion @VladFrolov rdmsr returned 8, after wrmsrit's 0, but the frequencies are still the same unfortunately. – alain Mar 12 '16 at 17:09
  • Reading 8 from that register means clock modulation is not enabled. – Doug Smythies Mar 13 '16 at 0:13
6

The issue you are experiencing has been reported many times.
Please refer to this bugzilla bug report.

The issue has been isolated to a particular commit in the kernel tree. That commit has also been backported to some previous stable kernel versions.
However, the actual real root cause is a Lenovo BIOS problem. Quoting from the linux-pm e-mail thread:

BIOS reports bogus passive trip point value, which is 0 degree Celsius ... In order to workaround this bogus BIOS, we should disable those invalid trip points by checking the trip point value,

If you go back a version of or two, your Lenovo will work properly (4.2.0-19 is known to work properly).

Your issue is not clock modulation (register 0x19A) related, unless your battery is below 30% (unproven, but suspected).

References:
http://ubuntuforums.org/showthread.php?t=2316101
Strange cpufreq scaling issues: regardless of governor, max cpufreq drops incrementally on wake
i3 throttled at 500Mhz when battery under 30%
http://marc.info/?t=145816738700001&r=1&w=2

8
  • I have tested 4.4.5 and 4.5.0-rc7 kernel on my Arch Linux on Lenovo Y50-70. The issue is still there. I'm going to try 4.4.0 since I haven't seen this issue a week ago, and if it doesn't help, I will try 4.3.0 and 4.2.0. – Vlad Frolov Mar 13 '16 at 3:31
  • Yes, I understand the issue persists through kernel 4.5-rc7. See the Ubuntu forums reference. – Doug Smythies Mar 13 '16 at 5:48
  • Thanks, yes, older kernels seem to work. I tested 4.2.0-19, 4.2.0-21 and even 4.2.0-27 is ok, so it seems to have been introduced with 4.2.0-30. Do you know if there is a bug report already? – alain Mar 13 '16 at 10:27
  • For me, 4.4.0, 4.4.1, 4.4.2, and 4.4.3 are working fine! The regression appears in 4.4.4, and lives on in 4.4.5 and 4.5-rc7 for me. I guess, that Ubuntu backported something from 4.4.4 patchset... – Vlad Frolov Mar 13 '16 at 12:30
  • @alain According to Ubuntu changelog changelogs.ubuntu.com/changelogs/pool/main/l/linux/…, there were just a few patches in 4.2.0-30.36, 4.2.0-30.35, and 4.2.0-29, but there is a long list of patches in 4.2.0-28. It would be great if you could try two of those left (4.2.0-28 and 4.2.0.-29). I have tried to revert some patches from 4.4.4 patchset, but I haven't succeeded in guessing. Once you find the specific Ubuntu patchset causing troubles, we can compare mainline 4.4.4 and Ubuntu backports patchsets to find the black sheep. – Vlad Frolov Mar 13 '16 at 14:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.