NVIDIA-575.57.08

Introduction to NVIDIA

The NVIDIA proprietary driver contains firmware, kernel drivers, userland drivers pertaining to OpenGL, Vulkan, and hardware acceleration, and provides useful utilites for NVIDIA cards. If you don't have a NVIDIA GPU, skip to the next package.

Additional Downloads

NVIDIA Dependencies

Required

GBM (GBM from Mesa-25.1.2 or Mesa-25.1.2), libglvnd-1.7.0, and Xorg Libraries

Recommended

Preparing for the NVIDIA Installation

First enable XFree86 DRI and Nouveau [7] support in the kernel and recompile if necessary.

Device Drivers --->
  Graphics support --->
    <*/M> Direct Rendering Manager (XFree86 4.1.0 and higher DRI support) --->
                                                                      ...  [DRM]
      <M> Nouveau (NVIDIA) cards                                   [DRM_NOUVEAU]
    Frame buffer Devices --->
      <M>   nVidia Framebuffer Support                               [FB_NVIDIA]
      < /M> Simple framebuffer support                               [FB_SIMPLE]
[Important]

Important

Build these drivers as kernel modules so that they can properly be blacklisted.

Extract the NVIDIA driver runfile and navigate to the extracted directory:

sh NVIDIA-Linux-x86_64-575.57.08.run -x &&
cd NVIDIA-Linux-x86_64-575.57.08

Installation of the NVIDIA Kernel Modules

[Note]

Note

Building the kernel modules in a chroot will likely cause a build failure. It is heavily recommended to build them when booted in the LFS target to avoid uname -r reporting the kernel version of the host rather than the target leading to build files being unable to be found.

Now you will need to build the kernel modules for the driver. There are two types: open and proprietary. If you have the NVIDIA Grace Hopper or NVIDIA Blackwell cards, you must compile the open kernel modules. If you have a Turing, Ampere, Ada Lovelace, or Hopper card, it is recommended to now build the open kernel modules. If you have a Maxwell, Pascal, or Volta card, build the proprietary kernel modules. If you are using both an older and newer card, but not the newest cards, build the proprietary kernel modules.

If you are going to build the open kernel modules, set the NVIDIA_KERNEL_TYPE variable:

export NVIDIA_KERNEL_TYPE="kernel-open"

If you are going to instead build the proprietary kernel modules, set the NVIDIA_KERNEL_TYPE variable:

export NVIDIA_KERNEL_TYPE="kernel"

There will be 5 or 6 kernel modules that will be built. Depending on your use case, you can skip building a module or two. The UVM (Unified Virtual Memory) module is for use with CUDA. If you won't use it, nor wish to use its capabilities, you can skip building the UVM kernel module. There is also the PeerMem module which is for datacenters. For gaming, it can safely be disabled.

For UVM, the module is named nvidia-uvm. For PeerMem, it will be named nvidia-peermem. To skip these, add the module names to the NV_EXCLUDE_KERNEL_MODULES for the make command. The variable should be seperated, as such: NV_EXCLUDE_KERNEL_MODULES="nvidia-uvm nvidia-peermem". The make command will have the variable set to nothing. Add to it as you see fit.

Now build the kernel modules by running the following commands below (the commands below will navigate to the right directory based on what NVIDIA_KERNEL_TYPE is set to):

pushd $NVIDIA_KERNEL_TYPE &&
make NV_EXCLUDE_KERNEL_MODULES=
[Note]

Note

You may encounter various build failures. This usually happens because the kernel version you're using is too high. If this happens, it may be necessary to downgrade the kernel to a lower version. When a new driver release happens, the driver will then most likely support the kernel version at the time. At the top of this section, the recommended kernel version to use with this driver is mentioned to ensure that a build failure does not occur. The current kernel version used for kernel parameters and such in this book is linux-6.15.

[Important]

Important

When you update the kernel, you will also need to reinstall the NVIDIA kernel modules.

This is because there is glue when kernel modules are built. This glue doesn't matter too much with first party modules (modules in the kernel source tree) as the modules are updated at the same time the kernel is. At that point, there is new glue holding them together. However, when it comes to third party modules, they aren't updated when the kernel updates, so this glue the third party modules had on the kernel breaks. This leads to broken kernel modules. This also applies if you stay on the same kernel version but change some options, this can also break the glue.

Be sure that when you reinstall the kernel modules, make sure you are using the new kernel and have the kernel source you built from. Otherwise the modules will fail to build.

When you upgrade the kernel, you will not have to reinstall the driver software, just the kernel modules.

Now as the root user:

for mod in nvidia{,-drm,-modeset,-peermem,-uvm}; do
  rm -vf /usr/lib/modules/$(uname -r)/kernel/drivers/video/$mod.ko
done
make modules_install &&
popd

