nan0s7 / nfancurve

A small and lightweight POSIX script for using a custom fan curve in Linux for those with an Nvidia GPU.
GNU General Public License v3.0
320 stars 59 forks source link
custom-fan-curve efficient fan-control fans gpu graphics graphics-card linux nvidia procps script sh speed temperature

nfancurve

You are probably wondering why I have chosen to write this script in Bash Shell Script. The reason is very simple; I wanted a script with the minimum number of dependencies possible. To get this script up-and-running you technically only need the temp.sh file, and the config file.

The current version of the script is version 19.6.

This script is currently set up for Celsius. However, it can easily be modified for other temperature scales.

If you need any help configuring my script or don't know how to make it start automatically check the USAGE.md file.

Features

Prerequisites

How to install

GitHub

git

Arch Linux

There are unofficial AUR packages:

Using the systemd service

Ensure the script and the config paths are correct. Move or copy the nfancurve.service file to /etc/systemd/user/nfancurve.service then enable and start the service with:

systemctl --user daemon-reload
systemctl --user start nfancurve.service
systemctl --user enable nfancurve.service

Troubleshooting

On some Distro's which are further behind in updates, or if there's a slight misconfiguration with services, you may encounter issues with the service file.

To work around this, you may change the following lines in the nfancurve.service file:

  1. Change After=graphical-session.target to After=default.target
  2. Remove the line Requires=graphical-session.target
  3. Change WantedBy=graphical-session.target to WantedBy=default.target
  4. Under the [Service] heading, add the line ExecStartPre=/bin/sleep 20

Don't forget to reload and reenable the service:

systemctl --user daemon-reload
systemctl reenable --user nfancurve.service

Honourable mentions

TODO