Skip to content

feat: show the clock domains NVML does not report (XBAR, SYS, NVD) - #502

Open
Panchovix wants to merge 1 commit into
Syllo:masterfrom
Panchovix:feat/nvidia-extra-clock-domains
Open

feat: show the clock domains NVML does not report (XBAR, SYS, NVD)#502
Panchovix wants to merge 1 commit into
Syllo:masterfrom
Panchovix:feat/nvidia-extra-clock-domains

Conversation

@Panchovix

@Panchovix Panchovix commented Aug 22, 2026

Copy link
Copy Markdown

NVML reports the graphics, memory and video clocks and nothing else, so on NVIDIA the domains that explain much of what the GPU is doing under a power limit are invisible to nvtop. XBAR in particular is the clock the memory subsystem runs at, and watching it next to the graphics clock is what tells a power limited board apart from a bandwidth limited one.

They are reachable through the NvAPI library the driver installs next to NVML. Everything is resolved through nvapi_QueryInterface, so a driver without the library, or without these entry points, simply reports no extra clocks and nothing else in the interface changes. No privileges are needed - this works as an ordinary user, same as NVML.

Screenshot

nvtop -x, on an idle and a loaded GPU:

 Device 0 [NVIDIA RTX PRO 6000 Blackwell Max-Q Workstation Edition] PCIe GEN 4@16x
 GPU 2422MHz MEM 16000MHz TEMP  41°C  FAN   0%   POW 251 / 250 W
 GPU[|||||||||||||||||||||||||||||||||||||100%(eff 100%)] MEM[||||||  11.908Gi/95.593Gi]
 XBAR 1980MHz    SYS 1980MHz     NVD 1395MHz

 Device 1 [NVIDIA RTX PRO 6000 Blackwell Max-Q Workstation Edition] PCIe GEN 1@16x
 GPU 675MHz  MEM 405MHz   TEMP  22°C  FAN   0%   POW   9 / 250 W
 GPU[                                         0%(eff 0%)] MEM[   0.596Gi/95.593Gi]
 XBAR 885MHz     SYS 660MHz      NVD 930MHz

Not an NVIDIA specific field

The dynamic info carries these as a small array of named domains rather than as three NVIDIA specific fields, since other drivers expose clocks of the same kind - socclk and fclk on AMD, for instance - and can fill the same array with a single call to gpuinfo_add_extra_clock().

A domain can be marked secondary, meaning it sits at a fixed frequency most of the time and is only worth a look now and then. -x shows the rest, -X shows both, and both have a checkbox in the setup window under Devices. The snapshot output carries every domain a device reports, keyed by name.

The bar costs nothing when there is nothing to show

How many domains a GPU reports is only known after its first refresh, which happens once the windows have already been laid out. So the rows the bar needs are recomputed on every draw and the windows rebuilt when the count changes. A GPU that reports no such domain - an AMD or Intel one, or an NVIDIA whose driver has no NvAPI - costs no row at all rather than leaving a blank line, and the bar takes a second row when eight domains are on screen.

Rows are never given back on their own, only when an option changes, so one failed read cannot make the interface jump. The rebuild is also held back while the setup window is open, since alloc_setup_window() clears visible and would otherwise close it under the user mid-toggle.

Testing

Six GPUs on one machine, driver 610.57.04: three RTX PRO 6000 Blackwell, an RTX PRO 4000 Blackwell, an RTX 2000 Ada and a GeForce RTX 3060 Ti, plus a Ryzen 9900X integrated GPU for the case where a device reports nothing. Ada and Ampere work as well as Blackwell, so this is not new hardware only.

The struct layout was checked against nvidia-smi before being trusted: domain 0 matches clocks.current.graphics, domain 4 matches clocks.current.memory and domain 21 matches clocks.current.video, exactly, on all six.

Verified: both options separately and together, alongside -i, toggling from the setup window, saving and reloading the config, a config that leaves only the integrated GPU monitored (no row reserved), and the snapshot output. Builds clean with -Wall -Wextra.

NVML only exposes the graphics, memory and video clocks, so the domains
that explain a lot of NVIDIA behaviour under a power limit - XBAR, SYS
and NVD - are invisible from nvtop. They are reachable through the NvAPI
library the driver installs next to NVML, which resolves every entry
point through nvapi_QueryInterface, so a driver without it loses nothing
else and needs no privileges of its own.

The dynamic info carries them as a small array of named domains rather
than as NVIDIA specific fields, since other drivers expose clocks of the
same kind (socclk and fclk on AMD, for instance) and can fill the same
array. A domain marked secondary is one that sits at a fixed frequency
most of the time; -x shows the rest, -X shows both, and the snapshot
output carries everything.

How many domains a GPU reports is only known after its first refresh,
which happens once the windows are already laid out, so the rows the bar
needs are revisited on every draw and the windows rebuilt when the count
changes. The bar therefore costs nothing on a GPU that reports no such
domain, and takes a second row when eight of them are on screen. Rows are
never given back on their own, only when an option changes, so one failed
read cannot make the interface jump.

Domain 20 is labelled NVD rather than the Pwr some tools use: a frequency
offset on it raises NVENC throughput by the same proportion, measured
A-B-A on an RTX PRO 6000, which a power management clock would not do.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant