nvidia-pstate
A library and CLI utilities for managing performance states of NVIDIA GPUs.
[!IMPORTANT]
Try the new implementation - nvidia-pstated. The daemon does not require application patching and switches performance states automatically.
Installation
Prerequirements
Linux
Make sure you have the proprietary NVIDIA driver and the package providing libnvidia-api.so
installed.
- ArchLinux:
nvidia-utils
- Debian:
libnvidia-api1
or libnvidia-tesla-api1
(depending on the GPU and driver installed)
- Ubuntu:
libnvidia-gl-535
(?)
On Debian derivatives, you can use apt search libnvidia-api.so.1
to find the package you need.
Windows
Make sure the NVIDIA driver is installed.
Installation
pip3 install nvidia_pstate
Usage (CLI)
nvidia-pstate -q
nvidia-pstate -i 0 -ps 0
nvidia-pstate -i 0 -ps 16
nvidia-pstate -i 0 1 3 4 -ps 0
nvidia-pstate -ps 0
Usage (API)
from nvidia_pstate import set_pstate_low, set_pstate_high
set_pstate_low()
set_pstate_high()