【FAQ】Dell笔记本设备使用i8k模块控制风扇调度

首先启用i8k模块

DSOE1024@DSOE1024-pc:~$ sudo modprobe dell-smm-hwmon force=1
DSOE1024@DSOE1024-pc:~$ sudo modprobe i8k force=1
DSOE1024@DSOE1024-pc:~$ i8kctl 
1.0 1.2 2VJBGD3 80 3 3 2800 3100 -1 -1

如果遇到

modprobe: ERROR: could not insert 'dell_smm_hwmon': Exec format error

需要加载dell_smm_hwmon 模块

接下来安装控制工具

sudo apt install i8kutils

sudo vim /etc/default/i8kbuttonssudo vim /etc/default/i8kmon 都写入 ENABLED=1

使用以下命令启用服务

sudo systemctl start i8kmon.service
sudo systemctl enable i8kmon.service
DSOE1024@DSOE1024-pc:~$ i8kctl 
1.0 1.2 2VJBGD3 80 3 3 2800 3100 -1 -1

设置风扇停转

i8kctl fan 0 0

设置风扇满转

i8kctl fan 2 2

正常

i8kctl fan 1 1

如果想让服务开机启动,可以创建模块配置文件

sudo tee /etc/modprobe.d/dell-smm-hwmon.conf <<EOF
options dell-smm-hwmon force=1
EOF

sudo tee /etc/modprobe.d/i8k.conf <<EOF
options i8k force=1
EOF

添加到开机启动

echo "dell-smm-hwmon" | sudo tee -a /etc/modules
echo "i8k" | sudo tee -a /etc/modules

更新 initramfs

sudo update-initramfs -u

检查启动日志,应有如下输出:

DSOE1024@DSOE1024-pc:~$ journalctl -b | grep -E "dell|i8k"
6月 02 17:01:20 DSOE1024-pc kernel: dell_smm_hwmon: not running on a supported Dell system.
6月 02 17:01:20 DSOE1024-pc kernel: dell_smm_hwmon: vendor=Dell Inc., model=Dell G15 5515, version=1.26.0
6月 02 17:01:20 DSOE1024-pc systemd-modules-load[586]: Inserted module 'dell_smm_hwmon'
6月 02 17:01:20 DSOE1024-pc audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=? msg='unit=i8kmon comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
6月 02 17:01:21 DSOE1024-pc sensors[939]: dell_smm-virtual-0