我曾经在ondemand
调速器上使用我的笔记本电脑,它根据CPU的使用情况切换CPU频率。多年来,它运行得很好,有三个非常重要的优点:
现在我已经升级了我的笔记本电脑(联想B5400,英特尔奔腾3550 M)和系统(Ubuntu14.10),我发现:
performance
和powersave
调控器可用;ondemand
不再可用和支持。因此,我的系统:
performance
,这是错误的,我相信我试图编辑定义以下设置的/etc/init.d/cpufrequtils
:
ENABLE=“真”GOVERNOR=节能“MAX_SPEED="2300000”MIN_SPEED=“800000
我还尝试在scaling_min_freq
中编辑/sys/devices/system/cpu/cpu0/cpufreq
文件,并将其设置为800000。
而且,你猜怎么着,在重新启动系统之后,我再次处于performance
模式,频率在2.30GHz和2.30GHz之间。
请你解释一下:
( a)在Ubuntu14.10中,最小/最大CPU频率的主设置到底在哪里?
( b)如何定义频率和调速器,以实现与旧的好ondemand
相同的结果?(我想用尽可能低的频率工作,只在重负荷的情况下上升)
以及如何避免重置我定义的内容,当然。
如果能得到解释我会很感激的。
发布于 2015-04-25 11:31:13
我在.bashrc
中将它设置为别名(和root
),因为我遇到了类似的问题。
化名如下:
alias performance="echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor"
alias powersave="echo powersave > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor"
alias ondemand="echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor"
然后可以编写powersave
,以便在BASH
控制台上启用节能选项。当我想使用特定的缩放调控器时,我将其放在/etc/rc.local
中:
#!/bin/sh -e
# rc.local
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
for i in `ls -d /sys/devices/system/cpu/cpu*|grep -v cpufreq|grep -v cpuidle`; do echo ondemand > $i/cpufreq/scaling_governor; done
exit 0
您可能有多个处理器,因此相应地编辑它。我懒得写一个简短的脚本,但如果你让我这么做的话,我会这么做的:)
编辑:我将脚本添加到/etc/rc.local
中
https://askubuntu.com/questions/541584
复制相似问题