薇尔薇

Back

安装#

apt install pwmconfig fancontrol
bash

pwmconfig#

直接启动pwmconfig

启动后pwmconfig会让所有风扇都运转在最高转速 此处按下回车之后开始对每个风扇进行识别,会调整风扇转速到最低,需要注意观察机箱中哪个风扇正在被控制

此处测试了第一个风扇控制器,在上一步Found the following fan sensors:观察到,只有2,6,7号控制器有连接风扇,此处1、3、4、5没有安装风扇,无需测试可以直接输入n跳过

输入y执行对于风扇2的测试 此处尝试逐步降低风扇转速,直到风扇停转

此处选择基于哪个温度传感器控制PWM调速 此处的选项来自/sys/class/hwmon/下文件,通过观察/sys/class/hwmon<数字>/name可以知道此处对应系统哪个硬件的温度,之后通过sensors找到此温度对应的文件,选择后会通过此文件进行调速

Select a temperature sensor as source for hwmon3/pwm7:
1.  hwmon0/temp1_input 10) hwmon3/temp3_input
2.  hwmon1/temp1_input 11) hwmon3/temp4_input
3.  hwmon1/temp2_input 12) hwmon3/temp5_input
4.  hwmon1/temp3_input 13) hwmon3/temp6_input
5.  hwmon2/temp1_input 14) hwmon3/temp7_input
6.  hwmon2/temp2_input 15) hwmon3/temp8_input
7.  hwmon2/temp6_input 16) hwmon3/temp9_input
8.  hwmon3/temp1_input 17) None (Do not affect this PWM output)
9.  hwmon3/temp2_input
bash
# 风扇起转温度
Enter the low temperature (degree C)
below which the fan should spin at minimum speed (20): 50

# 最高温度
Enter the high temperature (degree C)
above which the fan should spin at maximum speed (60): 70

# 风扇停转时的pwm值
Enter the minimum PWM value (0-255)
at which the fan STOPS spinning (press t to test) (100): 50

# 风扇起转时pwm值
Enter the minimum PWM value (0-255)
at which the fan STARTS spinning (press t to test) (100): 60
bash

输入数字保存并推出之后,会生成/etc/fancontrol文件

fancontrol#

上一步生成的fancontrol的文件将用于实际调速,你也可以直接编辑此文件

启动fancontrol

systemctl start fancontrol
systemctl enable fancontrol
bash

查看状态fancontrol已在运行,且风扇转速已降低

基于fancontrol和pwmconfig实现PVE中风扇PWM调速
https://vio.vin/blog/ji-yu-fancontrol-he-pwmconfig-shi-xian-pve-zhong-feng-shan-pwm-tiao-su
Author violet
Published at 2025年5月25日