![cpufreq-set 因分段错误而失败](https://linux22.com/image/891433/cpufreq-set%20%E5%9B%A0%E5%88%86%E6%AE%B5%E9%94%99%E8%AF%AF%E8%80%8C%E5%A4%B1%E8%B4%A5.png)
我的物理机上运行着 Ubuntu 16.04。我试图将所有 CPU 缩放调节器设置为“性能”。
已安装的软件包版本为:
# dpkg -l | grep cpufreq
ii cpufrequtils 008-1 amd64 utilities to deal with the cpufreq Linux kernel feature
ii libcpufreq0 008-1 amd64 shared library to deal with the cpufreq Linux kernel feature
当我尝试以下命令时,
# cpufreq-set -r -g performance
Segmentation fault
上面的命令 strace 显示了
open("/sys/devices/system/cpu/cpu0/cpufreq/related_cpus", O_RDONLY) = -1 ENOENT (No such file or directory)
--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0} ---
+++ killed by SIGSEGV +++
Segmentation fault
我看不到这些位置 ( /sys/devices/system/cpu/cpu*/cpufreq )。不知道缺少了什么。
cpufreq-info 显示“没有或未知的 cpufreq 驱动程序”,为什么?缺少什么驱动程序?
# cpufreq-info
cpufrequtils 008: cpufreq-info (C) Dominik Brodowski 2004-2009
Report errors and bugs to [email protected], please.
analyzing CPU 0:
no or unknown cpufreq driver is active on this CPU
maximum transition latency: 4294.55 ms.
analyzing CPU 1:
no or unknown cpufreq driver is active on this CPU
maximum transition latency: 4294.55 ms.
analyzing CPU 2:
no or unknown cpufreq driver is active on this CPU
maximum transition latency: 4294.55 ms.
analyzing CPU 3:
no or unknown cpufreq driver is active on this CPU
maximum transition latency: 4294.55 ms.
analyzing CPU 4:
no or unknown cpufreq driver is active on this CPU
maximum transition latency: 4294.55 ms.