首页 > 解决方案 > 如何强制禁用 intel_pstate?即使在 grub 中使用 intel_pstate=disable 选项,也会在重新启动时启用 intel_pstate

问题描述

我正在尝试使用 cpu-frequency scaling 来设置 cpu 频率。在我的系统中,仅支持 powersave 、性能频率缩放调节器。在其他文档中有解释,默认情况下,intel_pstate 是启用的,它只支持 powersave ,性能频率缩放-governor 和解决方案是禁用 intel_pstate。所以我尝试如下禁用

sudo nano /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="intel_pstate=disable"
sudo update-grub

重新启动时,会启用 intel_pstate。

所以,我再次对 grub 进行了以下更改

sudo nano /etc/default/grub

GRUB_CMDLINE_LINUX_DEFAULT="intel_pstate=disable acpi=force"
sudo update-grub

重新启动时,它仍然显示 intel_pstate 已启用。

当我执行以下命令时,

$ cpupower -c all frequency-info

    analyzing CPU 7:
      driver: intel_pstate
      CPUs which run at the same hardware frequency: 7
      CPUs which need to have their frequency coordinated by software: 7
      maximum transition latency:  Cannot determine or is not supported.
      hardware limits: 1.60 GHz - 3.90 GHz
      available cpufreq governors: performance powersave
      current policy: frequency should be within 1.60 GHz and 3.90 GHz.
                      The governor "powersave" may decide which speed to use
                      within this range.
      current CPU frequency: 1.72 GHz (asserted by call to hardware)
      boost state support:
        Supported: yes
        Active: yes
        25500 MHz max turbo 4 active cores
        25500 MHz max turbo 3 active cores
        25500 MHz max turbo 2 active cores
        25500 MHz max turbo 1 active cores

     $ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_driver
     intel_pstate


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

由于用户空间调控器不可用,我无法使用 cpu 频率缩放 (cpupower)。

我正在使用 Intel Core-i7 @3.40GHZ、Linux debian-8.0(内核- 3.16.35)。

如果你能帮助我解决这个问题,那将是一个很大的帮助。先感谢您。

编辑1:

根据 Peter Cordes 的建议,我在启动时手动输入,现在intel_pstate 已禁用,但没有 cpu 频率调节器或 acpi cpufrequency 驱动程序未激活。

root@debian:~# cpupower -c 0 frequency-info
analyzing CPU 0:
  no or unknown cpufreq driver is active on this CPU
  CPUs which run at the same hardware frequency: Not Available
  CPUs which need to have their frequency coordinated by software: Not Available
  maximum transition latency:  Cannot determine or is not supported.
  hardware limits: Not Available
  available cpufreq governors: Not Available
  Unable to determine current policy
  current CPU frequency: Unable to call hardware
  current CPU frequency:  Unable to call to kernel
  boost state support:
    Supported: yes
    Active: yes
    25500 MHz max turbo 4 active cores
    25500 MHz max turbo 3 active cores
    25500 MHz max turbo 2 active cores
    25500 MHz max turbo 1 active cores

由于没有可用的 cpu 频率调节器,我无法设置 cpu 频率。尝试设置 cpu 频率时收到以下错误消息。

root@debian:~# cpupower -c 0 frequency-set -f 2000000
Setting cpu: 0
Error setting new values. Common errors:
- Do you have proper administration rights? (super-user?)
- Is the governor you requested available and modprobed?
- Trying to set an invalid policy?
- Trying to set a specific frequency, but userspace governor is not available,
   for example because of hardware which cannot be set to a specific frequency
   or because the userspace governor isn't loaded?

标签: linuxlinux-kernelcpuintelcpu-architecture

解决方案


很抱歉将此作为答案发布,但我没有发表评论的声誉:/

在我的英特尔酷睿 i7 中尝试禁用 intel_pstate 驱动程序时,我遇到了同样的问题。在设法禁用它时,acpi-cpufreq 没有​​正确加载,问题是 SpeedStep 被禁用。SpeedStep 允许通过这些微处理器中的软件更改频率,如果禁用它,则只能由硬件进行操作。您可以通过 BIOS 设置访问此选项。我希望这会有所帮助!


推荐阅读