The latest version has focused on overclocking for running local LLMs (AI). Primarily better memory OC support, and improved support for targeting mixed GPU models in a single system. Read on.
Back in September I posted about NVOC - NVIDIA GPU Overclocking for Linux, an ergonomic cli tool for overclocking and undervolting RTX 50-series cards on Linux.
The tool is at v0.3.0 now. It picked up multi-GPU support, machine-readable output, a few more cards, and a clean way to apply settings at boot.
More than one GPU
The first release assumed you had one card and operated on device 0. There was no way to point it at a specific GPU in a multi-card system.
There is now a -d/--device flag. The simplest form takes an index, or a comma separated list of them:
# one card
sudo nvoc -d 1 -o 856
# two specific cards
sudo nvoc -d 0,1 -c 200,2820 -o 856 -m 2000 -p 105
# everything in the box
sudo nvoc -d all -o 200
Indices are convenient until you reboot and they shuffle. NVML does not promise they stay put, so for anything you want to survive a restart, select by something stable.
Selecting a card without counting
You can target a card by UUID, by a substring of its name, or by a regex against the name:
# stable across reboots
sudo nvoc -d GPU-1234... -o 856
# case-insensitive substring on the device name
sudo nvoc -d name:5090 -o 856
sudo nvoc -d "n:5060 ti" -o 100
# regex, for a mix of models
sudo nvoc -d "regex:RTX 50[89]0" -o 856
sudo nvoc -d "r:5060( Ti)?" -o 100
In a box with a 5090 and a couple of 5060 Ti, name:5090 is easier than working out which index the driver handed each card this boot.
nvoc list
To select a card you first need to know what is in the machine. nvoc list prints the index, name, and UUID of every GPU it can read:
$ nvoc list
0 - NVIDIA GeForce RTX 5090 - GPU-1234...
It skips devices it cannot read instead of falling over on them, so one flaky card does not take the whole listing down with it.
Output you can pipe
info and list both take --json now, which is what you need to drive nvoc from a script rather than by hand:
nvoc info --json
nvoc list --json
There is also nvoc list --uuid, which prints just the UUIDs, one per line. Put the two together and you can apply the same settings to every card by UUID without hardcoding anything:
for uuid in $(nvoc list --uuid); do
sudo nvoc -d "$uuid" -o 856 -m 2000 -p 105
done
(-d all does the same in one shot. The loop earns its keep when you want different values per card.)
Not only RTX 50-series
The original gated on the card being an RTX 50-series part by matching its name. That was lazy, and it locked out the RTX PRO Blackwell cards, which are the same architecture wearing a different name.
nvoc now asks NVML for the architecture directly and accepts anything Blackwell, so the workstation cards work too. It is still Blackwell only, though.
A call for help
There is experimental support for Ada Lovelace (RTX 4060, 4070, 4080, 4090) and Ampere (RTX 3050, 3060, 3070, 3080, 3090) already, but it needs testing on hardware I do not have. If you own one of those cards, trying the relevant branch and reporting your results would be appreciated.
Draft PRs: Ada Lovelace (40-series) and Ampere (30-series).
Applying settings at boot
Overclock settings do not persist. Reboot and you are back at stock. A systemd oneshot service reapplies them automatically:
# /etc/systemd/system/gpu-oc.service
[Unit]
Description=GPU overclock settings
After=multi-user.target
[Service]
Type=oneshot
ExecStart=/usr/bin/nvoc -c 200,2820 -o 856 -m 2000 -p 105
[Install]
WantedBy=multi-user.target
sudo systemctl daemon-reload
sudo systemctl enable --now gpu-oc.service
On a multi-GPU box, pin by UUID or model rather than index, for the reasons above. The README has the full walkthrough.
Installing
If you are on Arch, it is in the AUR now:
paru -S nvoc-cli
Building from source still works the same way with cargo build --release.
Smaller things
-
resetputs clocks back through NVML directly, instead of the slightly hacky idle-clock trick the first version leaned on, and it attempts every reset before reporting what failed rather than bailing on the first error. -
--dry-runno longer needs root, since previewing a change should not require privileges to do nothing. - Device names stopped truncating, after a switch to the v2 NVML name buffer.
-
infoshows the memory clock offset next to the graphics one now. - An unknown device error points you at
nvoc listinstead of leaving you to guess.
$ nvoc info
driver: 595.71.05
gpu 0: NVIDIA GeForce RTX 5090
gpu clock: 1080MHz
gpu offset: 856MHz
mem clock: 810MHz
mem offset: 2000MHz
temp: 52°C
power: 28W
power limit: 600W (104%)
power range: 400W-575W (600W hard limit)
Repo and issues: https://github.com/martinstark/nvoc/
Top comments (0)