* pmu_bringup: log when the boot-voltage cap lowers a v100_p0_gpc_ndiv request On GV100 (Tesla V100) a `v100_p0_gpc_ndiv` request above 172 is applied as 172 (1290 MHz) whenever the LOGIC rail was not raised. Nothing said so: with `v100_p0_gpc_ndiv=204` the only line was "GV100 P0 boost active: GPC 555.0 -> 1290.0 MHz", which reads like the outcome of the request, and the parameter still read back 204. The compiled-in default (190) is capped the same way. Reported in #367. The cap was two copies of an inline `if req > 172 && !volt_raised`, in the bring-up path and in the governor tick that re-reads the parameter. This commit only moves that existing condition; the value 172 and the applied clock are unchanged. Both sites now go through nv_rs_core: - `gv100_p0_boost::clamp_p0_gpc_ndiv_for_volt` returns `(effective_ndiv, was_clamped)`; the cap is `BOOT_VOLT_MAX_GPC_NDIV`. - `P0GpcClampNotice::retune` takes the request, the NDIV in effect and a callback that performs the clock write, and decides whether to write and whether to report. A capped request is reported only once the capped clock is in effect: this pass wrote it successfully, or an active boost already sits at the cap. A write that fails (`P0BoostStatus::NafllNotReady` and the like) is not reported as applied and is not remembered, so the retry that succeeds reports it. Each capped request is reported once, not once per tick. The line is printed before the boost line: nvidia_rs: GV100 P0 GPC NDIV request capped gpu=0x...: requested 204 (1530.0 MHz), applied 172 (1290.0 MHz); LOGIC rail is at boot voltage (no PMU VOLT scaling) It is pr_info, next to nv_rs_p0_boost_log and in the same style, because the default request is capped too and a warning on every default load would be noise. The parameter keeps reading back the request. `v100_hbm_ndiv` does the same across an adaptive backoff, `v100_p0_volt_uv` (read-only, 0444) is range-limited only in its getter, and one global value cannot show a per-GPU result when `v100_p0_gpc_ndiv_map` or the rail state differs per GPU. README says so. No stock 580.178.04 function is cited because no RM control, register sequence, struct layout or status code changes. Tests (host, the clock write is a mock callback): p0_gpc_request_is_capped_at_boot_voltage_and_reported, p0_gpc_initial_capped_boost_is_reported_once_and_ticks_do_not_repeat_it, p0_gpc_failed_retune_is_not_reported_as_applied, p0_gpc_clamp_is_not_reported_where_no_boost_took_effect. The C side is one printk wrapper; its callers are compiled out of the EDU guest build (`cfg(not(nv_rs_edu_guest))`). QEMU EDU guest tests were not run. Not run on a GPU. Refs #367 * pmu_bringup: report the live GPC clock in the skipped-retune notice Review finding on #447. The capped-request notice named the retune baseline (`applied_gpc_ndiv`) even when no write ran. The thermal guard and the idle governor lower the hardware GPC clock and update only `SavedP0State::cur_gpc_ndiv`, so the baseline can be stale: request 190 boosts to 172, a hot tick drops the clock to 160, the request changes to 204, the write is skipped because the target still equals the baseline, and the line said "applied 172 (1290.0 MHz)" while the clock was at 1200 MHz. `P0GpcRetune::notice_ndiv(live_ndiv)` now picks the NDIV the notice names: after a successful write, the NDIV just written (unchanged); when the write was skipped, the live clock from `cur_gpc_ndiv`. The live value is used for the report only. The write decision still compares the retune target with the baseline, so a hot tick is not undone by raising the clock back to the cap. Test: p0_gpc_skipped_retune_notice_names_the_live_clock (host). Not run on a GPU; QEMU EDU guest tests not run. Refs #367 * pmu_bringup: track idle-clock writes in the live GPC clock Review finding on #447 (round 2). The skipped-retune notice names the live clock `SavedP0State::cur_gpc_ndiv`, but the idle governor's writes did not update it except on the transition back to Active. Request 190 boosts to 172, the governor enters LowPower and writes NDIV 74, the request changes to 204 while still idle, the write is skipped because the target equals the baseline, and the notice said 172 instead of 74. The same held when `idle_pstate_gpc_khz` changed while already idle. `IdlePstateGovernor::tick_tracking_live_ndiv` wraps `tick_with_clock` and stores every NDIV the governor wrote successfully in the live state: entering LowPower, re-applying a changed idle clock while in LowPower, and waking to Active (which replaces the caller's Active-only update). A failed write leaves it unchanged. The retune baseline `applied_gpc_ndiv` and the write decision are untouched. The thermal guard and power cap still read `cur_gpc_ndiv` only while Active, and the wake to Active sets it to the active clock first, as before. Test: p0_gpc_skipped_retune_notice_names_the_idle_clock (host) runs the tick sequence with the real retune, idle governor and boost_gv100_p0 writes on MockGv100; with the live-state store removed it fails with 172 != 74. Not run on a GPU; QEMU EDU guest tests not run. Refs #367 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * README: say when the capped-request line repeats retune() logs once per distinct capped request per GPU and re-arms after an uncapped request, so 'one line per GPU' overstated it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * gpu_owner: don't claim the LOGIC rail stayed at boot voltage in the cap notice runtime_pmu_volt_init_and_scale returns volt_raised = false when any VOLT SET step fails, even after earlier steps raised the rail, so the capped-request line cannot say no scaling happened. Say the cap is active and the raise was not confirmed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Scott <scottbphone12@gmail.com>
44 KiB
nvdriver
Platform: This is the Linux driver repository. For Windows, see
nvdriver/nvdriver-windows.
I am taking applications for co-maintainer, if you have been contributing and wish to help maintain this project, please reach out. eric@quixi.ai
nvdriver (nvidia_rs.ko) is a clean-room, open-source #![no_std] Rust Linux kernel driver for NVIDIA GPUs. The goal is a full drop-in replacement for NVIDIA's proprietary kernel driver across core Linux hardware support, CUDA compute, 3D graphics (Vulkan/OpenGL), and Linux desktop video output (Wayland/X11/KMS), without the software restrictions NVIDIA ships in the closed driver.
It works with unmodified NVIDIA userspace (libcuda.so, libnvidia-ml.so, nvidia-smi, NVENC/NVDEC, PyTorch, cuDNN, NCCL, llama.cpp, Vulkan/OpenGL) and ships both standalone companion modules (nvidia_rs_modeset.ko, nvidia_rs_drm.ko, nvidia_rs_peermem.ko) and CONFIG_MODVERSIONS bridges for stock nvidia-uvm.ko and nvidia-modeset.ko/nvidia-drm.ko. One codebase covers pre-GSP GPUs (Maxwell, Pascal, Volta) alongside Turing, Ampere, Hopper, Ada Lovelace, Blackwell, and Rubin.
On Tesla V100 (GV100), nvdriver also supports opt-in HBM2 overclocking to 1107 MHz (V100S factory spec, +26.2% memory bandwidth, 1,041.7 GB/s per card / 8.33 TB/s across 8x V100) using v100_hbm_ndiv=82, along with dynamic P0 boost (1290 MHz default / 1425 MHz configurable, 1380 MHz XBAR, 1 Hz thermal guard) and live nvidia-smi / hwmon telemetry. The V100 HBM2 clock unlock builds on the hardware work of arikamidotnet and FBR-ROM/FBR-RAM-Downloader.
Goals
- Core Linux driver: Native
#![no_std]Rust bring-up for Maxwell through Blackwell and Rubin. Handles PCI/MMU/Pre-GSP and GSP-RM boot,nvidia-smi/NVML,/sys/class/hwmonsensors, clocks/power/thermals, NVENC/NVDEC, multi-GPU P2P/NVLink/RDMA, S3/RTD3 suspend, and bothx86_64andarm64. - CUDA and compute: Drop-in support for unmodified
libcuda.so, UVM, PyTorch, cuDNN, NCCL, andllama.cpp, matching or beating the proprietary driver where hardware locks can be removed. - 3D graphics (Vulkan and OpenGL): Full hardware-accelerated rendering and compute with unmodified Vulkan and OpenGL stacks, including headless and PRIME render offload on datacenter and mining cards.
- Linux desktop (video output): Native display output for Wayland and X11 through
nvidia_rs_modeset.koandnvidia_rs_drm.ko: VBIOS DCB connector enumeration, KMS CRTC/plane/encoder pipelines, DP/HDMI/eDP link training, EDID, hotplug, and VRR/G-Sync on display-capable cards.
What It Does Today
- Unmodified userspace compatibility: Runs stock
libcuda.so,libnvidia-ml.so,nvidia-smi,libnvidia-encode.so,libnvcuvid.so, Vulkan/OpenGL userspace, PyTorch, cuDNN, NCCL, andllama.cpp, plus stocknvidia-uvm.koandnvidia-modeset.ko/nvidia-drm.kovia version-aware bridges. - No artificial software locks: Enables PCIe and Dynamic BAR1 P2P (
RMDynBar1P2PEnable=1+RMDisableFeatureDisablement=1, plus optional PCIe P2P Atomics), Resizable BAR1 by default, native Linuxdma-buf+P2PDMA/ GPUDirect RDMA, unrestricted NVENC sessions and telemetry, full compute on mining cards (CMP 100-210,170HX,90HX,70HX,50HX,40HX,30HX,P102-100), opt-in SM Speed-Select FP32-accumulate Tensor unlock (unlock_tensor_fp32_acc=1), unprivileged hardware profiling (unpriv_profiling=1by default for non-rootncu/nsys/CUPTI), zero-reboot ECC toggle (disable_ecc=1), and vGPU/SR-IOV without CPUID or GRID licensing timers. - Opt-in HBM2/HBM2e and GDDR5X memory tuning: Supports live runtime-writable HBM2 clock scaling on V100 (
v100_hbm_ndiv=82for1107 MHz/ +26.2% bandwidth, stock877.5 MHzby default for safety across all cards), multi-gen HBM2/HBM2e profiles for P100 and A100 (p100_hbm_ndiv,ga100_hbm_ndiv, verified withtools/hbm_gate.py), and Pascal GP102/GP104 GDDR5X timing profiles (gddr5x_timing_profile), with per-partition lock checks, automatic rollback on error, and clean restore on unload. - Native telemetry (
nvidia-smi+/sys/class/hwmon): Exposes per-GPU Linuxhwmonsensors (temp1_input,power1_average,in0_input,gpc_clock_mhz,mem_clock_mhz,gpu_util_pct,mem_util_pctforlm-sensors,btop,nvtop, Prometheusnode_exporter) alongside NVML/RMAPI telemetry (PROM BIT VBIOS version,NV_PPWR_PMU_IDLE_COUNTGPU/memory utilization, and PMGR I2C INA3221 power readings). - x86_64 and ARM64 PCIe (
ARCH=arm64): Builds forx86_64-unknown-noneandaarch64-unknown-none(-C target-feature=-neon,-fp-armv8) with explicit non-coherent DMA cache sync (dma_sync_single_for_cpu/device) for ARM64 PCIe boards (RK3588, Ampere Altra, Apple Silicon Linux). - Pre-GSP and GSP-RM in one driver: Drives Maxwell, Pascal, and Volta natively in Rust alongside Turing, Ampere, Hopper, Ada Lovelace, Blackwell (
620.70.06GSP-RM default,580compat), and Rubin (GR100). - Kernel ABI hygiene:
#![no_std]Rust core linked into a thin Linux C shim, audited on every build for zero GOT relocations, zero SIMD/x87, zeromemcpy/memset/memmove/strlenleaks, zero unwind sections, stack frames<= 1,024bytes, andCONFIG_MITIGATION_RETHUNK,CONFIG_MITIGATION_SLS,CONFIG_X86_KERNEL_IBT, andCONFIG_CALL_PADDINGcompatibility across Linux 5.15–7.0+. - Live Linux desktop video output & 3D gaming (GA102): Verified Dual-4K@60Hz GNOME Wayland desktop (
DP-2+HDMI-1), smooth OpenGL (Xonoticat 250 fps), and Vulkan + sparse resources (Counter-Strike 2) on physical RTX 3080 Ti vianvidia_rs.ko+nvidia_rs_modeset_bridge.kobacking stocknvidia-modeset.ko/nvidia-drm.ko modeset=1, alongside standalonenvidia_rs_modeset.ko/nvidia_rs_drm.koKMS/DRM modules. - Tested on 8x physical V100s: Verified side-by-side against stock NVIDIA
580.178.04on 8x physical Tesla V100-SXM2-32GB (256 GiB VRAM): 77/77 CUDA Parity Suite checks, 8-GPU PyTorch/NCCLAllReduce(59.71 GB/sBusBW,max_err = 0.0),8.33 TB/saggregate HBM2 STREAM Triad (at1107 MHz), multi-GPU FP16/FP32 GEMM andllama.cpp, 25.781 Gbps NVLink 2.0, H.264/HEVC NVENC & NVDEC, S3/S4 suspend/resume, and automatic Xid 31 fault recovery with clean module unload.
Performance vs. Proprietary NVIDIA 580.178.04 (Tesla V100-SXM2-32GB)
Single-GPU & 2-GPU NVLink Head-to-Head (Identical VFIO VMs, 0000:b2/b3:00.0)
| Benchmark | Proprietary 580.178.04 |
nvdriver (1107 MHz HBM2) |
Delta |
|---|---|---|---|
| PyTorch STREAM Triad (768 MiB) | 821.85 GB/s |
1,041.72 GB/s |
+26.8% |
| HBM2 D2D Copy (512 MiB) | 819.01 GB/s |
1,013.65 GB/s |
+23.8% |
| FP16 Tensor Core GEMM (8192³) | 97.69 TFLOPS |
107.17 TFLOPS |
+9.7% |
| FP32 GEMM (8192³) | 14.18 TFLOPS |
14.37 TFLOPS |
+1.3% |
| Memory-Bound LayerNorm + GELU | 2.612 ms |
2.126 ms |
1.23x faster |
llama.cpp Prompt Eval (pp512) |
31,067 tok/s |
34,884 tok/s |
+12.3% |
| Transformer Layer Fwd + Bwd | 13.245 ms |
12.885 ms |
+2.7% faster |
| CUDA Graph 50-op Replay | 76.17 µs |
80.20 µs |
95.0% parity |
| PCIe Pinned H2D / D2H (256 MiB) | 12.39 / 13.16 GB/s |
12.40 / 13.16 GB/s |
100% parity |
2-GPU NVLink 2.0 NV2 Bidir / Unidir |
94.0 / 48.1 GB/s |
96.98 / 48.49 GB/s |
+3.2% (25.781 Gbps) |
Bare-Metal 8x Tesla V100-SXM2-32GB (geodd03, 256 GiB VRAM)
| Workload | Measured on nvidia_rs.ko |
|---|---|
8x V100 HBM2 STREAM Triad (1107 MHz) |
8,334.1 GB/s (8.33 TB/s) aggregate (1,041.3–1,041.9 GB/s per GPU) |
8-GPU PyTorch/NCCL AllReduce (FP16 256 MiB) |
59.71 GB/s BusBW (34.12 GB/s AlgBW, max_err = 0.0) |
| 8-GPU PyTorch DDP Transformer (92.4M, FP16 AMP) | 497,072 tok/s (970.8 samples/s, 275.4 TFLOPS eff., 0.0e+00 weight parity) |
8-GPU Simultaneous FP16 / FP32 GEMM (8192³) |
776.14 TFLOPS FP16 / 103.44 TFLOPS FP32 aggregate (1290 MHz, 97.00–97.03 TFLOPS/GPU; 106.8 TFLOPS/GPU @ 1425 MHz) |
8-GPU Layer-Split llama.cpp (-sm layer, 256 GiB) |
30,169.8 tok/s pp512, 492.28 tok/s tg128 across all 8 GPUs |
See docs/PARITY_AND_UNLOCKS.md for the full 3-way breakdown comparing stock 877.5 MHz vs. unlocked 1107 MHz HBM2 (v100_hbm_ndiv=82).
GPU Support Matrix
Every discrete NVIDIA GPU series this driver targets, ordered newest (Rubin) to oldest (Maxwell 1), split by silicon family and whether the card has physical display outputs.
- Core: kernel bring-up, Pre-GSP/GSP-RM boot,
nvidia-smi/NVML,hwmon, clocks and power - CUDA: compute, UVM, PyTorch,
llama.cpp, NCCL - Graphics: Vulkan and OpenGL 3D rendering, including headless/PRIME offload
- Display: Linux desktop video output (KMS/DRM, DP/HDMI/eDP, Wayland/X11)
- vs. Proprietary: measured speedup over the proprietary NVIDIA driver
Legend: (blank) = supported target, not started · 25% = offline HAL/firmware wired ·
50% = active silicon bring-up ·
75% = working on silicon (some dies or partial features) ·
100% = verified on silicon ·
n/a = no physical video outputs.
Notes:
- vs. Proprietary shows real-silicon deltas vs. stock NVIDIA drivers. On Tesla V100 (
v100_hbm_ndiv=82), that is+26.8%STREAM Triad HBM2 bandwidth,+9.7%FP16 Tensor Core GEMM, and+12.3%llama.cppprompt eval. Other GPUs will fill in as head-to-head benchmarks are run. - Tegra / Jetson and older GPUs: Early
Jetson Xavier (T194 / GV11B)scaffolding has started (#355,#356);Jetson Orin (T234)andThor (T264)are not supported yet. Pre-Maxwell GPUs (Kepler, Fermi, Tesla) are outside the580.xdriver scope. - To test a card on real hardware, see docs/GPU_BRINGUP_GUIDE.md. For the full 43-chip tuple table, verified workload digests, and disassembly notes on unlocked restrictions, see docs/PARITY_AND_UNLOCKS.md.
Quick Start
For a step-by-step distro install guide (Ubuntu/Debian, Arch/CachyOS, Fedora, NixOS, Secure Boot, troubleshooting, and rollback), see docs/INSTALL.md.
Prerequisites
- Linux
x86_64orarm64(aarch64) with kernel headers (/lib/modules/$(uname -r)/build) - Rust toolchain with the
x86_64-unknown-none(oraarch64-unknown-none) target - Existing NVIDIA userspace libraries (
libcuda.so,nvidia-smi, etc.)
Build & Validate
# Build nvidia_rs.ko and run the 36-step unit, oracle, QEMU guest & kernel-hygiene gate
sh tools/validate_all.sh
# ARM64 / SBC PCIe build (RK3588, Ampere Altra, Apple Silicon Linux)
ARCH=arm64 make modules
# Optional: x86_64 Unicorn binary oracles & companion module bridges
python3 tools/mock_gv100_diff.py
make uvm-bridge && python3 tools/check_uvm_symbol_conformance.py
make modeset-bridge && python3 tools/check_modeset_symbol_conformance.py
Install & Module Options
Run ./install.sh to install with runtime_engines=1, pci_target=*, and BIND_DEV_NODES=1. It extracts pre-GSP firmware packs, copies GSP blobs, writes /etc/modprobe.d/nvdriver.conf and udev rules, handles Secure Boot MOK signing, and on Volta GV100 / Tesla V100 installs pinned volta-forever for CUDA 13 compatibility (pass SKIP_VOLTA_FOREVER=1 to skip). Any MODPROBE_ARGS you pass are saved to /etc/modprobe.d/nvdriver.conf so they persist across reboots. ./uninstall.sh unloads the modules and removes the files the installer wrote (REMOVE_FIRMWARE=1 also deletes /lib/firmware/nvidia-rs).
Or set options directly in /etc/modprobe.d/nvdriver.conf:
options nvidia_rs pci_target=* runtime_engines=1
Key module parameters:
v100_hbm_ndiv=0(default = stock877.5 MHz, runtime-writable0644): GV100 / CMP 100-210 HBM2 clock divider. Opt in to82(1107 MHzV100S spec / +26.2%),80(1080 MHz/ +23%), or78(1053 MHz/ +20%). One V100-PCIe-32GB field report saw hangs or NaN results at 1107 and 1053 MHz while stock clocks ran clean; stability varies by card (Issue #76).v100_hbm_ndiv_map=""(optional, runtime-writable0644): Per-BDF GV100 HBM2 NDIV overrides (e.g.v100_hbm_ndiv_map="0000:81:00.0=67,82:00.0=82"), falling back tov100_hbm_ndiv.p100_hbm_ndiv=0/ga100_hbm_ndiv=0(opt-in, runtime-writable0644; plusp100_hbm_ndiv_map/ga100_hbm_ndiv_map): Multi-gen HBM2/HBM2e clock dividers for GP100 and GA100 (seetools/hbm_gate.py).gddr5x_timing_profile=0(opt-in, runtime-writable0644; plusgddr5x_timing_map): Runtime GDDR5X memory timing controller for Pascal GP102/GP104.v100_p0_gpc_ndiv=190(default, runtime-writable0644, auto-capped to172/1290 MHzunless Level-3 HS voltage scaling succeeds): GV100 dynamic P0 GPC NAFLL divider; writable live via/sys/module/nvidia_rs/parameters/v100_p0_gpc_ndiv(plusv100_p0_gpc_ndiv_mapfor per-BDF overrides). The parameter always reads back the requested value; when the cap lowers a request,dmesgshows aGV100 P0 GPC NDIV request cappedline with the requested and applied NDIV/MHz once per distinct capped request on each GPU (an uncapped request in between re-arms it) (Issue #367).v100_p0_volt_uv=0(default, experimental): Optional GV100 LOGIC rail voltage target in µV (clamped to[800_000, 1_050_000] µVin<= 25 mVsteps;0keeps VBIOS boot voltage and caps GPC at1290 MHz).unlock_ada_tensor=0(aliasunlock_tensor_fp32_acc=0, opt-in): Multi-gen SM Speed-Select FP32-accumulate Tensor Core unlock (PLM-guarded).dyn_bar1_p2p=1(default): Enables Dynamic BAR1 P2P (RMDynBar1P2PEnable=1+RMDisableFeatureDisablement=1+RMForceP2PType=2) in the GSP-RM registry alongsideEnableResizableBar=1.unpriv_profiling=1(default): Allows non-root CUPTI /ncu/nsyshardware performance counters (RMRestrictProfilingToAdminUsers=0).disable_ecc=0(opt-in): Zero-reboot ECC disable toggle across RMAPI, UVM, and GSP-RM without flashing InfoROM.live_pci_irq=1(default): Enables storm-guarded hardware MSI-X/PCI IRQ handling across PFIFO, PGRAPH, PMU, THERM, and HUB/MMU (0to disable).enable_resizable_bar=1(default): Expands BAR1 to the largest supported ReBAR aperture automatically.force_p2p=0x11(default): Enables PCIe P2P Read+Write (0x211adds PCIe P2P Atomics).force_pcie_gen=0(opt-in, runtime-writable0644; plusforce_pcie_gen_map): Overrides target PCIe link generation, clamped to upstream bridgeLNKCAP.vram_limit_mb=0(opt-in): Caps exposed VRAM size in MiB (useful for testing or isolating bad memory regions).idle_pstate=0(opt-in, runtime-writable0644; plusidle_pstate_delay_s=5,idle_pstate_gpc_khz=0): Activity-wake idle clock governor.hwmon_poll_ms(runtime-writable0644): Cache TTL in ms for on-demand GSP-RMhwmontelemetry polling.gsp_abi=620(default): Selects GSP-RM620.70.06/620.73.04MCTP+NVDM framing for Turing–Blackwell–Rubin (580for580.178.04compat).driver_version=auto(default) &strict_version_check=0(default): Automatically negotiates userspace NVML/libcudaversion strings per open file (driver_version=<ver>pins a specific string;strict_version_check=1restores strict stock version matching).ga10x_gsp=1(default): Boots Turing through Blackwell (TU10x/TU11x,GA100/GA10x,AD10x,GH100,GB10x/GB20x) on GSP-RM580.178.04throughga10x_gsp.rsregardless ofgsp_abi; withdriver_version=580.196.07, TU102/TU116 and GA102-class GPUs boot GSP-RM580.196.07instead. Set0to usegsp_bringup.ga10x_events=1(default): Delivers RM events from GR and copy-engine non-stall interrupts on GA10x and GV100 so blocking-sync waits wake right away instead of hittinglibcuda's 100 ms fallback timer.system_memory_pool_retain_mb=0(default): Trims cached system-memory pages on client close soMemAvailablestays accurate.
Bare-Metal Setup (GV100 / Pre-GSP)
- Extract signed GV100 firmware from your installed stock
580.178.04package (auto-detects/usr/src/nvidia-srv-580.178.04/and/usr/src/nvidia-580.178.04/):If the host has a different stock version installed (for examplesudo python3 tools/extract_gv100_firmware.py --out /lib/firmware/nvidia-rs/580.178.04/gv100.fw580.196.07), fetch the580.178.04object first. This unpacks one file from NVIDIA's installer without running or installing it, and verifies its digest:sh tools/fetch_580_kernel_object.sh sudo python3 tools/extract_gv100_firmware.py --rm-object target/stock-580.178.04/nv-kernel.o_binary --out /lib/firmware/nvidia-rs/580.178.04/gv100.fw - Keep
nvidia-modprobefrom loading stocknvidia.koovernvidia_rs(plainblacklistis bypassed by explicitmodprobe nvidia; boot clean so stocknvidia.kodoes not touch the GPU first):# /etc/modprobe.d/nvidia-blacklist.conf install nvidia /bin/false install nvidia_uvm /bin/false - Load
nvidia_rswith live runtime engines (for example via./install.shwithMODPROBE_ARGS="pci_target=* runtime_engines=1"), and run unmodifiednvidia-smi/ CUDA workloads throughtools/rmapi_namespace_launcher.py(which bind-mounts/sys/module/nvidia_rs->/sys/module/nvidiaso NVML sees/sys/module/nvidia/initstate==live).
Live /sys/class/hwmon Telemetry & Runtime Clock Tuning
Every GPU exposes a Linux hwmon sensor node (name = nvdriver) readable by lm-sensors, btop, nvtop, and Prometheus node_exporter. GV100 clocks can be adjusted live without reloading nvidia_rs.ko:
# Read live per-GPU sensors directly from sysfs (no libnvidia-ml.so required)
for h in /sys/class/hwmon/hwmon*; do
[ "$(cat "$h/name" 2>/dev/null)" = "nvdriver" ] && \
echo "$h: $(( $(cat $h/temp1_input)/1000 ))C $(( $(cat $h/power1_average)/1000000 ))W gpc=$(cat $h/gpc_clock_mhz)MHz mem=$(cat $h/mem_clock_mhz)MHz util=$(cat $h/gpu_util_pct)%"
done
# Tune GV100 GPC NAFLL clock live (takes effect within 1 s, no reload)
echo 160 | sudo tee /sys/module/nvidia_rs/parameters/v100_p0_gpc_ndiv # 1200 MHz
echo 172 | sudo tee /sys/module/nvidia_rs/parameters/v100_p0_gpc_ndiv # 1290 MHz
Safe Live Testing in a Disposable VFIO VM
# Single-GPU CUDA Parity Suite v19 on a VFIO-bound Tesla V100
sudo python3 tools/vm/run_vfio_guest.py --bdf 0000:b3:00.0 --driver rust
580.178.04 Subsystem Parity & Kernel Modules
nvdriver ships 4 standalone Linux kernel modules (nvidia_rs.ko with integrated UVM, nvidia_rs_modeset.ko, nvidia_rs_drm.ko, and nvidia_rs_peermem.ko), covering 100% of Linux UVM ioctls (73/73), 2,096/2,096 RM controls dispatched, and 1,090+ passing Rust unit/oracle tests:
| Domain | Ported Subsystems (src/nvidia/src/ & kernel-open/) |
|---|---|
| Compute, Scheduling & Sync | CILP / GFXP preemption (cilp_preempt.rs), Persisting L2 EVICT_LAST (l2_cache.rs), Explicit Sync dma_fence timelines 0x00da (sync_timeline.rs), NVIDIA MPS (UVM_REGISTER_MPS_*), Async CE VRAM/ECC Scrubber (mem_scrub.rs) |
| Memory, UVM & P2P | 100% Linux UVM ioctls (73/73), Linux HMM / SVA-ATS (uvm/hmm.rs), Thrashing/Prefetch heuristics (uvm/perf_heuristics.rs), Access Counter Notify Buffer 0xc365, Native dma-buf P2PDMA (NV_ESC_EXPORT_TO_DMABUF_FD), nvidia_rs_peermem.ko |
| Telemetry, Debug & Reliability | HWPM (0x90cc/0xb0cc/0xb1cc/0xb2cc) & cuda-gdb (0x83de/0x83df) + 13 UVM_TOOLS_* ioctls, SPI/PROM InfoROM (inforom_spi.rs), ECC Poison Xid 94/95 containment (ecc_poison.rs), RC Watchdog (rc_watchdog.rs), FECS Ctxsw Timeout Dump (ctxsw_dump.rs), GSP CrashCat decoder (crashcat.rs), stock NVRM: Xid logs, full /proc/driver/nvidia/ tree |
| Power, Thermals & Interconnect | Full PMU task stack VFE->THERM->VOLT->CLK->PMGR->PERF (pmu_task_stack.rs), LPWR GR-PG/MSCG/ELPG (lpwr_pg.rs), RTD3 & S3 VRAM preservation (rtd3_pm.rs), Fan 2.0/3.0 PWM (fan_cooler.rs), PCIe Gen1–5 & ASPM (pcie_bif.rs), NVLink 2.0 telemetry (nvlink_telemetry.rs), NVLink-C2C (nvlink_c2c.rs), NVSwitch/NVLS Multicast 0x00fd (nvls_multicast.rs) |
| Display, Media & Datacenter | nvidia_rs_drm.ko (GEM/PRIME/KMS /dev/dri/renderD*), nvidia_rs_modeset.ko (/dev/nvidia-rs-modeset), EDID/vblank (display_kms.rs), DP AUX/DPCD (dp_aux.rs), VRR/G-Sync (vrr_gsync.rs), HDCP 1.x/2.2 (hdcp.rs), ACPI NBCI mux (acpi_nbci.rs), Video Falcons NVDEC/NVENC/SEC2 (video_falcon.rs), OFA/NVJPG (ofa_nvjpg.rs), MIG 0xc637/0xc638 & IMEX (mig_fabric.rs), SR-IOV/vGPU 0xa080–0xa084 (sriov_vgpu.rs), Live GSP-RM queue/LIBOS/CC (gsp_live.rs) |
Field Reports
Independent installs on real hardware: environment, measurements, and the rough edges hit along the way. Host identifiers redacted.
V100-SXM2-32GB, Ubuntu 26.04, kernel 7.0.0-44 — full report
Single card, bare metal, a 251B-class MoE (IQ3_S, 84 GiB, ~45 GiB of experts streamed) at
256k context, --kv k8v4, 4k-token prompt, warm cache, two to three runs per arm:
| Arm | decode tok/s | prefill tok/s |
|---|---|---|
stock 580.178.04, experts resident |
44.42 | 798.5 |
nvidia_rs, resident, HBM 1107 |
43.72 / 41.98 | 815.3 / 818.4 |
| stock, paging | 23.74 / 22.68 | 133.3 / 264.7 |
nvidia_rs, paging |
21.93 / 22.67 / 22.50 | 266.6 / 274.0 / 275.2 |
The workload's memory strategy dominates the driver. Paging versus resident is worth ~1.9x decode and ~3x prefill; the driver stays inside the noise band in both strategies, and the only lever with a consistent sign is the HBM unlock (~5%, resident arm).
Clock behaviour. Under load stock holds 1530 MHz at 100% utilisation and nvidia_rs
holds 1290 MHz — the driver is 19% lower and still lands within noise, so SM clock is not
the binding constraint here. 1290 is a ceiling, not a choice: above v100_p0_gpc_ndiv=172 the
divider needs v100_p0_volt_uv, and every RM_PMU_UNIT_VOLT RPC answers
NV_ERR_NOT_SUPPORTED because the PMU task stack (VFE -> THERM -> VOLT -> ...) is never
executed. PMGR_LOAD on the same path returns 0x0, so the transport is fine and this is a
missing-prerequisite problem, not a payload one.
The report also covers the two installer gaps this install exposed (both since fixed upstream),
the flaky first start after boot, power.draw reading N/A, and the empty process table
(since wired for Pre-GSP in #354; utilization.gpu does work — it tracks load correctly;
an earlier note claiming otherwise was sampled during model load).
Documentation
- docs/INSTALL.md: Distro-by-distro install guide (Ubuntu/Debian, Arch/CachyOS, Fedora, NixOS), Secure Boot, troubleshooting, and rollback.
- docs/PARITY_AND_UNLOCKS.md: Full 43-chip architecture matrix, verified workload digests, and unlocked NVIDIA restrictions.
- docs/GPU_BRINGUP_GUIDE.md: Guide for safe GPU bring-up, disposable VFIO VM testing,
BRINGUP=0..9staging, anddmesgdiagnostics. - docs/KERNEL_COMPAT.md: Kernel-version compatibility guards across Linux 5.15–7.0+.
- docs/REPLAY_TESTING.md: Offline replay testing workflow.
- docs/blog-nvidia-artificial-restrictions.md: Write-up on the software locks found in NVIDIA's closed driver.
- reports/nvidia-580-artificial-restrictions-rea.md: Reverse-engineering notes, disassembly,
.rodatatables, and struct offsets. - CONTRIBUTING.md & SECURITY.md: Contribution workflow and private vulnerability reporting.
- HANDOFF.md: Engineering log and verified artifact digests.
Repository Layout
.
├── src/
│ ├── common/abi/ # Stable C/Rust ABI definitions (nv_rs_abi)
│ └── nvidia/
│ ├── src/ # Core #![no_std] Rust driver (nv_rs_core): gpu, mmu, fifo, rmapi, uvm
│ └── kernel/ # Linux kernel FFI & live GV100/GSP bring-up (nv_rs_kernel)
├── kernel-open/
│ ├── nvidia/ # Minimal Linux PCI/chardev/DMA/hwmon/dmabuf C shim -> nvidia_rs.ko
│ ├── nvidia-modeset/ # Standalone /dev/nvidia-rs-modeset module -> nvidia_rs_modeset.ko
│ ├── nvidia-drm/ # Standalone Linux DRM GEM/PRIME/KMS module -> nvidia_rs_drm.ko
│ ├── nvidia-peermem/ # Standalone GPUDirect RDMA peermem bridge -> nvidia_rs_peermem.ko
│ ├── uvm_bridge/ # 82-symbol version-aware UVM bridge -> nvidia_rs_uvm_bridge.ko
│ └── modeset_bridge/ # nvidia_get_rm_ops bridge -> nvidia_rs_modeset_bridge.ko
├── docs/ # Install/bring-up guides, parity tables, assets & write-ups
├── tools/ # Validation gate, Unicorn binary oracles, VFIO VM harness & parity suites
├── dkms.conf # DKMS packaging for automatic rebuilds across kernel upgrades
├── install.sh # Installer with Secure Boot MOK signing support
└── uninstall.sh # Reverses install.sh
Known Limitations & Roadmap
- Linux desktop video output: Native display output (
nvidia_rs_modeset.ko+nvidia_rs_drm.ko) is in progress. VBIOS DCB connector enumeration (#189) and Vulkan 1.4 compute/transfer + DRM/NVKMS UAPI parity (#266) are underway; next up are KMS CRTC/plane/connector wiring, DP/HDMI/eDP link training, EDID/HPD, and live monitor scanout. - Multi-arch silicon validation: Physical silicon parity is verified on Tesla V100 (
GV100), and live bring-up/CUDA is verified on RTX 4090 (AD102), RTX 4060 (AD107), RTX 3090 (GA102), and RTX 3050 / 3050 Ti Laptop (GA107M). Other Maxwell through Rubin dies have HALs and GSP-RM paths verified offline (119/119mock_gv100_diff.py+19/19oracle_gsp_620.py) and are going through community hardware bring-up. - GV100 dynamic V/F above 1290 MHz: Raising
NV_THERM_VID0_PWM_1(0x20344, Priv Level 3) above VBIOS boot voltage (~0.72 V) for1425–1530 MHzacross all bins needs the full PMUVFE+THERM+CLK+VOLTbring-up. Until then,nvidia_rs.kocaps GPC to1290 MHzwhenever voltage scaling is inactive. - Discrete PCIe GPUs first (
x86_64andarm64): EarlyJetson Xavier (T194 / GV11B)SoC scaffolding has started (#355,#356);Jetson OrinandThorare not supported yet.
Credits & Acknowledgments
- arikamidotnet & FBR-ROM/FBR-RAM-Downloader (MIT): Live GV100 / Tesla V100 HBM2 memory-clock unlock (
0x98BC98multicast HBMPLL coefficient programming,PMC_BOOT_0canary, PRI-ring write-only safety window, 16-partition lock + readback verification, and 36-bit hardware DRAM cycle-counter metering), along with the upstream research it credits (cmpunlocker,170tune,CMP100-210). - Zagitta/gpu-unlock & JustAResearcher/gpu-unlock-ada: Ada Lovelace (
AD10x) pre-GSP SM Speed-Select (SS0/SS1) FP32-accumulate Tensor Core unlock research. - Cinderella-Man/geforce-dynbar1-p2p & tinygrad/open-gpu-kernel-modules: Consumer GeForce Dynamic BAR1 P2P (
RMDynBar1P2PEnable) & P2P unlock research. - us4us/nvidia-open-gpu-kernel-modules & scottjg/nvidia-armsbc: Mainline Linux
dma-buf/ P2PDMA export and non-coherent ARM64 SBC PCIe support inspiration.