Ubuntu 13.04 CPU频率缩放以最低频率“卡住”


10

我刚刚在MacBook Air上安装了Ubuntu 13.04,在玩了一会儿之后,机器感觉真的很慢,所以我检查了CPU频率。cpufreq-info,它在所有4个内核上报告800MHz(这是最低设置)。调速器设置为按需。现在,当我在系统上施加一些负载(运行一个四次散列杂物的小脚本)时,机器会停滞不前,但cpufreq-info仍报告800MHz。我可以手动将频率设置为2GHz,这可以解决性能问题,但是会消耗我的电池电量。

这是cpufreq-info的输出:

cpufrequtils 008: cpufreq-info (C) Dominik Brodowski 2004-2009
Report errors and bugs to cpufreq@vger.kernel.org, please.
analyzing CPU 0:
  driver: acpi-cpufreq
  CPUs which run at the same hardware frequency: 0 1 2 3
  CPUs which need to have their frequency coordinated by software: 0
  maximum transition latency: 10.0 us.
  hardware limits: 800 MHz - 2.00 GHz
  available frequency steps: 2.00 GHz, 2.00 GHz, 1.90 GHz, 1.80 GHz, 1.70 GHz, 1.60 GHz, 1.50 GHz, 1.40 GHz, 1.30 GHz, 1.20 GHz, 1.10 GHz, 1000 MHz, 900 MHz, 800 MHz
  available cpufreq governors: conservative, ondemand, userspace, powersave, performance
  current policy: frequency should be within 800 MHz and 2.00 GHz.
                  The governor "ondemand" may decide which speed to use
                  within this range.
  current CPU frequency is 800 MHz (asserted by call to hardware).
  cpufreq stats: 2.00 GHz:5,75%, 2.00 GHz:0,47%, 1.90 GHz:0,00%, 1.80 GHz:0,01%, 1.70 GHz:0,01%, 1.60 GHz:0,01%, 1.50 GHz:0,01%, 1.40 GHz:0,01%, 1.30 GHz:0,01%, 1.20 GHz:0,02%, 1.10 GHz:0,01%, 1000 MHz:0,02%, 900 MHz:0,02%, 800 MHz:93,67%  (1388)
analyzing CPU 1:
  driver: acpi-cpufreq
  CPUs which run at the same hardware frequency: 0 1 2 3
  CPUs which need to have their frequency coordinated by software: 1
  maximum transition latency: 10.0 us.
  hardware limits: 800 MHz - 2.00 GHz
  available frequency steps: 2.00 GHz, 2.00 GHz, 1.90 GHz, 1.80 GHz, 1.70 GHz, 1.60 GHz, 1.50 GHz, 1.40 GHz, 1.30 GHz, 1.20 GHz, 1.10 GHz, 1000 MHz, 900 MHz, 800 MHz
  available cpufreq governors: conservative, ondemand, userspace, powersave, performance
  current policy: frequency should be within 800 MHz and 2.00 GHz.
                  The governor "ondemand" may decide which speed to use
                  within this range.
  current CPU frequency is 800 MHz (asserted by call to hardware).
  cpufreq stats: 2.00 GHz:3,17%, 2.00 GHz:0,01%, 1.90 GHz:0,01%, 1.80 GHz:0,00%, 1.70 GHz:0,00%, 1.60 GHz:0,01%, 1.50 GHz:0,01%, 1.40 GHz:0,01%, 1.30 GHz:0,01%, 1.20 GHz:0,01%, 1.10 GHz:0,01%, 1000 MHz:0,02%, 900 MHz:0,02%, 800 MHz:96,71%  (1433)
analyzing CPU 2:
  driver: acpi-cpufreq
  CPUs which run at the same hardware frequency: 0 1 2 3
  CPUs which need to have their frequency coordinated by software: 2
  maximum transition latency: 10.0 us.
  hardware limits: 800 MHz - 2.00 GHz
  available frequency steps: 2.00 GHz, 2.00 GHz, 1.90 GHz, 1.80 GHz, 1.70 GHz, 1.60 GHz, 1.50 GHz, 1.40 GHz, 1.30 GHz, 1.20 GHz, 1.10 GHz, 1000 MHz, 900 MHz, 800 MHz
  available cpufreq governors: conservative, ondemand, userspace, powersave, performance
  current policy: frequency should be within 800 MHz and 2.00 GHz.
                  The governor "ondemand" may decide which speed to use
                  within this range.
  current CPU frequency is 800 MHz (asserted by call to hardware).
  cpufreq stats: 2.00 GHz:2,69%, 2.00 GHz:0,00%, 1.90 GHz:0,01%, 1.80 GHz:0,01%, 1.70 GHz:0,01%, 1.60 GHz:0,02%, 1.50 GHz:0,01%, 1.40 GHz:0,01%, 1.30 GHz:0,02%, 1.20 GHz:0,02%, 1.10 GHz:0,01%, 1000 MHz:0,02%, 900 MHz:0,02%, 800 MHz:97,16%  (1194)
