Kernel 如何解决cpufreqset错误

Kernel 如何解决cpufreqset错误,kernel,driver,frequency,cpu-speed,Kernel,Driver,Frequency,Cpu Speed,我想改变cpu的频率。我已经安装了cpufrequtils。 命令“cpufreq info”提供信息 cpufrequtils 008: cpufreq-info (C) Dominik Brodowski 2004-2009 Report errors and bugs to cpufreq@vger.kernel.org, please. analyzing CPU 0: driver: intel_pstate CPUs which run at the same hardwar

我想改变cpu的频率。我已经安装了cpufrequtils。 命令“
cpufreq info
”提供信息

cpufrequtils 008: cpufreq-info (C) Dominik Brodowski 2004-2009
Report errors and bugs to cpufreq@vger.kernel.org, please.
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: 0.97 ms.
  hardware limits: 1.20 GHz - 2.40 GHz
  available cpufreq governors: performance, powersave
  current policy: frequency should be within 1.20 GHz and 2.40 GHz.
                  The governor "performance" may decide which speed to use
                  within this range.
当我尝试运行命令时:“
sudo cpufreq set-f 1500000
”。我得到一个错误:

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?

你能告诉我如何解决这个问题吗?

试试sudo cpufreq set-g performance

直接回答方法

  • 在grub配置文件中禁用英特尔\u pstate:

    $ sudo vi /etc/default/grub
    
    在GRUB_CMDLINE_LINUX=选项中附加“英特尔pstate=disable”

  • 刷新grub启动配置文件:

    对于Ubuntu:

    $ sudo update-grub
    
    对于软呢帽:

    $ sudo grub2-mkconfig -o /boot/grub2/grub.cfg
    
  • 重新启动

    $ sudo reboot
    
  • 将CPU电源调节器设置为用户空间:

    $ sudo cpupower frequency-set --governor userspace
    
  • 设置CPU频率:

    $ sudo cpupower --cpu all frequency-set --freq 1.5GHz
    
  • 核实:

    $ cpupower frequency-info
    
    你们应该看到一行:“当前的CPU频率是1.50GHz。”

  • 冗长的回答

    无法设置CPU频率的原因是,您使用的驱动程序是“英特尔&pstate”,它是目前的默认驱动程序,只提供“性能”和“节能”策略。它们都不支持从用户空间直接操纵CPU频率。此外,最近的Intel CPU还实现了硬件P状态,这是一个硬件模块,用于直接在CPU芯片中监控CPU使用情况和调节P状态

    因此,为了按照您的意愿控制频率,选项是禁用“英特尔&pstate”驱动程序并使用较旧的“acpi cpufreq”驱动程序,该驱动程序具有“用户空间”策略,允许从用户空间控制CPU频率

    由于最近的Linux内核直接在内核中而不是作为模块构建了“英特尔———英特尔———英特尔——英特尔——英特尔——英特尔—&md。因此,必须提供内核cmdline参数“intelpstate=disable”才能做到这一点

    更多信息


    这个问题似乎离题了,因为它是关于在Linux下配置CPU调控器的。应该移动到unix.se