Skip to content

Instantly share code, notes, and snippets.

@KCCat
Created July 21, 2018 18:43
Show Gist options
  • Save KCCat/0c0fe00866a176321ba85077d2fd428c to your computer and use it in GitHub Desktop.
Save KCCat/0c0fe00866a176321ba85077d2fd428c to your computer and use it in GitHub Desktop.
Dell 9020M Fan
#!/bin/bash
modprobe dell_smm_hwmon force=1
while true
do
if [ `cat /sys/class/hwmon/hwmon1/temp1_input` -lt 55000 ]
then
Vl=0
echo "FAN L"
elif [ `cat /sys/class/hwmon/hwmon1/temp1_input` -lt 70000 ]
then
Vl=64
echo "FAN M"
else
Vl=192
echo "FAN H"
fi
echo -n $Vl > /sys/class/hwmon/hwmon2/pwm1 2> /dev/null
sleep 1 &
wait
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment