The fan curve previously only controlled fan index 0; secondary fans
stayed on driver control. The curve can now target all fans (new
default) or any individual fan(s).
Backend:
- hal/fans.py: get_num_fans() via nvmlDeviceGetNumFans; get_fan_info()
returns per-fan speeds; set_fan_speed() accepts a fan index list
(None = all fans; all-fans mode is lenient toward driver-locked
fans, explicit lists are strict); reset_fan() restores all fans.
- server.py: per-GPU fan_targets state; the poller applies the curve to
all target fans and logs write failures (once per distinct error);
activation validates targets against the hardware (stale indices fall
back to all fans); POST /api/fans accepts fans, POST /api/fans/speed
accepts a fan index, GET /api/fans returns num_fans/fans/fan_targets.
- Persistence format is now {"curve": ..., "fans": ...}; legacy
bare-curve entries migrate to "all fans" at startup.
- Profiles save/apply fan_targets alongside fan_curve.
- MonitoringSample carries per-fan speeds for live gauges.
Frontend:
- Fans tab: All / Fan 1 / Fan 2 / ... selector with live per-fan %;
the selection is applied together with the curve.
- Live monitor: per-fan gauges with sparklines for multi-fan GPUs.
50 lines
3.3 KiB
Markdown
50 lines
3.3 KiB
Markdown
# NVCurve
|
|
|
|
NVCurve is a Linux-based voltage-frequency (V/F) curve editor and overclocking tool for NVIDIA GPUs. It brings per-point V/F curve control — similar to MSI Afterburner on Windows — directly to Linux, using undocumented NvAPI functions exposed through `libnvidia-api.so`.
|
|
|
|
## What It Does
|
|
|
|
At its core, NVCurve lets you adjust the frequency offset for any voltage point on your GPU's V/F curve. This gives you fine-grained control over how your GPU clocks at different voltage levels, enabling both performance-oriented overclocking and efficiency-oriented undervolting.
|
|
|
|
## Two Interfaces, One Tool
|
|
|
|
NVCurve provides two ways to interact with your GPU:
|
|
|
|
- **Web UI** — A modern React-based interface with an interactive curve graph, real-time hardware monitoring, point table editor, and profile management. This is the primary interface for most users.
|
|
- **CLI** — A Python command-line tool for scripting, headless systems, automation, and quick one-off operations. Works independently of the web server.
|
|
|
|
## Key Capabilities
|
|
|
|
- **Per-Point Curve Editing** — Adjust the frequency offset for any individual voltage point on the V/F curve.
|
|
- **Extended Memory Offset** — Memory clock offset up to +3000 MHz (Blackwell GPUs). Standard NVCurve caps at +1000 MHz.
|
|
- **Fan Curve Control** — Custom temperature-to-fan-speed curves via NVML (all fans or individual fans), adjustable through the web UI and savable in profiles.
|
|
- **Curve Flattening** — Select multiple points and flatten them to a common frequency using anchor-point targeting.
|
|
- **Live Monitoring** — Track GPU voltage, clock speed, temperature, and power draw in real time via NvAPI and NVML.
|
|
- **Profile Management** — Save, load, and switch between named profiles. Set a default profile that auto-applies on startup.
|
|
- **Multi-GPU Support** *(experimental)* — Manage multiple NVIDIA GPUs from a single server instance with a GPU selector in the web UI.
|
|
- **Snapshots** — Automatic snapshot-and-restore before every write, so you can always revert changes.
|
|
|
|
## Architecture
|
|
|
|
NVCurve consists of two components:
|
|
|
|
| Component | Description |
|
|
| --- | --- |
|
|
| **Python Backend** | Talks directly to `libnvidia-api.so` (via ctypes) and `libnvidia-ml.so` to read and write GPU hardware state. Exposes functionality through a FastAPI REST + WebSocket server. |
|
|
| **React Frontend** | Runs in the browser and communicates with the backend over HTTP and WebSockets. Handles curve visualization, point editing, live monitoring, and profile management. |
|
|
|
|
The backend keeps all privileged operations isolated from the browser. The CLI can operate entirely standalone, bypassing the server for direct hardware access.
|
|
|
|
## Important Notes
|
|
|
|
> **Experimental Software** — NVCurve uses undocumented NvAPI functions that may change between driver releases. It has been tested on a range of NVIDIA GPUs including RTX 5090 (Blackwell), but compatibility is not guaranteed on all hardware/driver combinations.
|
|
|
|
> **Read vs. Write Safety** — Read operations are generally safe. Write operations alter live GPU operational parameters. Always run the hardware compatibility check (`nvcurve setup`) before applying changes.
|
|
|
|
## Requirements
|
|
|
|
- **OS**: Linux
|
|
- **GPU**: NVIDIA GPU with a supported driver
|
|
- **Python**: 3.12 or later
|
|
- **Privileges**: Root access for hardware interactions (CLI prompts for `sudo` when needed)
|