Eric Hartford 40b15f121a rmapi/vm: fix master gate clippy and EDU guest FB geometry fixture (#631) (#646)
* rmapi/vm: fix clippy int_plus_one and EDU guest FB geometry register fixture

* tests/vm: use exact V100-SXM2-32GB FbGeometry register values in EDU fixture

---------

Co-authored-by: Eric Hartford <eric@quixi.ai>
2026-12-05 16:52:34 -08:00

nvdriver

image

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/hwmon sensors, clocks/power/thermals, NVENC/NVDEC, multi-GPU P2P/NVLink/RDMA, S3/RTD3 suspend, and both x86_64 and arm64.
  • CUDA and compute: Drop-in support for unmodified libcuda.so, UVM, PyTorch, cuDNN, NCCL, and llama.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.ko and nvidia_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, and llama.cpp, plus stock nvidia-uvm.ko and nvidia-modeset.ko/nvidia-drm.ko via 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 Linux dma-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=1 by default for non-root ncu/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=82 for 1107 MHz / +26.2% bandwidth, stock 877.5 MHz by default for safety across all cards), multi-gen HBM2/HBM2e profiles for P100 and A100 (p100_hbm_ndiv, ga100_hbm_ndiv, verified with tools/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 Linux hwmon sensors (temp1_input, power1_average, in0_input, gpc_clock_mhz, mem_clock_mhz, gpu_util_pct, mem_util_pct for lm-sensors, btop, nvtop, Prometheus node_exporter) alongside NVML/RMAPI telemetry (PROM BIT VBIOS version, NV_PPWR_PMU_IDLE_COUNT GPU/memory utilization, and PMGR I2C INA3221 power readings).
  • x86_64 and ARM64 PCIe (ARCH=arm64): Builds for x86_64-unknown-none and aarch64-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.06 GSP-RM default, 580 compat), 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, zero memcpy/memset/memmove/strlen leaks, zero unwind sections, stack frames <= 1,024 bytes, and CONFIG_MITIGATION_RETHUNK, CONFIG_MITIGATION_SLS, CONFIG_X86_KERNEL_IBT, and CONFIG_CALL_PADDING compatibility across Linux 5.15–7.3+.
  • Live Linux desktop video output & 3D gaming (GA102): Verified Dual-4K@60Hz GNOME Wayland desktop (DP-2 + HDMI-1), smooth OpenGL (Xonotic at 250 fps), and Vulkan + sparse resources (Counter-Strike 2) on physical RTX 3080 Ti via nvidia_rs.ko + nvidia_rs_modeset_bridge.ko backing stock nvidia-modeset.ko/nvidia-drm.ko modeset=1, alongside standalone nvidia_rs_modeset.ko / nvidia_rs_drm.ko KMS/DRM modules.
  • Tested on 8x physical V100s: Verified side-by-side against stock NVIDIA 580.178.04 on 8x physical Tesla V100-SXM2-32GB (256 GiB VRAM): 77/77 CUDA Parity Suite checks, 8-GPU PyTorch/NCCL AllReduce (59.71 GB/s BusBW, max_err = 0.0), 8.33 TB/s aggregate HBM2 STREAM Triad (at 1107 MHz), multi-GPU FP16/FP32 GEMM and llama.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)

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% 25% = offline HAL/firmware wired · 50% 50% = active silicon bring-up · 75% 75% = working on silicon (some dies or partial features) · 100% 100% = verified on silicon · n/a = no GPU-owned video outputs (headless or separate SoC display engine).

