cpufreq-info 频率范围最大速度在重新插入电源后永远不会回到原来的最大值

cpufreq-info 频率范围最大速度在重新插入电源后永远不会回到原来的最大值

启动时cpufreq-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: 4294.55 ms.
  hardware limits: 400 MHz - 4.20 GHz
  available cpufreq governors: performance, powersave
  current policy: frequency should be within 400 MHz and 4.20 GHz.
                  The governor "powersave" may decide which speed to use
                  within this range.
  current CPU frequency is 800 MHz.

当我拔掉电源线时,最大频率降至 1.9 GHz

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: 4294.55 ms.
  hardware limits: 400 MHz - 4.20 GHz
  available cpufreq governors: performance, powersave
  current policy: frequency should be within 400 MHz and 1.90 GHz.
                  The governor "powersave" may decide which speed to use
                  within this range.
  current CPU frequency is 800 MHz.

这对于节省电池来说没什么问题,但是当重新插上电源线时,范围的最大值保持不变:

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: 4294.55 ms.
  hardware limits: 400 MHz - 4.20 GHz
  available cpufreq governors: performance, powersave
  current policy: frequency should be within 400 MHz and 1.90 GHz.
                  The governor "powersave" may decide which speed to use
                  within this range.
  current CPU frequency is 800 MHz.

我可以做些什么让它恢复到原来的 4.2 GHz 值吗?BIOS 已重新启动为其默认值。

鉴于以下规格,我的理解是,这个的“基本频率”i7-8650U CPU是 1.9 GHz,而“最大睿频”是 4.2 GHz。所以我怀疑某个地方(驱动程序中?)有一个错误intel_pstate忽略了睿频?

我的规格是:

联想 T480 笔记本电脑
Ubuntu 20.04.5 LTS
Intel® Core™i7-8650U CPU@ 1.90GHz × 8
Linux t480 5.15.0-46-generic #49~20.04.1-Ubuntu SMP 2022 年 8 月 4 日星期四 19:15:44 UTC x86_64 x86_64 x86_64 GNU/Linux

其他

我还尝试在重新插入电源线后将调速器设置为“性能”,但这对范围的最大值也没有任何影响:

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: 4294.55 ms.
  hardware limits: 400 MHz - 4.20 GHz
  available cpufreq governors: performance, powersave
  current policy: frequency should be within 400 MHz and 1.90 GHz.
                  The governor "performance" may decide which speed to use
                  within this range.
  current CPU frequency is 1.30 GHz.

答案1

这个问题的关键信息是基本 CPU 频率为 1.90 GHz,最大 Turbo 频率为 4.20 GHz,根据提供的信息,这暗示在从笔记本电脑上拔下充电器时可能会禁用 Turbo Boost。

当使用 intel_pstate CPU 频率调节驱动程序时,检查的原始方法是:

doug@s19:~$ cat /sys/devices/system/cpu/intel_pstate/no_turbo
1

其中 1 表示涡轮频率已禁用,而 0 表示涡轮频率可供请求并根据需要使用。

所以问题就变成了:拔下笔记本电脑充电器后,什么服务或任务会禁用涡轮增压,而为什么插入充电器后没有启用涡轮增压?

至少在某些情况下,tlp 服务配置似乎是罪魁祸首。我不知道是用户配置还是默认配置。该/etc/tlp.conf文件的相关区域是:

# Set the CPU "turbo boost" feature: 0=disable, 1=allow
# Requires an Intel Core i processor.
# Important:
# - This may conflict with your distribution's governor settings
# - A value of 1 does *not* activate boosting, it just allows it
# Default: <none>

#CPU_BOOST_ON_AC=1
CPU_BOOST_ON_BAT=0

因此,需要取消注释“CPU_BOOST_ON_AC=1”行以在服务重启或重新引导后激活它。

从问题评论来看,tlp 配置似乎还有一个问题。文件的相关区域/etc/tlp.conf

# Set Intel CPU P-state performance: 0..100 (%).
# Limit the max/min P-state to control the power dissipation of the CPU.
# Values are stated as a percentage of the available performance.
# Requires an Intel Core i processor with intel_pstate driver.
# Default: <none>

CPU_MAX_PERF_ON_AC="100"
CPU_MAX_PERF_ON_BAT="30"

看来 OP 最初已将“CPU_MAX_PERF_ON_AC”注释掉。

相关内容