A small systemd service and script that dumps the current temperature of a Nvidia GPU to a file every second on the tmp directory so that fancontrol can use it as a sensor input.
- Copy
nv-temperature.sh
to/usr/local/sbin/
. - Make it executable with
chmod +x /usr/local/sbin/nv-temperature.sh
. - Copy
nv-temperature.service
to/etc/systemd/system/
. - Enable
nv-temperature
with systemctl withsystemctl enable nv-temperature
. - Configure fancontrol and start it.
INTERVAL=1
DEVPATH=hwmon0=devices/platform/coretemp.0 hwmon1=devices/platform/nct6775.656
DEVNAME=hwmon0=coretemp hwmon1=nct6776
FCTEMPS=hwmon1/pwm1=/tmp/nv-temperature/gpu0
FCFANS= hwmon1/pwm1=hwmon1/fan1_input
MINTEMP=hwmon1/pwm1=30
MAXTEMP=hwmon1/pwm1=80
MINSTART=hwmon1/pwm1=150
MINSTOP=hwmon1/pwm1=0
MAXPWM=hwmon1/pwm1=255
Needed to find a way to cool a Nvidia Tesla M40 with PWM controlled fans.