This is a simplified implementation of nfancurve for Wayland-based DEs and compositors. Nfancurve depends on X11's nvidia-settings
and thus doesn't work under Wayland. This implementation is based on NVML GPU Control by HackTestes and uses NVIDIA Management Library (NVML) Python bindings (pynvml).
- NVIDIA GPUs supported by a proprietary driver version >= 520
NVML GPU Control is too complex and has many features that I don't really need, like Windows compatibility. This is a stripped down, really basic version, more similar to the nfancurve bash script.
On Arch Linux, wlnfancurve AUR package is available; install it with your favorite AUR helper. Inspect and edit /etc/wlnfancurve.conf
and enable / start a systemd wlnfancurve.service
.
- Clone the repo
git clone https://github.com/xiyori/wlnfancurve
cd wlnfancurve
- Install the latest NVIDIA proprietary driver. Create a Python virtual environment and install dependencies
python -m venv nvml
source nvml/bin/activate # or activate.fish for fish
pip install nvidia-ml-py
Alternatively, install the package directly in the system Python (not recommended).
The config file specifies some global parameters and a fan curve. Please refer to the file for more info. The script supports multiple GPUs, but the curve is shared among all of them.
After editing the config run the script with admin privileges
systemctl start wlnfancurve.service
python wlnfancurve.py
There is no need to copy anything, simply enable wlnfancurve.service
.
Install nvidia-ml-py
package in the system Python. It is recommended to use your distro's package manager instead of pip
. Copy script, configuration and service files (admin privileges required)
mkdir /usr/bin/wlnfancurve
cp {wlnfancurve.py,nvml_context.py} /usr/bin/wlnfancurve/
cp config /etc/wlnfancurve.conf
cp wlnfancurve.service /usr/lib/systemd/system/
Enable / start the service
systemctl enable wlnfancurve.service