如何更改 Ubuntu 原有的 CPU 升级配置

如何更改 Ubuntu 原有的 CPU 升级配置

我不想要包含以下内容的命令行解决方案安装什么都行。Ubuntu 在配置文件据我所知。我想正确找到并更改文件。

我不想禁用默认调控器,而是学习如何正确设置一。

答案1

该文件是/etc/init.d/ondemand

无需任何附加包,您就可以使用原始命令来操作频率缩放调节器。

首先,确定您有哪些可用的调速器:

cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_available_governors

也许看看你目前拥有的:

cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor

然后,如果与您想要的不同,只需设置其他可用的调节器之一,在此示例中为性能:

$ sudo su
# for file in /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor; do echo "performance" > $file; done
# exit

例子:

$ cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_available_governors
performance powersave
performance powersave
performance powersave
performance powersave
performance powersave
performance powersave
performance powersave
performance powersave
$ cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
powersave
powersave
powersave
powersave
powersave
powersave
powersave
powersave
$ sudo su
# for file in /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor; do echo "performance" > $file; done
# exit
exit
$ cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
performance
performance
performance
performance
performance
performance
performance
performance

相关内容