Control your Thinkpad T430 fan speed in Ubuntu 12.

After researching for a few hours online to find a guide on how to control my Thinkpad’s fan speed I realized that the new models have some differences from previous models and the guides available are not complete if not wrong. So, I am making this tutorial for anyone that has a new Thinkpad ( x30/x20 models ) and needs to control his fan in order to keep the noise down and get more battery life.

Every step below uses the terminal so open an instance with the combination CRTL + ALT + T

  1. The first thing we will do is to install a program that will provide us information about the sensors of the laptop and their temperatures

    sudo apt-get install lm-sensors

    Configure the application in order to find every available sensor

    sudo sensors-detect

    Answer Yes to every question and the last confirmation for saving the changes made.

  2. Install thinkfan which is our main program
    sudo apt-get install thinkfan
  3. Add the coretemp module to the startup list. It will provide us the temperature inputs.

    echo coretemp >> /etc/modules
  4. Load the coretemp module

    sudo modprobe coretemp
  5. The next step is to find your temperature inputs so take note the results of the following command

    sudo find /sys/devices -type f -name "temp*_input"

    If you don’t get any outputs ( similar to the next step ) please Reboot and continue from this step.

  6. It’s time to edit our thinkfan configuration

    sudo gedit /etc/thinkfan.conf

    Go to the line where it says #sensor /proc/acpi/ibm/thermal … and below that line ( which should be commented since thermal is not supported in the new thinkpads ) insert something like the following:

    sensor /sys/devices/platform/coretemp.0/temp1_input
    sensor /sys/devices/platform/coretemp.0/temp2_input
    sensor /sys/devices/platform/coretemp.0/temp3_input
    sensor /sys/devices/virtual/hwmon/hwmon0/temp1_input

    The above lines are the results from Step 5 prefixed with ‘sensor ‘.

  7. Time to set the temperature rules. The format is: ( FAN_LEVEL, LOW_TEMP, HIGH_TEMP ) meaning that each FAN_LEVEL will start when the highest temperature reported by all the sensors meets its LOW_TEMP and if it surpasses its HIGH_TEMP it will go to the next FAN_LEVEL rule. If it goes below the LOW_TEMP it will fallback to the previous FAN_LEVEL rule. Please take notice that the HIGH_TEMP of a rule must be between the LOW_TEMP & HIGH_TEMP of the rule that follows.
    My settings are:

    #(FAN_LEVEL, LOW, HIGH)
    (0,	0,	60)
    (1,	57,	63)
    (2,	60,	66)
    (3,	64,	68)
    (4,	66,	72)
    (5,	70,	74)
    (7,	72,	32767)

    NOTE: I am not responsible for any problems you encounter with these rules. They are fine as per my configuration so please test them before using them and if necessary adjust them to your needs.

  8. Now, we must add a configuration file into the modprobe.d

    sudo echo "options thinkpad_acpi fan_control=1" >> /etc/modprobe.d/thinkpad.conf
  9. If you want to start thinkfan automatically at boot-time please type the following

    sudo gedit /etc/default/thinkfan

    Change the line START=no to START=yes. If the line does not exist add it yourself.

  10. RESTART your laptop and everything should work as expected. Test your laptop’s temperatures ( using sensors command ) under different workloads and verify that the fan speed is as per the rules you defined.

If you encounter a typing mistake or a step not working for you please comment below. On the contrary if everything works then comment below verifying the guide.

cyper笔记 :
我的/etc/thinkfan.conf的设置如下:

#  Syntax:
#  (LEVEL, LOW, HIGH)
#  LEVEL is the fan level to use (0-7 with thinkpad_acpi)
#  LOW is the temperature at which to step down to the previous level
#  HIGH is the temperature at which to step up to the next level
#  All numbers are integers.
#

# I use this on my T430:
#sensor /proc/acpi/ibm/thermal (0, 10, 15, 2, 10, 5, 0, 3, 0, 3)
sensor /sys/devices/platform/coretemp.0/temp1_input
sensor /sys/devices/platform/coretemp.0/temp2_input
sensor /sys/devices/platform/coretemp.0/temp3_input
sensor /sys/devices/virtual/hwmon/hwmon0/temp1_input
(0, 0,  62)
(1, 57, 80)
(2, 78, 85)
(3, 83, 90)
(4, 89, 91)
(5, 90, 92)
(6, 91, 95)
(7, 93, 32767)
启动/停止
sudo /etc/init.d/thinkfan start|stop|restart|reload|force-reload

查看 

sensors

查看2:

sudo cat /proc/acpi/ibm/fan

转载于:https://my.oschina.net/uniquejava/blog/330346

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值