尽管使用了性能调节器,处理器频率仍停留在最低水平。内核和硬件在频率上不一致?

尽管使用了性能调节器,处理器频率仍停留在最低水平。内核和硬件在频率上不一致?

我在 Linux (Ubuntu 18.04) 上使用具有四个处理器核心的 MacBook Retina:

$ grep -E '^model name|^cpu MHz' /proc/cpuinfo
model name  : Intel(R) Core(TM) i5-4258U CPU @ 2.40GHz
cpu MHz     : 799.976
model name  : Intel(R) Core(TM) i5-4258U CPU @ 2.40GHz
cpu MHz     : 799.993
model name  : Intel(R) Core(TM) i5-4258U CPU @ 2.40GHz
cpu MHz     : 799.992
model name  : Intel(R) Core(TM) i5-4258U CPU @ 2.40GHz
cpu MHz     : 800.016

为了启用这个调速器(以及按需调速器),我切换到了acpi-cpufreq驱动程序。请遵循 (将 CPU 调速器设置为按需或保守) 和 (https://ubuntuforums.org/showthread.php?t=1767485),我必须在以下位置启用两个内核标志grub.cfg

intel_pstate=disable processor.ignore_ppc=1

反正。这就是cpufreq-info给我的:

  driver: acpi-cpufreq
  CPUs which run at the same hardware frequency: 3
  CPUs which need to have their frequency coordinated by software: 3
  maximum transition latency: 10.0 us.
  hardware limits: 768 MHz - 2.40 GHz
  available frequency steps: 2.40 GHz, 2.40 GHz, 2.30 GHz, 2.00 GHz, 1.80 GHz, 1.50 GHz, 1.30 GHz, 1.10 GHz, 900 MHz, 768 MHz
  available cpufreq governors: conservative, ondemand, userspace, powersave, performance, schedutil
  current policy: frequency should be within 768 MHz and 2.40 GHz.
                  The governor "performance" may decide which speed to use
                  within this range.
  current CPU frequency is 800 MHz.

因此,768-2400MHz 的硬件限制是众所周知的,但不知何故,它拒绝摆脱 800MHz。我尝试使用 ondemand 但没有成功。

现在这是有趣的部分。如果我简单地使用cpupower frequency-info,我得到

  current CPU frequency: Unable to call hardware
  current CPU frequency: 800 MHz (asserted by call to kernel)

但是,如果我cpupower以 root 身份调用,我会得到

  current CPU frequency: 2.40 GHz (asserted by call to hardware)

这怎么可能?内核和硬件报告不同的值(而且感觉很慢,所以我相信内核)。您知道这里可能出现什么问题吗?

相关内容