Debian下自动控制Thinkpad x220的风扇

5243阅读 0评论2011-07-03 blue_stone
分类:LINUX

换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)


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




上一篇:走过的路
下一篇:偶即将废弃的Debian unstable x86