Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2386012
  • 博文数量: 384
  • 博客积分: 10193
  • 博客等级: 上将
  • 技术积分: 3785
  • 用 户 组: 普通用户
  • 注册时间: 2005-06-09 18:02
文章分类

全部博文(384)

文章存档

2011年(10)

2010年(29)

2009年(39)

2008年(36)

2007年(43)

2006年(198)

2005年(29)

分类: LINUX

2011-07-03 22:43:04

换X220后, 跑Linux时风扇老是在转,烦不胜烦,今天在网上搜了一把,终于找到了自动控制风扇转速的方法。

首先需要安装2个软件包:

 apt-get install lm-sensors thinkfan

其中, lm-sensors用于检测系统温度, thinkfan用来控制风扇转速.

运行sensors-detect来检查需要内核模块,基本上一路回车就可以了, 在最后会给出需要的模块列表,把这写模块添加到/etc/modules中, 让这些模块开机就加载,我的及其上加载的模块有:

# I2C adapter drivers
i2c-piix4
# Chip drivers
lm90
#k8temp
coretemp
sbs

创建文件/etc/modprobe.d/thinkpad_acpi.conf, 其中包含:

options thinkpad_acpi fan_control=1

然后重新生成initrd文件

update-initramfs -u

如果有多个内核,则需要一一更新initrd文件。

编辑
/etc/default/thinkfan,将START=no改为START=yes

由于新的thinkpad_acpi接口已经发生变化,需要编辑
/etc/thinkfan.conf,添加

sensor /sys/class/hwmon/hwmon0/temp1_input

来设置thinkfan从以上文件都取信息,否则将会报如下错误:

/proc/acpi/ibm/thermal: No such file or directory

重启thinkpad,现在风扇安静了很多,sensors结果如下:

# sensors
acpitz-virtual-0
Adapter: Virtual device
temp1:        +53.0°C  (crit = +99.0°C)

thinkpad-isa-0000
Adapter: ISA adapter
fan1:        2972 RPM

coretemp-isa-0000
Adapter: ISA adapter
Core 0:       +54.0°C  (high = +86.0°C, crit = +100.0°C)

coretemp-isa-0002
Adapter: ISA adapter
Core 1:       +53.0°C  (high = +86.0°C, crit = +100.0°C)


现在风扇安静了很多,再也不像以前一样快开拖拉机了




阅读(5181) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~