群晖NAS如何手动调整风扇转速
最近新购入了一台群晖的RS1221+替代几年前购买的DS1517+。到手后发现,虽然噪音不算特别大,但还是略微有感。由于我的机柜是放在客厅,因此出于影音体验的考虑,还是希望它可以尽可能安静,于是开始琢磨如何手动调整风扇转速。
最近新购入了一台群晖的RS1221+替代几年前购买的DS1517+。虽然已经对机架式设备的噪音有预期,但因为NAS毕竟还是低功率设备,以为不会太吵。到手后发现,虽然噪音不算特别大,但还是略微有感。由于我的机柜是放在客厅,因此出于影音体验的考虑,还是希望它可以尽可能安静,于是开始琢磨如何手动调整风扇转速。
本篇文章提到的方法适用于DSM7(想必现在也没什么人使用DSM6了吧)。
首先是使用系统自带的设置来调整。在控制面板->硬件与电源->风扇模式中,选择静音模式。由于我之前的设置就是静音模式,因此这一步对我并没有帮助。
随后进行了一些搜索,根据网友提到的信息,发现ssh进机器后,/usr/syno/etc.defaults/scemd.xml
可以控制风扇速度。另外也有网友提到 /usr/syno/etc/scemd.xml
这个文件。经过琢磨,发现只需要改前一个文件就能起到效果。
具体的修改方法是:
原先文件如下:
<?xml version="1.0" encoding="UTF-8"?>
<scemd>
<adt_fan_config skip_check_temp="10" type="DUAL_MODE_LOW" hibernation_speed="UNKNOWN">
<alert_config threshold="2" period="30" alert_temp="90" shutdown_temp="95" name="cpu"/>
<alert_config threshold="2" period="300" alert_temp="58" shutdown_temp="61" name="disk"/>
<alert_config threshold="2" period="30" alert_temp="68" shutdown_temp="71" name="m2"/>
<alert_config threshold="2" period="30" alert_temp="95" shutdown_temp="100" name="nic"/>
<pwm_config name="pwm2" pwm_duty_high="255" pwm_duty_low="120" high_freq="yes" sensor_type="manual"/>
<fan_mapping_config name="internal" pwm="pwm2" order="0"/>
<fan_mapping_config name="internal" pwm="pwm2" order="1"/>
<manual_config name="cpu_temperature" threshold="2" period="30" temp="0" fan_speed="120"/>
<manual_config name="cpu_temperature" threshold="2" period="30" temp="60" fan_speed="150"/>
<manual_config name="cpu_temperature" threshold="2" period="30" temp="70" fan_speed="220"/>
<manual_config name="cpu_temperature" threshold="2" period="30" temp="85" fan_speed="255"/>
<manual_config name="disk_temperature" threshold="2" period="300" temp="0" fan_speed="120"/>
<manual_config name="disk_temperature" threshold="2" period="300" temp="45" fan_speed="150"/>
<manual_config name="disk_temperature" threshold="2" period="300" temp="50" fan_speed="220"/>
<manual_config name="disk_temperature" threshold="2" period="300" temp="54" fan_speed="255"/>
<manual_config name="m2_temperature" threshold="2" period="30" temp="0" fan_speed="120"/>
<manual_config name="m2_temperature" threshold="2" period="30" temp="55" fan_speed="150"/>
<manual_config name="m2_temperature" threshold="2" period="30" temp="60" fan_speed="220"/>
<manual_config name="m2_temperature" threshold="2" period="30" temp="64" fan_speed="255"/>
<manual_config name="nic_temperature" threshold="2" period="30" temp="0" fan_speed="120"/>
<manual_config name="nic_temperature" threshold="2" period="30" temp="75" fan_speed="150"/>
<manual_config name="nic_temperature" threshold="2" period="30" temp="90" fan_speed="255"/>
</adt_fan_config>
...以下省略...
DUAL_MODE_LOW这个type,控制的是静音模式下的表现。我们修改这个key底下的值就可以。可以看到底下有CPU温度、硬盘温度、M2硬盘温度、网卡温度四个部分,每个部分中有几个阶梯。我们为了快速验证效果,只需要先修改第一层阶梯,即当每一个部分的temp="0"的行对应的fan_speed即可。可以先往下调整50%。例如我这里默认是120,就调整到60。
调整完之后,不需要重启整个NAS,直接使用 systemctl restart scemd
这个命令来重启控制风扇的scemd daemon程序就可以。
发现风扇速度确实降下来之后,可以做进一步精细调整。例如:
- 速度60可能太低,我们可以把转速调到80
- 第一档调整成非常低的转速之后,第一档跟下一档之间的温度相差比较大,出于保护设备考虑,可以在中间额外增加一行设置,来新增一档温控
我最终写的配置文件如下:
<?xml version="1.0" encoding="UTF-8"?>
<scemd>
<adt_fan_config skip_check_temp="10" type="DUAL_MODE_LOW" hibernation_speed="UNKNOWN">
<alert_config threshold="2" period="30" alert_temp="90" shutdown_temp="95" name="cpu"/>
<alert_config threshold="2" period="300" alert_temp="58" shutdown_temp="61" name="disk"/>
<alert_config threshold="2" period="30" alert_temp="68" shutdown_temp="71" name="m2"/>
<alert_config threshold="2" period="30" alert_temp="95" shutdown_temp="100" name="nic"/>
<pwm_config name="pwm2" pwm_duty_high="255" pwm_duty_low="120" high_freq="yes" sensor_type="manual"/>
<fan_mapping_config name="internal" pwm="pwm2" order="0"/>
<fan_mapping_config name="internal" pwm="pwm2" order="1"/>
<manual_config name="cpu_temperature" threshold="2" period="30" temp="0" fan_speed="80"/>
<manual_config name="cpu_temperature" threshold="2" period="30" temp="50" fan_speed="100"/>
<manual_config name="cpu_temperature" threshold="2" period="30" temp="60" fan_speed="150"/>
<manual_config name="cpu_temperature" threshold="2" period="30" temp="70" fan_speed="220"/>
<manual_config name="cpu_temperature" threshold="2" period="30" temp="85" fan_speed="255"/>
<manual_config name="disk_temperature" threshold="2" period="300" temp="0" fan_speed="80"/>
<manual_config name="disk_temperature" threshold="2" period="300" temp="40" fan_speed="120"/>
<manual_config name="disk_temperature" threshold="2" period="300" temp="45" fan_speed="150"/>
<manual_config name="disk_temperature" threshold="2" period="300" temp="50" fan_speed="220"/>
<manual_config name="disk_temperature" threshold="2" period="300" temp="54" fan_speed="255"/>
<manual_config name="m2_temperature" threshold="2" period="30" temp="0" fan_speed="80"/>
<manual_config name="m2_temperature" threshold="2" period="30" temp="55" fan_speed="150"/>
<manual_config name="m2_temperature" threshold="2" period="30" temp="60" fan_speed="220"/>
<manual_config name="m2_temperature" threshold="2" period="30" temp="64" fan_speed="255"/>
<manual_config name="nic_temperature" threshold="2" period="30" temp="0" fan_speed="80"/>
<manual_config name="nic_temperature" threshold="2" period="30" temp="50" fan_speed="120"/>
<manual_config name="nic_temperature" threshold="2" period="30" temp="75" fan_speed="150"/>
<manual_config name="nic_temperature" threshold="2" period="30" temp="90" fan_speed="255"/>
</adt_fan_config>
...以下省略...
群晖系统里面可以使用vim进行文件编辑,如果不会用vim的话可以自行搜索,不再这里赘述了,或者scp拷贝出来编辑再放回去也是可以的。
参考文献:
https://gist.github.com/michaelilyin/7c85d2c2ad599b0547e6c8c3bb4cd8ba