如何强制禁用intel_pstate?即使grub中的intel_pstate = disable选项,重新启动时也会启用intel_pstate

时间:2018-09-24 10:20:32

标签: linux linux-kernel cpu intel cpu-architecture

我正在尝试使用cpu-frequency标度设置cpu频率。在我的系统中,仅支持powersave,性能frequency-scaling-governor。在其他文档中对此进行了解释,默认情况下,intel_pstate是启用的,并且仅支持powersave,性能frequency-scaling-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-frequency标度(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?

1 个答案:

答案 0 :(得分:2)

很抱歉将其发布为答案,但我不具有将其发布为评论的声誉:/

在我的intel核心i7上尝试禁用intel_pstate驱动程序时,我遇到了同样的问题。设法禁用它时,acpi-cpufreq无法正确加载,因此禁用了SpeedStep。 SpeedStep允许通过这些微处理器中的软件来更改频率,并且禁用该频率后,只能由硬件来触摸。您可以通过BIOS设置访问此选项。希望对您有所帮助!