Install the firmware as the root user:

rm -rvf /usr/lib/firmware/nvidia/[0-9]* &&
mkdir -pv /usr/lib/firmware/nvidia/575.57.08 &&
cp -v firmware/*.bin /usr/lib/firmware/nvidia/575.57.08

Finally, unset the NVIDIA_KERNEL_TYPE variable:

unset NVIDIA_KERNEL_TYPE

Installing the NVIDIA Driver Software

Install the install script and manifest file for the script as the root user:

mkdir -pv /usr/share/nvidia              &&
install -vm755 ../install-NVIDIA-1        \
               /usr/sbin/nvidia-install  &&
install -vm644 ../manifest-NVIDIA-1       \
               /usr/share/nvidia/manifest

Now see what options there are and what you want to install by running /sbin/nvidia-install --help.

If you want to do the default installation, you can just run the following command as the root user:

/sbin/nvidia-install
[Important]

Important

If you are booted into the system you are running the commands for, doing so for the above command in a graphical environment may crash that environment and drop you back to a TTY. Don't do that, just run it from a TTY or in a chroot where the display doesn't rely on the libraries provided from this driver. As for the TTY, it is actually driven by the kernel or its modules, not the libraries. That is why running the above command in a TTY is safe—it doesn't overwrite the kernel modules.

Configuring NVIDIA

Config Files

/usr/lib/modprobe.d/nouveau.conf

/usr/lib/modprobe.d/nvidia_drm.conf

/usr/lib/modprobe.d/nvidia.conf

List of Packages With Issues

Using this driver can come with compromises. So far, these issues seem limited to Wayland, desktop environments, and display managers. The list below documents the known packages that have issues with this driver.

  • GDM: Using this package on SysVinit systems will result in failure as GDM does not want to use Wayland for NVIDIA GPUs, but a permission issue with SysV prevents X11 from being used. You must launch Mutter or gnome-session through the terminal instead. Read the Mutter entry.

  • gnome-session: This must be launched via a TTY or a display manager other than GDM for now on SysVinit systems.

  • Mutter: Compile this package with -D wayland_eglstream=true and -D egl_device=true to enable launching with Wayland. Ensure the NVIDIA EGL Libraries are installed.

    On SysVinit systems, Mutter can only be launched via a TTY or a display manager other than GDM as of now.

Configuration Information

Nouveau and NVIDIAFB support was compiled into the kernel to make the NVIDIA kernel modules build successfully. However, Nouveau and NVIDIAFB conflict with the NVIDIA kernel modules, so they should be blacklisted.

As the root user, create the file /usr/lib/modprobe.d/nouveau.conf to blacklist Nouveau and NVIDIAFB:

mkdir -pv /usr/lib/modprobe.d &&
cat > /usr/lib/modprobe.d/nouveau.conf << "EOF"
# Begin /usr/lib/modprobe.d/nouveau.conf

blacklist nouveau
blacklist nvidiafb

# End /usr/lib/modprobe.d/nouveau.conf
EOF

The DRM kernel module does not use modesetting by default which is needed by Wayland compositors. Make it use modesetting as the root user:

cat > /usr/lib/modprobe.d/nvidia_drm.conf << "EOF"
# Begin /usr/lib/modprobe.d/nvidia_drm.conf

options nvidia_drm modeset=1

# End /usr/lib/modprobe.d/nvidia_drm.conf
EOF

When the GPU sleeps/hibernates, it will lose all memory allocations by default. You can prevent this by setting two options for the NVIDIA module as the root user:

cat > /usr/lib/modprobe.d/nvidia.conf << "EOF"
# Begin /usr/lib/modprobe.d/nvidia.conf

options nvidia NVreg_PreserveVideoMemoryAllocations=1
options nvidia NVreg_TemporaryFilePath=/var/tmp

# End /usr/lib/modprobe.d/nvidia.conf
EOF

Furthermore, this driver does not install DRI [8] drivers or driver stubs. Likewise, it does not install a pkg-config file saying where to find the associated files. The files aren't needed with this driver. However, some applications expect the pkg-config file to exist, namely Xorg-Server-21.1.17. Create one now as the root user:

cat > /usr/lib/pkgconfig/dri.pc << "EOF"
prefix=/usr
includedir=${prefix}/include

dridriverdir=/usr/lib/dri

Name: dri
Description: Direct Rendering Infrastructure
Version: 575.57.08
Requires.private: libdrm >=  2.4.109
Cflags: -I${includedir}
EOF

Applications that do require this file typically will not link against any library in /usr/lib/dri. If you are worried that an application will try to link against non-existent libraries, you can compile Mesa-25.1.2 to get these libraries and a real pkg-config file. Note that those libraries will not be used when this driver is in use.

[Note]

Note

You should skip to XCB Utils after you are done with this page unless you wish to install extra software.

Contents

Installed Programs: nvidia-install, nvidia-modprobe, nvidia-settings, nvidia-smi, nvidia-uninstall, and nvidia-xconfig
Installed Firmware: gsp_ga10x.bin and gsp_tu10x.bin
Installed Libraries: libcudadebugger, libcuda, libEGL_nvidia, libGLESv2_nvidia, libGLX_nvidia, libglxserver_nvidia, libnvcuvid, libnvoptix, libnvidia-allocator, libnvidia-api, libnvidia-cfg, libnvidia-eglcore, libnvidia-encode, libnvidia-fbc, libnvidia-glcore, libnvidia-glsi, libnvidia-glvkspirv, libnvidia-gpucomp, libnvidia-gtk3, libnvidia-ml, libnvidia-ngx, libnvidia-nvvm{70,}, libnvidia-opencl, libnvidia-opticalflow, libnvidia-pkcs11-openssl3, libnvidia-pkcs11, libnvidia-ptxjitcompiler, libnvidia-rtcore, libnvidia-tls, libnvidia-wayland-client, libOpenCL.so, libvdpau_nvidia, nvidia-drm_gbm, nvidia_drv, and for Wine-10.10 (_nvngx, nvngx, and nvngx_dlssg; all three are DLLs)
Installed Directories: /usr/lib/firmware/nvidia/575.57.08, /usr/lib/nvidia/wine, /usr/share/glvnd/egl_vendor.d, and /usr/share/nvidia

Short Descriptions

nvidia-install

is an install script that installs all the software from this driver that you need

nvidia-modprobe

is a suid program which populates /dev with directories and files for this driver and is loaded when starting a display server

nvidia-settings

a GUI application relying on GTK-3 that allows tweaking settings like resolution and refresh rate

nvidia-smi

provides NVIDIA GPU monitoring information

nvidia-uninstall

is a custom-made install script that uninstalls the driver

nvidia-xconfig

manipulates X11 configuration files to allow the NVIDIA driver to be used when starting X11

libcudadebugger

allows debugging CUDA applications

libcuda

provides support for applications that use CUDA

libEGL_nvidia

provides the NVIDIA implementation of EGL

libGLESv2_nvidia

provides the NVIDIA implementation of OpenGL ES v2

libGLX_nvidia

provides the NVIDIA implementation of GLX

libglxserver_nvidia

is the NVIDIA X11 GLX extension module

libnvcuvid

provides an interface to hardware accelerated decoding

libnvoptix

provides the OptiX Ray Tracing API

libnvidia-allocator

handles NVIDIA GPU memory management

libnvidia-api

provides the NVAPI interface

libnvidia-cfg

queries a NVIDIA GPU's configuration settings

libnvidia-eglcore

provides primary EGL functionality to other components of the driver

libnvidia-encode

provides an interface to video encoder hardware

libnvidia-fbc

provides an interface to capture and optionally encode the framebuffer of an X11 server screen

libnvidia-glcore

provides the primary OpenGL functionality for other components of this driver

libnvidia-glsi

provides the OpenGL Shader Interface for other components of this driver

libnvidia-glvkspirv

allows using SPIR-V shaders in OpenGL

libnvidia-gpucomp

provides primary functionality for allowing computations being done on the GPU for use with other components in this driver

libnvidia-gtk3

for nvidia-settings; utilizes GTK-3

libnvidia-ml

provides a monitoring and management API

libnvidia-ngx

provides functions for DLSS support

libnvidia-nvvm

provides JIT LTO for CUDA

libnvidia-opencl

provides NVIDIA's implementation of the OpenCL API standard

libnvidia-opticalflow

provides Optical Flow support which improves frames, similar to DLSS, with the help of CUDA

libnvidia-pkcs11

provides cryptography functions when the driver is operating in Confidential Compute mode

libnvidia-ptxjitcompiler

is a JIT compiler which compiles PTX into GPU machine code; used by CUDA

libnvidia-rtcore

implements the RT (Ray Tracing) core functionality and is used by other components in this driver

libnvidia-tls

provides TLS support for the NVIDIA OpenGL implementations

libnvidia-wayland-client

is required for nvidia-settings on Wayland

libvdpau_nvidia

provides the NVIDIA implementation for the VDPAU API

_nvngx

provides DLSS support for use with Proton

nvngx

provides DLSS support for use with Wine

nvngx_dlssg

is the DLSS 3 Frame Generation library

nvidia-drm_gbm

is the NVIDIA GBM driver

nvidia_drv

is the NVIDIA X11 driver



[7] Newer versions of the NVIDIA drivers will fail to compile with TTY support unless a graphics driver is included in the kernel. Nouveau is used here, though alternate graphics drivers may also work.

[8] Direct Rendering Infrastructure.