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驅動程式中?)存在忽略渦輪增壓的錯誤?

我的規格是:

筆記型電腦 Lenovo T480
Ubuntu 20.04.5 LTS
英特爾® 酷睿™i7-8650U CPU@ 1.90GHz × 8
Linux t480 5.15.0-46-generic #49~20.04.1-Ubuntu SMP 8 月 4 日星期四 19:15:44 UTC 2022 x86_64 x86_64 x86_64 GNU/Lin

其他

我還嘗試在重新插入電源線後將調速器設置為“性能”,但這對最大範圍沒有任何作用:

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

這個問題的關鍵訊息是 1.90 GHz 的基本 CPU 頻率和 4.20 GHz 的最大 Turbo 頻率,根據所提供的信息,暗示從筆記型電腦上拔下充電器後可能會禁用 Turbo boost。

當使用intel_pstate CPU頻率縮放驅動程式時,檢查的原始方法是:

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

其中 1 表示停用 Turbo 頻率,0 表示可依需求要求和使用 Turbo 頻率。

所以問題變成了:什麼服務或任務在拔掉筆記型電腦充電器時禁用了 Turbo,為什麼在插入充電器時沒有啟用 Turbo?

至少在某些情況下,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」註解掉了。

相關內容