analyzing CPU 3:
  driver: acpi-cpufreq
  CPUs which run at the same hardware frequency: 0 1 2 3
  CPUs which need to have their frequency coordinated by software: 3
  maximum transition latency: 10.0 us.
  hardware limits: 800 MHz - 2.00 GHz
  available frequency steps: 2.00 GHz, 2.00 GHz, 1.90 GHz, 1.80 GHz, 1.70 GHz, 1.60 GHz, 1.50 GHz, 1.40 GHz, 1.30 GHz, 1.20 GHz, 1.10 GHz, 1000 MHz, 900 MHz, 800 MHz
  available cpufreq governors: conservative, ondemand, userspace, powersave, performance
  current policy: frequency should be within 800 MHz and 2.00 GHz.
                  The governor "ondemand" may decide which speed to use
                  within this range.
  current CPU frequency is 800 MHz (asserted by call to hardware).
  cpufreq stats: 2.00 GHz:3,07%, 2.00 GHz:0,02%, 1.90 GHz:0,01%, 1.80 GHz:0,00%, 1.70 GHz:0,01%, 1.60 GHz:0,01%, 1.50 GHz:0,01%, 1.40 GHz:0,01%, 1.30 GHz:0,01%, 1.20 GHz:0,01%, 1.10 GHz:0,03%, 1000 MHz:0,03%, 900 MHz:0,01%, 800 MHz:96,77%  (1004)

Answers:


4

我在最新版本的Mint上也遇到了同样的问题,将缩放比例设置为保守似乎与按需工作方式最接近。

然后我发现了问题所在,up_threshold太高了,将其设置为95%的负载,现在这对于连续负载是可以的,但是在大多数情况下,CPU活动很少,因此您需要CPU扩展到100%的速度要快得多。我通过将th_up_threshold设置得较低来解决此问题(在我的情况下,75似乎可以)。您可以通过将所需的值回显到来更改它/sys/devices/system/cpu/cpufreq/ondemand/up_threshold


2

我建议您使用是否有类似Jupiter的省电应用程序?

并使用indicator-cpufreq,以便您应该知道所使用的频率。检查我粘贴的链接如何安装/配置indicator-cpufreq

是否有类似于Jupiter的节能应用程序?第3节)处理器和频率缩放

ondemand        Dynamically switch between CPU(s) available if at 95% cpu load

保持较低的Cpu,只有在95%cpu负载下才超过

performance     Run the cpu at max frequency

conservative    Dynamically switch between CPU(s) available if at 75% load

保持Cpu较低,只有在75%cpu负载时才超过

powersave       Run the cpu at the minimum frequency

0

我在14.04-16.04(今天)遇到了这个问题。为了解决这个问题,我不得不强迫Ubuntu忽略BIOS的限制。以下为我工作:

打开g:

sudo vim /etc/default/grub

替换GRUB_CMDLINE_LINUX_DEFAULT行:

- GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
+ GRUB_CMDLINE_LINUX_DEFAULT="quiet splash intel_pstate=disable processor.ignore_ppc=1"

更新grub:

sudo update-grub

然后重新启动:

echo 1 | sudo dd of=/sys/module/processor/parameters/ignore_ppc
echo 2900000 | sudo dd of=/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq 
echo 2900000 | sudo dd of=/sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq 
echo 2900000 | sudo dd of=/sys/devices/system/cpu/cpu2/cpufreq/scaling_max_freq 
echo 2900000 | sudo dd of=/sys/devices/system/cpu/cpu3/cpufreq/scaling_max_freq 

为我工作。检查cpu内核的数量,并进行相应的更新。您可能希望将这些多余的行放在/etc/rc.local中,以便它们在每次引导时执行。

忍者编辑:将上面的2900000替换为以下值:

cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq

此后,频率缩放工作正常吗,温度和性能都相同或更好?然后您读/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq然后将相同的值写回去吗?为什么?是否写1来ignore_ppc更改值?(PS可以使用tee>代替dd
Xen2050
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.