Press "Enter" to skip to content

Ubuntu系统更改CPU频率

在Ubuntu 12.04系统上更改CPU频率,涉及到的内核参数值为scaling_governor

$ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor 
performance

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

$ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies 
3101000 3100000 2900000 2700000 2500000 2300000 2100000 1900000 1700000 1600000 
sudo apt-get install cpufrequtils

相关参数
$ cpufreq-selector -h
  -c, --cpu           CPU Number
  -g, --governor      Governor
  -f, --frequency     Frequency in KHz

试着调整一下
$ sudo cpufreq-selector -c 0 -g performance

看看结果
$ cat /proc/cpuinfo | grep MHz
cpu MHz		: 3101.000
cpu MHz		: 1600.000
cpu MHz		: 1600.000
cpu MHz		: 1600.000

设置开机自动调整
$ sudo vim /etc/rc.local     #加入如下四行
sudo cpufreq-selector -c 0 -g performance
sudo cpufreq-selector -c 1 -g performance
sudo cpufreq-selector -c 2 -g performance
sudo cpufreq-selector -c 3 -g performance

万恶的Ubuntu,竟然不支持sudo echo xx > file。

2 Comments

  1. Anonymous 2022-09-05

    这篇文章有用的信息很有趣,写得很好,感谢你提供这些信息。

  2. Anonymous 2022-09-05

    文章不错

Leave a Reply

Your email address will not be published. Required fields are marked *