Skip to main content

nvidia-pstate

A library and CLI utilities for managing performance states of NVIDIA GPUs.

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)

# List available performance states (TODO: does not work right now, use nvidia-smi -q and count memory clocks)
nvidia-pstate -q

# Set performance state for specific GPU
nvidia-pstate -i 0 -ps 0

# Let driver decide which performance state GPU should use
nvidia-pstate -i 0 -ps 16

# Set performance state for specific GPUs
nvidia-pstate -i 0 1 3 4 -ps 0

# Set performance state for all GPUs
nvidia-pstate -ps 0

Usage (API)

from nvidia_pstate import set_pstate_low, set_pstate_high

set_pstate_low() # set pstate to "low" level (8 by default)
set_pstate_high() # set pstate to "high" level (16 by default)

# default values can be overrided using NVIDIA_PSTATE_LOW and NVIDIA_PSTATE_HIGH environment variables.

Metadata

Release files for nvidia-pstate 1.0.5.post2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nvidia-pstate 1.0.5.post2
File Size Uploaded Provenance Actions
nvidia_pstate-1.0.5.post2.tar.gz 6.0 kB Without provenance Details for nvidia_pstate-1.0.5.post2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for nvidia-pstate 1.0.5.post2
File Interpreter ABI Platform Actions
nvidia_pstate-1.0.5.post2-py3-none-any.whl Python 3 none any Details for nvidia_pstate-1.0.5.post2-py3-none-any.whl

Total release size: 13.4 kB

Release files / nvidia_pstate-1.0.5.post2.tar.gz

Download URL nvidia_pstate-1.0.5.post2.tar.gz
Size 6.0 kB
Tags Source
SHA-256 checksum
How to use checksums
5967040b70f6919075328fe42e02364e8da34e46f33fa919f06300f3f3a31395
BLAKE2b-256 checksum
How to use checksums
a6ac43acf1e9bbbafe3f122aaf231fc19bf1dda0ca841e4329bbf40821e7dc13
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.1 CPython/3.12.5

Release files / nvidia_pstate-1.0.5.post2-py3-none-any.whl

Download URL nvidia_pstate-1.0.5.post2-py3-none-any.whl
Size 7.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7bb4f8eb5cd1b4dafe662ef7b9aa5323c37db95710742751953d8f843dc2d263
BLAKE2b-256 checksum
How to use checksums
a80cab0a4fac08210067af93dfd57bb74e02060461d2ea8b9dc8db44e2fede9c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.1 CPython/3.12.5

Security for nvidia-pstate 1.0.5.post2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page