GPU Series Arch / Silicon Core CUDA Graphics Display vs. Proprietary
Rubin Datacenter (GR100) Rubin (GR100) 25% offline n/a
Blackwell Datacenter (GB300, GB200, B300, B200, B100) Blackwell 1 (GB100/GB102) 25% offline 25% offline n/a
RTX PRO Blackwell Server (RTX PRO 6000 Blackwell Server) Blackwell 2 (GB202) 25% offline 25% offline 25% offline n/a
RTX PRO Blackwell Workstation (6000–500, Desktop & Laptop) Blackwell 2 (GB202–GB207) 25% offline 25% offline 25% offline 25% offline
GeForce RTX 50 Series (5090–5050, Desktop & Laptop; 5070, 5060 Ti verified; GB10) Blackwell 2 (GB202–GB207/GB10B) 75% partial silicon 75% partial silicon 75% partial silicon 50% bring-up +11–12% prefill (2× 5060 Ti P2P)
Hopper Datacenter (GH200, H200, H100, H800, H20) Hopper (GH100) 25% offline 25% offline n/a
Ada Datacenter Headless (L20, L4, L2) Ada (AD104/AD107) 25% offline 25% offline 25% offline n/a
Ada Workstation & Display Datacenter (L40S, L40, RTX 6000–500 Ada) Ada (AD102–AD107) 25% offline 25% offline 25% offline 25% offline
GeForce RTX 40 Series (4090–4050, Desktop & Laptop; 4090, 4060, 4060 Laptop verified) Ada (AD102–AD107) 75% partial silicon 75% partial silicon 25% offline 25% offline
Ampere Datacenter HBM (A100, A800, A30; A100 verified) Ampere (GA100) 75% partial silicon 75% partial silicon n/a
Ampere Datacenter PCIe Headless (A16, A10, A10G, A2) Ampere (GA102/GA107) 25% offline 25% offline 25% offline n/a
Ampere Workstation & Display Datacenter (A40, RTX A6000–A400; RTX A4500, A400 verified) Ampere (GA102–GA107) 75% partial silicon 75% partial silicon 25% offline 25% offline
GeForce RTX 30 Series (3090 Ti–3050, RTX 2050/MX570; 3090, 3080 Ti, 3060, 3080 Ti/3050/3050 Ti Laptop verified) Ampere (GA102–GA107) 75% partial silicon 75% partial silicon 75% partial silicon 75% partial silicon
Ampere Mining (CMP 170HX, 90HX, 70HX; CMP 170HX verified) Ampere (GA100/GA102/GA104) 75% partial silicon 75% partial silicon 25% offline n/a
Tesla T4 Turing (TU104) 50% bring-up 25% offline 25% offline n/a
Quadro RTX / TITAN RTX / T-Series (RTX 8000–3000, T1200–T400) Turing (TU102–TU117) 50% bring-up 25% offline 25% offline 25% offline
GeForce RTX 20 Series (2080 Ti–2060, Desktop & Laptop; 2060 verified) Turing (TU102–TU106) 75% partial silicon 75% partial silicon 25% offline 25% offline
GeForce GTX 16 Series (1660 Ti–1630, Desktop & Laptop; MX550/MX450) Turing (TU116–TU117) 50% bring-up 25% offline 25% offline 25% offline
Turing Mining (CMP 50HX, 40HX, 30HX) Turing (TU102/TU106/TU116) 25% offline 25% offline 25% offline n/a
Tesla V100 (SXM2, SXM3, PCIe 16GB/32GB, V100S) Volta (GV100) 100% verified 100% verified 25% offline n/a +26.8% BW / +9.7% FP16
Quadro GV100 / TITAN V Volta (GV100) 75% partial silicon 75% partial silicon 25% offline 25% offline
CMP 100-210 Volta (GV100) 75% partial silicon 75% partial silicon 25% offline n/a
Jetson AGX Xavier (Tegra194, integrated) Volta Integrated (GV11B, sm_72) 25% offline 25% offline 25% offline n/a
Tesla P100 (SXM2, PCIe 12GB/16GB) Pascal (GP100) 75% partial silicon 75% partial silicon n/a +22% BW / +7% tok/s (837 MHz HBM2)
Tesla P40 / P6 / P4 Pascal (GP102/GP104) 50% bring-up 50% bring-up n/a
Quadro Pascal & TITAN (Quadro GP100, P6000–P400, TITAN Xp, TITAN X; P2000 Mobile verified) Pascal (GP100–GP107) 75% partial silicon 75% partial silicon
GeForce GTX 10 / GT 10 Series (1080 Ti–1010, Desktop & Laptop; MX350–MX150; 1080 Ti, 1070 Ti, 1070 verified) Pascal (GP102–GP108) 75% partial silicon 75% partial silicon
Pascal Mining (P102-100, P104-100, P106-100, P106-090; P106-100 verified) Pascal (GP102–GP106) 75% partial silicon 75% partial silicon 25% offline n/a
Tesla Maxwell (M60, M40, M10, M6, M4) Maxwell 2/1 (GM20x/GM107) 50% bring-up 25% offline n/a
Quadro Maxwell & TITAN (M6000–M520, K2200–K620, NVS 810, GTX TITAN X) Maxwell 2/1 (GM20x/GM107) 50% bring-up 25% offline
GeForce GTX 900 Series (980 Ti–950, Desktop & Laptop) Maxwell 2 (GM200–GM206) 50% bring-up 25% offline
GeForce GTX 750 Ti / 750 / 745 & 800M/900M (MX130/MX110) Maxwell 1 (GM107–GM108) 25% offline

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.cpp prompt eval; on 2× Tesla P100 (p100_hbm_ndiv=62, #1), 837 MHz HBM2 adds +22% copy bandwidth and +7% 27B LLM generation speed with 0/130 token diffs; on 2× RTX 5060 Ti (GB206, #499), direct PCIe P2P adds +11–12% prefill throughput. Other GPUs will fill in as head-to-head benchmarks are run.
  • Tegra / Jetson and older GPUs: Jetson AGX Xavier (T194 / GV11B) offline core, UVM, and render-only DRM bring-up is wired (platform_driver/firmware loader/sysmem BAR2/IRQs #385/#435, render-only DRM #441, privring/sysmem FB/PDB TLB #468, sysmem GR/FECS/GPCCS #469, PMU HS ACR #470, Volta UVM 0x150 #593, runtime PM/fault recovery #594); Jetson Orin (T234) and Thor (T264) are not supported yet. Pre-Maxwell GPUs (Kepler, Fermi, Tesla) are outside the 580.x driver 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_64 or arm64 (aarch64) with kernel headers (/lib/modules/$(uname -r)/build)
  • Rust toolchain with the x86_64-unknown-none (or aarch64-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 = stock 877.5 MHz, runtime-writable 0644): GV100 / CMP 100-210 HBM2 clock divider. Opt in to 82 (1107 MHz V100S spec / +26.2%), 80 (1080 MHz / +23%), or 78 (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-writable 0644): Per-BDF GV100 HBM2 NDIV overrides (e.g. v100_hbm_ndiv_map="0000:81:00.0=67,82:00.0=82"), falling back to v100_hbm_ndiv.
  • p100_hbm_ndiv=0 / ga100_hbm_ndiv=0 (opt-in, runtime-writable 0644; plus p100_hbm_ndiv_map / ga100_hbm_ndiv_map): Multi-gen HBM2/HBM2e clock dividers for GP100 and GA100 (see tools/hbm_gate.py).
  • gddr5x_timing_profile=0 (opt-in, runtime-writable 0644; plus gddr5x_timing_map): Runtime GDDR5X memory timing controller for Pascal GP102/GP104.
  • v100_p0_gpc_ndiv=190 (default, runtime-writable 0644, auto-capped to 172 / 1290 MHz unless Level-3 HS voltage scaling succeeds): GV100 dynamic P0 GPC NAFLL divider; writable live via /sys/module/nvidia_rs/parameters/v100_p0_gpc_ndiv (plus v100_p0_gpc_ndiv_map for per-BDF overrides). The parameter always reads back the requested value; when the cap lowers a request, dmesg shows a GV100 P0 GPC NDIV request capped line 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] µV in <= 25 mV steps; 0 keeps VBIOS boot voltage and caps GPC at 1290 MHz).
  • unlock_ada_tensor=0 (alias unlock_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 alongside EnableResizableBar=1.
  • unpriv_profiling=1 (default): Allows non-root CUPTI / ncu / nsys hardware 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 (0 to disable).
  • enable_resizable_bar=1 (default): Expands BAR1 to the largest supported ReBAR aperture automatically.
  • force_p2p=0x11 (default): Enables PCIe P2P Read+Write (0x211 adds PCIe P2P Atomics).
  • force_pcie_gen=0 (opt-in, runtime-writable 0644; plus force_pcie_gen_map): Overrides target PCIe link generation, clamped to upstream bridge LNKCAP.
  • 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-writable 0644; plus idle_pstate_delay_s=5, idle_pstate_gpc_khz=0): Activity-wake idle clock governor.
  • hwmon_poll_ms (runtime-writable 0644): Cache TTL in ms for on-demand GSP-RM hwmon telemetry polling.
  • gsp_abi=620 (default): Selects GSP-RM 620.70.06 / 620.73.04 MCTP+NVDM framing for Turing–Blackwell–Rubin (580 for 580.178.04 compat).
  • driver_version=auto (default) & strict_version_check=0 (default): Automatically negotiates userspace NVML/libcuda version strings per open file (driver_version=<ver> pins a specific string; strict_version_check=1 restores strict stock version matching).
  • ga10x_gsp=1 (default): Boots Turing through Blackwell (TU10x/TU11x, GA100/GA10x, AD10x, GH100, GB10x/GB20x) on GSP-RM 580.178.04 through ga10x_gsp.rs regardless of gsp_abi; with driver_version=580.196.07, TU102/TU116 and GA102-class GPUs boot GSP-RM 580.196.07 instead. Set 0 to use gsp_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 hitting libcuda's 100 ms fallback timer.
  • system_memory_pool_retain_mb=0 (default): Trims cached system-memory pages on client close so MemAvailable stays accurate.

