* gv100/hbm: log every HBM2 session outcome, not only a verified unlock
On a CMP 100-210 (10de:1df4, 12 GB) FBPA 0..=3 answer with a PRI bus
error, so survey_gv100_hbm() refuses the card. HbmSession::begin() then
returns FailedRolledBack in state SurveyFailed, and pmu_bringup only
logged the Unlocked case: v100_hbm_ndiv=82 did nothing and dmesg said
nothing. The session is write-inhibited from then on, so a later sysfs
write to v100_hbm_ndiv was dropped without a line as well. A PLL that
would not take the new NDIV and was rolled back was equally silent, and
indistinguishable from the survey failure in HbmUnlockStatus.
Core (hbm_clock.rs):
- survey_gv100_hbm_checked() does the same reads in the same order as
survey_gv100_hbm() and returns the first failed check as an
HbmSurveyFault { kind, fbpa, value }: canary mismatch, cfg or coeff
unreadable, PLL not locked, coeff mismatch. survey_gv100_hbm() is now
its .ok(); HbmSession keeps the fault of the start survey.
- HbmSession::outcome() names what a start or live step did: Disabled,
NonStockPll, AlreadyAtTarget, Unlocked, SurveyFailed, RolledBack,
ClockUnknown, WriteInhibited.
Kernel glue (pmu_bringup.rs, gpu_owner.c): every start outcome other
than Unlocked, every live step that does not end in a verified new
clock, and a sysfs write dropped by a write-inhibited session now go to
nv_rs_hbm_clock_outcome_log(). The survey line carries the partition
and raw word, e.g. "survey failed (FBPA 0 PLL config unreadable
(0xbadf2010))". Requested-but-failed outcomes are pr_warn, an
unverified rollback is pr_err, the rest pr_info. The existing unlock
and backoff lines are unchanged. No register is read or written that
was not read or written before.
This reports the failure; it does not make the survey accept a card
with fused-off FBPAs. The GP100/GA100 MultiGenHbmSession path is not
touched.
Tests (host): hbm_survey_reports_the_first_failed_check and
hbm_session_outcome_names_every_start_and_step_result, the latter with
the #399 register values (FBPA 0..=3 = 0xbadf2010, 4..=15 cfg 0x29,
coeff 0x14102) and a PLL mock that drops or loses lock on a write. On
master they do not compile: HbmOutcome, HbmSurveyFault and
HbmSession::outcome do not exist.
Not run: QEMU EDU guest tests (need sudo here), any GPU.
Refs #399
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* gv100/hbm: keep the failed phase in the logged HBM2 outcome
Review of #451 found three session results that were logged as something
else. A start or step whose target did not lock, whose rollback was
verified, and whose survey after the rollback then failed was reported as
"the rollback could not be verified". A survey that refused the card
before any PLL write was reported as "did not lock or read back; rolled
back" when the survey after it passed. And a start whose PMC_BOOT_0
canary read failed right after a good baseline survey was reported as
"PLL is not at a stock coefficient".
The unlock and step helpers now hand the session the read that stopped
them before a write, taken from the reads they already do, so the
register access order is unchanged. A refusal before any write puts the
session in SurveyFailed with that fault. A verified rollback followed by
a failed survey is the new outcome RolledBackSurveyLost (8): the clock
stays unknown and writes stay inhibited, and the log names the survey
fault. A failed canary is the new outcome CanaryFailed (9); NonStockPll
is left for a coefficient the unlock really rejected. The public
unlock_gv100_hbm and set_gv100_hbm_ndiv signatures and results are the
same as before.
Three host tests script the failing read with a mock and fail on the
previous commit.
Refs #399
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* gv100/hbm: keep a canary refusal before the target write out of RolledBack
program_coeff checks the PMC_BOOT_0 canary before it writes the target
coefficient. When that check failed, the caller still ran the rollback
(which rewrites the unchanged baseline), and a verified rollback was then
logged as "did not lock or read back; rolled back", although the target
was never written.
program_coeff now returns the canary fault when it refuses before the
write. unlock_gv100_hbm_noted and set_gv100_hbm_ndiv_noted run the same
rollback as before and pass that fault on, so HbmSession reports the step
as SurveyFailed with the CanaryMismatch fault (the existing "refused
before the target write" path) instead of RolledBack. Register accesses
and their order are unchanged; the public functions keep their
signatures. A host test fails the canary once, just before the target
write, for both the initial unlock and a live step, and checks that the
rollback succeeds and the outcome is SurveyFailed, not RolledBack.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* gv100/hbm: say "target coefficient not written" for a survey refusal
The SurveyFailed log line said "clock not touched". Since a canary
refusal just before the target write is reported as SurveyFailed, and
the rollback in that path still rewrites the unchanged baseline
coefficient, that was true of the clock value but not of every PLL
register write. The line now says "target coefficient not written",
which holds in every SurveyFailed case, and the HbmOutcome::SurveyFailed
doc comment says the same.
Log text and a doc comment only; no change to register access, session
state or outcome mapping.
Refs #399
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* gv100/hbm: classify a refused baseline restoration by its skip reason
outcome() reported Disabled whenever the v100_hbm_ndiv value was 0, but
on_user_write(0) with a surveyed baseline steps to the baseline NDIV; a
non-stock coefficient refuses that with Skipped and no fault, and the log
then said "disabled" instead of the refusal. The session now records the
NDIV each start or step acted on (target_ndiv), and outcome() reserves
Disabled for a zero effective target; its requested_ndiv argument, which
only approximated that, is gone.
Test: start at MDIV 3 / NDIV 65, request 80 (rejected), then 0 (baseline
restore, rejected) -> NonStockPll. It fails if step_to stops recording
the target.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
Co-authored-by: Scott <scottbphone12@gmail.com>
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).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.