-
-
Save dominictayloruk/078c88edc1aa601558b34702bc058cee to your computer and use it in GitHub Desktop.
Setup Unifi Dream Machine (UDM) automatic fan speeds control to lower temps and increase device lifespan.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| echo "[i] Here are your UDM sensor readings before (for before/after comparison):" | |
| sensors | |
| echo | |
| echo | |
| echo "[+] Installing fancontrol package using apt..." | |
| apt-get update -qq | |
| apt-get install -y fancontrol | |
| echo | |
| echo "[+] Setting up /etc/fancontrol config file (edit as-desired after this script completes)..." | |
| tee /etc/fancontrol <<EOF | |
| INTERVAL=2 | |
| DEVPATH=hwmon0=devices/platform/soc/fd880000.i2c-pld/i2c-0/0-004c | |
| DEVNAME=hwmon0=lm63 | |
| FCTEMPS=hwmon0/device/pwm1=hwmon0/device/temp1_input hwmon0/device/pwm1=hwmon0/device/temp2_input | |
| FCFANS=hwmon0/device/pwm1=hwmon0/device/fan1_input | |
| MINTEMP=hwmon0/device/pwm1=40 | |
| MAXTEMP=hwmon0/device/pwm1=64 | |
| MINSTART=hwmon0/device/pwm1=30 | |
| MINSTOP=hwmon0/device/pwm1=15 | |
| MINPWM=hwmon0/device/pwm1=10 | |
| MAXPWM=hwmon0/device/pwm1=255 | |
| EOF | |
| echo "[*] Restarting fancontrol service to apply changes..." | |
| systemctl restart fancontrol | |
| sleep 1 | |
| echo | |
| echo "[√] Complete. Check the sensor readings to make sure fans are spinning faster:" | |
| sensors |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment