thinkfan控制在需要时不会使用风扇的全部潜力

我拥有一台Thinkpad x201并且由于环境温度而非常快速地过热并且最终在没有通知的情况下杀死自己(并且它真的研磨我的齿轮)。

外面有34摄氏度,而计算机的温度上升到80摄氏度,没有重要的任务,并达到(每秒1度)到100度,任务较重。

我按照指南提前启动风扇,以便保持恒定的温度,或者在临界温度下使用最大速度但仍然坚持自动值。

技术方面

我使用的资源位于: http : //staff.science.uva.nl/~kholshei/thinkfan_guide/

我调整了这些值,以便风扇在较低的温度下启动,从0到20度开始为0级,依此类推。

我对/etc/thinlfan.conf的配置是:

$ tail -n 15 /etc/thinkfan.conf sensor /sys/devices/virtual/hwmon/hwmon0/temp1_input sensor /sys/devices/platform/coretemp.0/temp4_input sensor /sys/devices/platform/coretemp.0/temp2_input (0, 0, 21) (1, 20, 22) (2, 21, 25) (3, 24, 28) (4, 26, 33) (5, 30, 40) (6, 36, 49) (7, 44, 62) (128, 60, 65) (129, 63, 100000) 

最后两个值是实验性的。

我跑的时候:

 $ sudo thinkfan -n WARNING: Using default fan control in /proc/acpi/ibm/fan. 

我跑的时候:

 $ echo level disengaged | sudo tee /proc/acpi/ibm/fan 

风扇在aprox旋转。 实际有效的6500 RPM(温度缓慢下降)但在切换回自动后它保持在此水平约5秒。

我的问题是:如何在这些炎热的日子里将风扇速度手动设置为它的全部潜力/我如何调整这些值以使温度不会boost太多?

今天是我第一次尝试这个,所以不要指望我能够找到除了设置一个能在每秒设置水平的cron工作之外我还能尝试什么的线索 – 这是一个不正确的想法。

最后一件事:我不能停止工作,最重要的是我宁愿偶尔更换风扇而不是处理器。

感谢您的帮助和理解,如果您需要任何其他细节,请告诉我们。

哦……这是我的lsb_release:

 $ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 13.10 Release: 13.10 Codename: saucy 

……并且uname:

 $ uname -r 3.11.0-23-generic 

试试这个配置,它在联想ThinkPad L512 / L520上运行良好:

安装thinkfan

 sudo apt-get install -y thinkfan 

配置内核模块

 echo "options thinkpad_acpi fan_control=1" > /etc/modprobe.d/thinkpad_acpi.conf 

重新加载内核模块

 modprobe -r thinkpad_acpi && modprobe thinkpad_acpi 

配置thinkfan

 sudo sed -i 's|START=no|START=yes|' /etc/default/thinkfan sudo sed -i 's|DAEMON_ARGS="-q"|DAEMON_ARGS="-q -b 1 -s 15"|' /etc/default/thinkfan cat < /etc/thinkfan.conf hwmon /sys/devices/virtual/hwmon/hwmon0/temp1_input (0, 0, 65) (1, 65, 70) (2, 70, 75) (3, 75, 80) (4, 80, 85) (5, 85, 90) (7, 90, 32767) EOF 

重启thinkfan守护进程

 /etc/init.d/thinkfan restart 

我在联想Thinkpad x220中使用过(这是一个与systemd系统相关的更新答案

 sudo -i 
  • 安装thinkfan

     apt install thinkfan 
  • 配置内核模块

     echo "options thinkpad_acpi fan_control=1" > /etc/modprobe.d/thinkfan.conf 
  • 重新加载内核模块

     modprobe thinkpad_acpi 
  • 配置默认的thinkfan配置

     sed -i 's|START=no|START=yes|' /etc/default/thinkfan sed -i 's|DAEMON_ARGS="-q"|DAEMON_ARGS="-q -b 1 -s 15"|' /etc/default/thinkfan 
  • 检查您的传感器

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

这是我的联想Thinkpad x220的结果:

 /sys/devices/virtual/hwmon/hwmon0/temp1_input /sys/devices/platform/coretemp.0/hwmon/hwmon2/temp3_input /sys/devices/platform/coretemp.0/hwmon/hwmon2/temp1_input /sys/devices/platform/coretemp.0/hwmon/hwmon2/temp2_input 
  • 根据上面的结果写入/etc/thinkpad.conf

     tp_fan /proc/acpi/ibm/fan hwmon /sys/devices/virtual/hwmon/hwmon0/temp1_input hwmon /sys/devices/platform/coretemp.0/hwmon/hwmon2/temp3_input hwmon /sys/devices/platform/coretemp.0/hwmon/hwmon2/temp1_input hwmon /sys/devices/platform/coretemp.0/hwmon/hwmon2/temp2_input (0, 0, 40) (1, 32, 55) (2, 54, 66) (3, 65, 76) (4, 75, 80) (5, 78, 85) (6, 82, 88) (7, 85, 32767) 
  • 启用该服务,以便在每次启动和删除权限时自动启动该服务。

     systemctl enable thinkfan exit 
  • 重启笔记本电脑

     systemctl enable thinkfan 
  • 重启后,检查服务

     systemctl status thinkfan.service 

结果将是这样的:

 ● thinkfan.service - simple and lightweight fan control program Loaded: loaded (/lib/systemd/system/thinkfan.service; enabled; vendor preset: enabled) Active: active (running) since Jum 2016-10-07 20:09:30 WIB; 28min ago Process: 2494 ExecStart=/usr/sbin/thinkfan (code=exited, status=0/SUCCESS) Main PID: 2496 (thinkfan) CGroup: /system.slice/thinkfan.service └─2496 /usr/sbin/thinkfan Okt 07 20:09:30 thinkpad-x220 systemd[1]: Starting simple and lightweight fan control program... Okt 07 20:09:30 thinkpad-x220 thinkfan[2494]: thinkfan 0.9.1 starting... Okt 07 20:09:30 thinkpad-x220 thinkfan[2494]: Daemon PID: 2496 Okt 07 20:09:30 thinkpad-x220 systemd[1]: Started simple and lightweight fan control program. 

在进行了一些进一步的研究之后,我就设法让它按照我的意愿运作。

自定义温度阈值 – 风扇速度配置

我已经从apt安装了thinkfan (老实说,我不记得它是否已安装:-S)

确保检查是否有名为thinkfan的进程

CLI:

 ps -ef | grep thinkfan 

如果没有安装它

CLI:

 sudo apt-get install thinkfan 

它的配置位于/etc/thinkfan.conf

映射温度 – 速度定义如下面的代码段:

 ... (0, 0, 21) (1, 20, 22) (2, 21, 25) ... 

每个组定义以下值(level,minTemperature,maxTemperature),另一个规则是组之间必须重叠。

水平被定义为整数而不是我最初想到的字符串,如下所示:

  • 0 – 7 – 从0到~4200RPM的八个等级点
  • 126 – 最大速度
  • 127 – 脱离~6900RPM

我在/etc/thinkfan.conf配置现在看起来像这样:

 (0, 0, 21) (1, 20, 22) (2, 21, 25) (3, 24, 28) (4, 26, 33) (5, 30, 40) (6, 36, 49) (7, 44, 52) (126, 50, 59) (127, 57, 100000) 

从psensor的图表中或多或少地计算温度的值,这表明我有一个低效的风扇,但我认为这是正常的,因为笔记本电脑已经很老了。