每次从睡眠状态恢复后CPU时钟速度变慢

我在联想Y50-70上运行kubuntu 15.10,我的CPU时钟有一个非常烦人的问题:每当计算机从睡眠状态恢复时,CPU时钟的最大值都会降低,而且这种情况不会发生一次,但之后每个恢复时钟都比较慢,直到它从最初的3.6 GHz下降到~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:~# 

我把电脑睡在上面的命令之间。 如您所见,首先将max_perf_pct减小直到达到40,然后它保持40,但时钟速度继续降低。 笔记本电脑是否插入无关紧要,温度正常。

我认为它可能与此错误有关: https : //bugzilla.kernel.org/show_bug.cgi?id = 90421


最大的问题是我找不到手动将最大时钟设置回3.6 GHz的方法。 首先我尝试了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 

但这似乎是错误的方式因为使用了英特尔P-State驱动程序 ,所以我尝试了echo 100 >/sys/devices/system/cpu/intel_pstate/max_perf_pct而没有效果:

 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 

我也尝试过performance调控器,但没有成功。

如何将最大时钟频率设置回3.6 GHz?

您遇到的问题已多次报告过。
请参阅此bugzilla错误报告 。

该问题已被隔离到内核树中的特定提交。 该提交也被反向移植到一些以前稳定的内核版本。
但是,实际的根本原因是Lenovo BIOS问题。 引用linux-pm电子邮件post:

BIOS报告虚假被动跳闸点值,即0摄氏度…为了解决这个虚假的BIOS,我们应该通过检查跳闸点值来禁用那些无效的跳闸点,

如果您返回一个或两个版本,您的Lenovo将正常工作(已知4.2.0-19正常工作)。

您的问题不是时钟调制(寄存器0x19A)相关,除非您的电池电量低于30%(未经证实,但怀疑)。

参考文献:
http://ubuntuforums.org/showthread.php?t=2316101
奇怪的cpufreq扩展问题:无论调控器如何,max cpufreq在唤醒时逐渐下降
当电池电量低于30%时,i3以500Mhz节流
http://marc.info/?t=145816738700001&r=1&w=2