无法设置 CPU 缩放频率

无法设置 CPU 缩放频率

我在 clevo w605sj (Eurocom Electra 2) 上安装了 Ubuntu 15.04,当风扇打开时,噪音会非常大。有时这是不可接受的,所以我宁愿限制 CPU 并承受性能损失。问题是我无法让用户空间调节器可用。目前我有:

$ sudo cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors
performance powersave

于是我跑了:

$ sudo modprobe cpufreq_conservative cpufreq_ondemand cpufreq_powersave cpufreq_stats cpufreq_userspace freq_table

此命令似乎成功了,因为我没有收到任何错误消息。然而,

$ lsmod | grep freq

什么都没有返回。我对模块了解不多,所以我可能犯了一个非常简单的错误。我正尝试遵循以下指南:https://www.pantz.org/software/cpufreq/usingcpufreqonlinux.html。以下是 cpufreq-info 的输出,希望对您有帮助:

$ cpufreq-info
cpufrequtils 008: cpufreq-info (C) Dominik Brodowski 2004-2009
Report errors and bugs to [email protected], please.
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.20 GHz
  available cpufreq governors: performance, powersave
  current policy: frequency should be within 800 MHz and 3.20 GHz.
                  The governor "powersave" may decide which speed to use
                  within this range.
  current CPU frequency is 3.01 GHz (asserted by call to hardware).
analyzing CPU 1:
  driver: intel_pstate
  CPUs which run at the same hardware frequency: 1
  CPUs which need to have their frequency coordinated by software: 1
  maximum transition latency: 0.97 ms.
  hardware limits: 800 MHz - 3.20 GHz
  available cpufreq governors: performance, powersave
  current policy: frequency should be within 800 MHz and 3.20 GHz.
                  The governor "powersave" may decide which speed to use
                  within this range.
  current CPU frequency is 2.92 GHz (asserted by call to hardware).
analyzing CPU 2:
  driver: intel_pstate
  CPUs which run at the same hardware frequency: 2
  CPUs which need to have their frequency coordinated by software: 2
  maximum transition latency: 0.97 ms.
  hardware limits: 800 MHz - 3.20 GHz
  available cpufreq governors: performance, powersave
  current policy: frequency should be within 800 MHz and 3.20 GHz.
                  The governor "powersave" may decide which speed to use
                  within this range.
  current CPU frequency is 3.06 GHz (asserted by call to hardware).
analyzing CPU 3:
  driver: intel_pstate
  CPUs which run at the same hardware frequency: 3
  CPUs which need to have their frequency coordinated by software: 3
  maximum transition latency: 0.97 ms.
  hardware limits: 800 MHz - 3.20 GHz
  available cpufreq governors: performance, powersave
  current policy: frequency should be within 800 MHz and 3.20 GHz.
                  The governor "powersave" may decide which speed to use
                  within this range.
  current CPU frequency is 3.03 GHz (asserted by call to hardware).

答案1

经过进一步挖掘,我发现 intel_pstate 驱动程序实际上在 /sys/devices/system/cpu/intel_pstate/max_perf_pct 中有一个完全独立的机制:https://www.kernel.org/doc/Documentation/cpu-freq/intel-pstate.txt。看看是否有办法让它与旧的 cpufreq 调节器方式很好地配合,这仍然很有趣,而且我仍然很好奇为什么 modprobe 似乎没有效果,即使它没有返回任何错误,但目前这对我来说是可行的。

相关内容