This project provides a dynamic fan control utility for NVIDIA GPUs using NVML. It includes:
- A custom fan curve based on GPU temperature.
- A systemd service for automatic startup and logging.
- A terminal-based GUI for configuring the fan curve interactively.
First, locate the NVML header file:
find /usr -name "nvml.h"
Then, compile the program:
gcc -o nvidia_fan_controlV2 nvidia_fan_controlV2.c -I/usr/the/directory/that/includes/nvml.h/file/ -lnvidia-ml
Create a systemd service file:
echo "[Unit]
Description=NVIDIA Fan Control Service
After=multi-user.target
[Service]
Type=simple
ExecStart=/usr/local/bin/nvidia_fan_controlV2
Restart=always
User=root
[Install]
WantedBy=multi-user.target" | sudo tee /etc/systemd/system/nvidia-fan-controlV2.service
Enable and start the service:
sudo systemctl enable nvidia-fan-controlV2
sudo systemctl start nvidia-fan-controlV2
To view real-time logs:
journalctl -u nvidia-fan-controlV2 -f
To reconfigure the fan curve:
nvidia_fan_controlV2 --re-configure
(please contribute if you have any 2-Fan or 3-Fan architecture and you need a more complex fan_control design)
- Support for multi-fan GPUs.
- Improved adaptive fan curve options.
- A full-screen terminal-based GUI for configuring fan curves interactively.