Files
nvcurve/docs/Tips-and-Tricks.md
T

145 lines
5.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Tips and Tricks
Practical tips, workflows, and techniques for getting the most out of NVCurve.
## Understanding the V/F Curve
The voltage-frequency curve defines how your GPU clocks at different voltage levels. Each point on the curve represents a (frequency, voltage) pair. NVCurve lets you add a frequency offset to each point, effectively shifting where your GPU operates.
- **Positive offsets** increase clock speed at a given voltage (overclocking).
- **Negative offsets** reduce clock speed at a given voltage, which can enable undervolting (lower voltage for the same performance, or same voltage at lower clocks for efficiency).
## Start Small, Test Often
When experimenting with offsets:
1. Use `--dry-run` to preview changes before applying them:
```bash
nvcurve write --global --delta 25 --dry-run
```
2. Apply small increments (10–25 MHz) and test stability between each step.
3. Use snapshots to roll back: `nvcurve snapshot restore`.
## The Global Offset Shortcut
If all active points share the same delta, the **Global Offset** slider appears in the web UI toolbar. This is equivalent to `nvcurve write --global` but gives you interactive control. Drag the slider to stage a uniform offset across every point, then click Apply.
## Curve Flattening for Efficiency
Curve flattening is a powerful technique for efficiency-oriented tuning:
1. Select a group of points in the upper voltage range.
2. Click **Flatten to [anchor]** in the toolbar.
3. This sets each selected point to land on the same effective frequency as your anchor point.
The result is a "step" in your curve where multiple voltage points map to the same clock — useful for finding the sweet spot where your GPU delivers peak frequency with minimal voltage.
## Keyboard-Driven Workflow
For precise tuning, the keyboard shortcuts in the curve editor are your friend:
- **Arrow keys** nudge selected point(s) by ±1 MHz.
- **Ctrl/Cmd + arrow keys** nudge by ±10 MHz.
- **Tab / Shift+Tab** steps selection through points one by one.
- **Enter** opens inline input for exact values.
This lets you make surgical adjustments without reaching for the mouse.
## Profile Strategy
A good profile setup covers your common use cases:
| Profile | Purpose |
|---|---|
| `gaming` | Aggressive positive offsets for maximum performance |
| `balanced` | Mild offsets for a good performance/temperature tradeoff |
| `efficient` | Negative offsets or flattened curve for low power usage |
| `stock` | Zero offsets (baseline for comparison) |
Set your preferred profile as the default so it auto-applies on boot:
```bash
nvcurve profile default gaming
```
## LACT Conflict
If you use LACT (Linux Auto-Clock Tuner) or similar tools, they will conflict with NVCurve because both write to the same hardware registers.
**Before using NVCurve with a default profile:**
```bash
sudo systemctl disable --now lactd
```
Otherwise, `lactd` will apply its own curve on startup and overwrite NVCurve's auto-applied profile.
## Multi-GPU Considerations
In multi-GPU setups:
- Each GPU maintains its own isolated state (write lock, active profile, monitoring).
- Use `--gpu N` to target a specific GPU from the CLI.
- In the web UI, switch GPUs using the dropdown in the status bar.
- Set per-GPU default profiles:
```bash
nvcurve --gpu 0 profile default gaming
nvcurve --gpu 1 profile default efficient
```
## Diagnostics Before Troubleshooting
When something isn't working right, run diagnostics first:
```bash
nvcurve read --diag
```
This shows:
- GPU name and driver version
- VRAM totals
- All NvAPI function probe results
- Current clock offsets and memory offset ranges
- Power limits
Use `nvcurve inspect` to examine raw ClockBoostTable fields for specific points:
```bash
nvcurve inspect --point 80
nvcurve inspect --range 78-82
```
## Headless / Scripting Workflow
For headless systems or automation, the CLI is fully self-contained:
```bash
#!/bin/bash
# Example: Apply a profile, run a benchmark, then restore
nvcurve profile apply gaming
./my-benchmark.sh
nvcurve snapshot restore
```
All CLI commands that interact with hardware automatically escalate to root via `sudo`. The `--json` flag on `nvcurve read` makes it easy to parse output in scripts.
## Safety Limits
NVCurve enforces safety limits to prevent damage:
- **Max delta cap**: ±3000 MHz hard limit per point.
- **Auto-snapshot**: A snapshot is saved before every write (configurable).
- **Negative frequency warnings**: The tool warns if an offset would result in a negative effective frequency.
These safeguards are in place, but remember — you're writing to undocumented hardware registers. Always test stability after applying changes and monitor temperatures.
## Background Daemon vs. Web Server
NVCurve has two running components to understand:
- **Daemon** (`nvcurve daemon`) — Lightweight Unix socket daemon that handles auto-loading profiles on boot. Managed via `nvcurve service`.
- **Web server** (`nvcurve serve`) — FastAPI REST + WebSocket server for the web UI. Starts on demand.
The systemd service (`nvcurve service install`) manages the daemon. The web server is optional and starts separately. Use `--auto-serve` at service install time if you want the web server to auto-start on boot as well.