open-gpu-kernel-modules
NVIDIA Linux open GPU kernel module source
NVIDIA's open-source Linux kernel driver modules for their GPUs, letting advanced users, distribution packagers, and system integrators build the low-level GPU driver from source and inspect how it works.
This repository holds NVIDIA's open-source code for the Linux kernel modules that let an NVIDIA graphics card work on a Linux computer. The kernel module is the low-level piece living inside the operating system kernel that talks to the GPU hardware — what every program ultimately depends on to reach the card. Until this project, that piece of NVIDIA's driver was closed source.
The README is mostly build and packaging instructions. You compile the modules with a single make modules command and install them with make modules_install as root. The modules built here must be paired with matching GSP firmware and user-space driver components from the same NVIDIA driver release (the README pins version 595.71.05); the rest of the driver can be installed from NVIDIA's .run file with a flag that skips its built-in kernel modules. Both x86_64 and aarch64 CPU architectures are supported. Any reasonably modern GCC or Clang works, and Linux kernel 4.15 or newer is supported.
Each NVIDIA kernel module is split into an OS-agnostic component, shipped as a pre-built binary because it is large and slow to compile, and a kernel interface layer that has to be rebuilt for the specific kernel you are running. The repo also includes scripts for extracting firmware so the community Nouveau driver can use it. Compatible hardware is anything from the Turing generation of GPUs onward.
Use this code if you are a Linux distribution packager, system integrator, or advanced user who wants to build NVIDIA's modules from source rather than using the prebuilt installer, or if you want to inspect or contribute to how the driver speaks to the kernel. The full README is longer than what was provided.
Where it fits
- Build NVIDIA kernel modules from source to package them for a custom or hardened Linux distribution.
- Inspect how the NVIDIA driver communicates with the Linux kernel for security auditing or research.
- Extract firmware blobs from the NVIDIA driver release so the open-source Nouveau driver can use them on Turing-class hardware.
- Compile and install open-source kernel modules on an aarch64 server with an NVIDIA Ampere GPU.