安装
apt install pwmconfig fancontrol
pwmconfig
直接启动pwmconfig
root@pve:~# pwmconfig
# pwmconfig version 3.6.0
This program will search your sensors for pulse width modulation (pwm)
controls, and test each one to see if it controls a fan on
your motherboard. Note that many motherboards do not have pwm
circuitry installed, even if your sensor chip supports pwm.
We will attempt to briefly stop each fan using the pwm controls.
The program will attempt to restore each fan to full speed
after testing. However, it is ** very important ** that you
physically verify that the fans have been to full speed
after the program has completed.
Found the following devices:
hwmon0 is acpitz
hwmon1 is nvme
hwmon2 is coretemp
hwmon3 is nct6798
Found the following PWM controls:
hwmon3/pwm1 current value: 255
hwmon3/pwm2 current value: 255
hwmon3/pwm3 current value: 255
hwmon3/pwm4 current value: 153
hwmon3/pwm5 current value: 153
hwmon3/pwm6 current value: 255
hwmon3/pwm7 current value: 255
Giving the fans some time to reach full speed...
Found the following fan sensors:
hwmon3/fan1_input current speed: 0 ... skipping!
hwmon3/fan2_input current speed: 2732 RPM
hwmon3/fan3_input current speed: 0 ... skipping!
hwmon3/fan4_input current speed: 0 ... skipping!
hwmon3/fan5_input current speed: 0 ... skipping!
hwmon3/fan6_input current speed: 2119 RPM
hwmon3/fan7_input current speed: 2596 RPM
Warning!!! This program will stop your fans, one at a time,
for approximately 5 seconds each!!!
This may cause your processor temperature to rise!!!
If you do not want to do this hit control-C now!!!
Hit return to continue:
启动后pwmconfig会让所有风扇都运转在最高转速 此处按下回车之后开始对每个风扇进行识别,会调整风扇转速到最低,需要注意观察机箱中哪个风扇正在被控制
此处测试了第一个风扇控制器,在上一步Found the following fan sensors:观察到,只有2,6,7号控制器有连接风扇,此处1、3、4、5没有安装风扇,无需测试可以直接输入n跳过
Testing pwm control hwmon3/pwm1 ...
hwmon3/fan2_input ... speed was 2732 now 2732
no correlation
hwmon3/fan6_input ... speed was 2119 now 2188
no correlation
hwmon3/fan7_input ... speed was 2596 now 2428
no correlation
No correlations were detected.
There is either no fan connected to the output of hwmon3/pwm1,
or the connected fan has no rpm-signal connected to one of
the tested fan sensors. (Note: not all motherboards have
the pwm outputs connected to the fan connectors,
check out the hardware database on http://www.almico.com/forumindex.php)
Did you see/hear a fan stopping during the above test (n)? n
输入y执行对于风扇2的测试
此处尝试逐步降低风扇转速,直到风扇停转
CodeBlock Loading...
此处选择基于哪个温度传感器控制PWM调速
此处的选项来自/sys/class/hwmon/下文件,通过观察/sys/class/hwmon<数字>/name可以知道此处对应系统哪个硬件的温度,之后通过sensors找到此温度对应的文件,选择后会通过此文件进行调速
CodeBlock Loading...
CodeBlock Loading...
输入数字保存并推出之后,会生成/etc/fancontrol文件
fancontrol
上一步生成的fancontrol的文件将用于实际调速,你也可以直接编辑此文件
Configuration file generated by pwmconfig, changes will be lost
INTERVAL=10
DEVPATH=hwmon2=devices/platform/coretemp.0 hwmon3=devices/platform/nct6775.2592
DEVNAME=hwmon2=coretemp hwmon3=nct6798
# 温度与 PWM 对应关系
FCTEMPS=hwmon3/pwm2=hwmon2/temp1_input hwmon3/pwm7=hwmon2/temp1_input hwmon3/pwm6=/var/lib/hdd_temp/max_hdd_temp.txt
# 风扇与 PWM 对应关系
FCFANS=hwmon3/pwm6=hwmon3/fan6_input hwmon3/pwm2=hwmon3/fan2_input hwmon3/pwm7=hwmon3/fan7_input
# 最低和最高温度
MINTEMP=hwmon3/pwm2=40 hwmon3/pwm7=40 hwmon3/pwm6=35
MAXTEMP=hwmon3/pwm2=70 hwmon3/pwm7=70 hwmon3/pwm6=45
# 最低启动和停止 PWM 值
MINSTART=hwmon3/pwm2=150 hwmon3/pwm7=100 hwmon3/pwm6=80
MINSTOP=hwmon3/pwm2=0 hwmon3/pwm7=24 hwmon3/pwm6=80
# 最低和最高 PWM 值
MINPWM=hwmon3/pwm7=0 hwmon3/pwm6=80
MAXPWM=hwmon3/pwm2=255 hwmon3/pwm7=255 hwmon3/pwm6=255
启动fancontrol
CodeBlock Loading...
查看状态fancontrol已在运行,且风扇转速已降低
CodeBlock Loading...