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。

发表评论

电子邮件地址不会被公开。