问题
我开始注意到计算机的风扇不必要地全速打开,因此我安装了 i8kmon 服务来控制它们。看来 i8kmon 无法使用 i8kfan 命令控制风扇,直到我手动禁用 BIOS 风扇控制。
我的设置
- 戴尔 XPS 13 9380
- 乌班图18.04
日志
服务正在运行:
root@pl438-pro:/home/inzaghi# /etc/init.d/i8kmon status
● i8kmon.service - Dell laptop thermal monitoring
Loaded: loaded (/lib/systemd/system/i8kmon.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2021-05-07 09:58:26 CEST; 20min ago
Docs: man:i8kmon
Main PID: 1222 (tclsh)
Tasks: 2 (limit: 4915)
CGroup: /system.slice/i8kmon.service
└─1222 tclsh /usr/bin/i8kmon --nouserconfig
mai 07 10:18:40 pl438-pro i8kmon[1222]: temp, left fan state, right fan state, ac state: 50 0 0 0
服务检测到高温,但命令被忽略:
May 7 10:14:32 pl438-pro i8kmon[1222]: temp, left fan state, right fan state, ac state: 65 0 0 0
May 7 10:14:32 pl438-pro i8kmon[1222]: # (65>=65), state=1, low=55, high=75
May 7 10:14:32 pl438-pro i8kmon[1222]: /usr/bin/i8kfan 1 1
May 7 10:14:34 pl438-pro i8kmon[1222]: temp, left fan state, right fan state, ac state: 65 0 0 0
配置文件/etc/i8kmon.conf
# Sample i8kmon configuration file (/etc/i8kmon.conf, ~/.i8kmon).
set config(use_conf) 1
set config(auto) 1
# External program to control the fans
set config(i8kfan) /usr/bin/i8kfan
# Report status on stdout, override with --verbose option
set config(verbose) 1
# Status check timeout (seconds), override with --timeout option
set config(timeout) 2
# Temperature threshold at which the temperature is displayed in red
set config(t_high) 80
# Temperature thresholds: {fan_speeds low_ac high_ac low_batt high_batt}
# These were tested on the I8000. If you have a different Dell laptop model
# you should check the BIOS temperature monitoring and set the appropriate
# thresholds here. In doubt start with low values and gradually rise them
# until the fans are not always on when the cpu is idle.
set config(0) {{0 0} -1 60 -1 65}
set config(1) {{1 1} 50 70 55 75}
set config(2) {{2 2} 60 80 65 85}
set config(3) {{2 2} 70 128 75 128}
# Speed values are set here to avoid i8kmon probe them at every time it starts.
set status(leftspeed) "0 1000 2000 3000"
set status(rightspeed) "0 1000 2000 3000"
# end of file
解决方法
重新启动服务/etc/init.d/i8kmon
没有任何改变。我发现BIOS也试图控制风扇,所以我安装了https://github.com/TomFreudenberg/dell-bios-fan-control通过快照,执行/snap/dell-bios-fan-control/2/dell-bios-fan-control 0
使事情顺利进行。
我以为这个设置是永久保存在BIOS里的,但是好像每次开机都需要运行它。我应该将其添加为服务吗?
答案1
dell-bios-fan-control 0
编辑2:我终于使我的解决方法更加“干净”:我创建了一个在启动时执行的服务 。
编辑:不再工作,或者工作非常随机。我仍然需要运行
/snap/dell-bios-fan-control/2/dell-bios-fan-control 0
并重新启动i8kmod
才能使其正常工作。
似乎我忘记将模块添加dell-smm-hwmon
到/etc/modules
配置文件中,/etc/modprobe.d/dell-smm-hwmon.conf
如下所示:
options dell-smm-hwmon restricted=0
现在无需设置任何内容即可正常工作。
答案2
snap 版本的 dell-bios-fan-control 在 Ubuntu 22.04 和 Dell Precision 5520 上崩溃了:
# dell-bios-fan-control 0
ioperm:: Operation not permitted
ioperm:: Operation not permitted
Segmentation fault (core dumped)
我从源代码编译了它 - https://github.com/TomFreudenberg/dell-bios-fan-control——终于让粉丝停下来了!