LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1101|回复: 5

如何让普通用户获得足够权限运行cpufreq-set ?

[复制链接]
发表于 2009-7-28 23:28:08 | 显示全部楼层 |阅读模式
如何让普通用户获得足够权限运行cpufreq-set ?

  1. $ cpufreq-set -g ondemand
  2. Error setting new values. Common errors:
  3. - Do you have proper administration rights? (super-user?)
  4. - Is the governor you requested available and modprobed?
  5. - Trying to set an invalid policy?
  6. - Trying to set a specific frequency, but userspace governor is not available,
  7.    for example because of hardware which cannot be set to a specific frequency
  8.    or because the userspace governor isn't loaded?
复制代码
发表于 2009-7-28 23:43:18 | 显示全部楼层
Post by yourfriend;2010485
如何让普通用户获得足够权限运行cpufreq-set ?

  1. $ cpufreq-set -g ondemand
  2. Error setting new values. Common errors:
  3. - Do you have proper administration rights? (super-user?)
  4. - Is the governor you requested available and modprobed?
  5. - Trying to set an invalid policy?
  6. - Trying to set a specific frequency, but userspace governor is not available,
  7.    for example because of hardware which cannot be set to a specific frequency
  8.    or because the userspace governor isn't loaded?
复制代码


visudo编辑一下,添加这项到NOPASSWD那行可以不

不知道为什么要这么做呢?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-7-29 00:07:31 | 显示全部楼层
Post by YaoM;2010488
visudo编辑一下,添加这项到NOPASSWD那行可以不

不知道为什么要这么做呢?


当sensors-applet 或 ksensors 检测到 CPU 温度
达到温度53的时候就会执行
cpufreq-set -f 1800000
当降了后仍然达到更高的温度55的时候
cpufreq-set -f 1000000
当温度下降到38以下时,又恢复ondemand状态
cpufreq-set -g ondemand

还有,gentoo的cpufreq-selector默认给了普通用户权限,但cpufreq-selector是gnome-applets附送的。可是现在换了口味用kde 4.2.4 ,只好用 cpufreq-set 。

debian的cpufreq-selector默认普通用户不能调,但是可以通过dpkg-reconfigure gnome-applets 开关这个权限。

我还想问gentoo怎么关闭cpufreq-selector的普通用户权限呢?


..
回复 支持 反对

使用道具 举报

发表于 2009-7-29 00:44:26 | 显示全部楼层
实际上有个服务专门处理这个.
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-7-29 08:48:04 | 显示全部楼层
哦,愿闻其详!
回复 支持 反对

使用道具 举报

发表于 2009-7-29 08:51:51 | 显示全部楼层
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表