debian下thinkfan安装与配置
sean 编辑于2024-10-20 13:25树莓派及Linux
1.安装thinkfan
$ sudo apt install thinkfan
$ sudo nano /usr/lib/modprobe.d/thinkpad_acpi.conf
添加内容:
options thinkpad_acpi fan_control=1
目的是实现开机加载thinkpad_acpi 模块 并开启 fan_control功能。
这里先手动加载一次:
$ modprobe thinkpad_acpi
2.配置/etc/thinkfan.conf文件
# nano /etc/thinkfan.conf
加入如下内容:
sensors:
- tpacpi: /proc/acpi/ibm/thermal
indices: [0]
fans:
- tpacpi: /proc/acpi/ibm/fan
levels:
- [0, 0, 61]
- [1, 60, 71]
- [2, 70, 76]
- [3, 75, 81]
- [4, 80, 84]
- [5, 83, 86]
- [6, 85, 93]
- [7, 92, 32767]
# 其中 这个levels 更激进,也更安静,
levels:
- [0, 0, 71]
- [1, 68, 81]
- [2, 80, 86]
- [3, 85, 87]
- [4, 86, 91]
- [5, 90, 93]
- [6, 91, 95]
- [7, 93, 32767]
这个是终极激进版的levels:
levels:
- [0, 0, 88]
- [1, 87, 93]
- [2, 92, 96]
- [3, 95, 97]
- [4, 96, 98]
- [5, 97, 99]
- [6, 98, 100]
- [7, 99, 32767]
或者直接这样:
sensors:
- tpacpi: /proc/acpi/ibm/thermal
indices: [0]
fans:
- tpacpi: /proc/acpi/ibm/fan
levels:
- [0, 0, 105]
# - ["level auto", 95, 100]
# - ["level disengaged", 99, 255]
3.测试thinkfan
# thinkfan -n
4.加入开机启动,配置启动参数,编辑/etc/default/thinkfan
增加如下行:
#DAEMON_ARGS="-q"
# q为安静模式,无输出 ,其中的s2为间隔两秒,默认为s5
DAEMON_ARGS="-q -s2 -c /etc/thinkfan.conf"
START=yes
# 更多的启动参数可以通过查询man thinkfan来查询
5.开启开机启动服务
# systemctl enable --now thinkfan.service
6.开启服务后偶尔还是会bios自动接管风扇,风扇在没达到设置温度自动启动,讨厌风扇噪音,索性直接关风扇(换了个弱cpu满载风扇也不会不转,不到90度)
在rc.local里加上这个(参考来源https://unix.stackexchange.com/questions/677382/why-fan-gets-enabled-again-and-again-after-thinkfan-started-and-ended-once)
#!/bin/bash
# 关闭 睿频
# echo 1 > /sys/devices/system/cpu/intel_pstate/no_turbo
# 限定cpu最高频率为1.9G
echo 1900000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
echo 1900000 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq
echo 1900000 > /sys/devices/system/cpu/cpu2/cpufreq/scaling_max_freq
echo 1900000 > /sys/devices/system/cpu/cpu3/cpufreq/scaling_max_freq
echo level 0 > /proc/acpi/ibm/fan
echo disable > /proc/acpi/ibm/fan
echo watchdog 0 > /proc/acpi/ibm/fan
#/usr/sbin/thinkfan -D
肥龙软件分享的软件是本站作者开发的免费,无广告,安全可靠,绝不附带任何无关软件,绝不困绑任何插件的实用软件。如果您感觉好用,可以捐赠我们,这样我们可以有更积极的动力去改进升级软件,维持服务器运转,感谢您的捐助,谢谢!
更新时间:2024.8.31