Bare-Metal Setup (GV100 / Pre-GSP)

  1. Extract signed GV100 firmware from your installed stock 580.178.04 package (auto-detects /usr/src/nvidia-srv-580.178.04/ and /usr/src/nvidia-580.178.04/):
    sudo python3 tools/extract_gv100_firmware.py --out /lib/firmware/nvidia-rs/580.178.04/gv100.fw
    
    If the host has a different stock version installed (for example 580.196.07), fetch the 580.178.04 object 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
    
  2. Keep nvidia-modprobe from loading stock nvidia.ko over nvidia_rs (plain blacklist is bypassed by explicit modprobe nvidia; boot clean so stock nvidia.ko does not touch the GPU first):
    # /etc/modprobe.d/nvidia-blacklist.conf
    install nvidia /bin/false
    install nvidia_uvm /bin/false
    
  3. Load nvidia_rs with live runtime engines (for example via ./install.sh with MODPROBE_ARGS="pci_target=* runtime_engines=1"), and run unmodified nvidia-smi / CUDA workloads through tools/rmapi_namespace_launcher.py (which bind-mounts /sys/module/nvidia_rs -> /sys/module/nvidia so 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,107/2,107 RM controls dispatched (plus R620 userspace RM/channel translation #514/#519), native VRAM dma-buf export by RM handle and CUDA address (#148), and 1,717+ 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).

RTX A4500 (GA102GL, 20 GB), NixOS 27.05, kernel 7.3.6 — full report

Single card, bare metal (#504), tested on default ga10x_gsp=1 with 580.178.04 GSP firmware and 580.178.04 userspace (runtime_engines=1), against stock 620.73.04 with the same llama.cpp binary (ee4671584) and GGUF weights (-ngl 99 -r 3 -fa on -b 4096 -ub 2048):

Model KV Test Stock 620.73.04 nvidia_rs (580.178.04)
Qwen3.8-27B UD-Q3_K_XL (12.23 GiB) q4_0 pp512 / tg128 1038.42 / 32.31 t/s 1064.87 / 32.73 t/s
Qwen3.8-27B UD-Q3_K_XL (12.23 GiB) q4_0 pp4096 / tg128 1033.17 / 31.54 t/s 1061.39 / 32.24 t/s
gemma-4-26B-A4B IQ4_NL (12.66 GiB) q8_0 pp512 / tg128 3454.47 / 104.28 t/s 3497.15 / 105.09 t/s

GSP-RM booted in 1.75 s (20470 MiB FB, nvidia-smi, hwmon, and CUDA Driver API all passed) and unloaded cleanly (fwsec-sb + booter-unload, WPR2 hi=0). The report also documents two edge cases: R620 userspace controls returning 0x1f against 580.178.04 GSP-RM (cuInit=100), and ga10x_gsp=0 + gsp_abi=620 timing out on 620.73.04/gsp_ga10x.bin.


Documentation


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 2× RTX 5060 Ti (GB206), RTX 4090 (AD102), RTX 4060 (AD107), RTX 3090 / RTX 3080 Ti / RTX A4500 (GA102/GA102GL), RTX 3080 Ti Laptop (GA103), RTX 3050 / 3050 Ti Laptop (GA107M), RTX 2060 (TU106), and CMP 100-210 (GV100 0x1df4). Other Maxwell through Rubin dies have HALs and GSP-RM paths verified offline (119/119 mock_gv100_diff.py + 19/19 oracle_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) for 1425–1530 MHz across all bins needs the full PMU VFE + THERM + CLK + VOLT bring-up. Until then, nvidia_rs.ko caps GPC to 1290 MHz whenever voltage scaling is inactive.
  • Discrete PCIe GPUs first (x86_64 and arm64): Jetson AGX Xavier (T194 / GV11B) offline SoC bring-up is wired (#385, #468, #469, #470); Jetson Orin and Thor are not supported yet.

Credits & Acknowledgments


Star History

Star History Chart
Description
No description provided
Readme MIT 157 MiB
Languages
Rust 65.3%
Python 17.9%
C 15%
Shell 0.7%
Makefile 0.5%
Other 0.4%