Z-Ray (two better than X)

Debian 13 & NVIDIA Driver

NVIDIA Driver Manual Installation and DKMS Setup

This guide walks through manually installing official NVIDIA drivers using the .run installer with DKMS module integration and 32-bit multi-arch support.


1. Enable 32-bit Architecture and Install Build Dependencies

The NVIDIA driver requires kernel headers and compilation tools to build its kernel modules. 32-bit architecture support is required for 32-bit OpenGL/Vulkan compatibility (e.g., Wine, Steam).

sudo dpkg --add-architecture i386 && \
sudo apt update && \
sudo apt install dkms build-essential linux-headers-amd64 pkg-config libc6:i386

2. Blacklist the Nouveau Driver

The open-source Nouveau driver conflicts with the proprietary NVIDIA kernel modules and must be disabled before running the installer.

  1. Write the modprobe configuration to blacklist Nouveau and disable modesetting:

    echo -e "blacklist nouveau\noptions nouveau modeset=0" | sudo tee /etc/modprobe.d/blacklist-nouveau.conf
    
  2. Regenerate the initial RAM file system so the change persists on boot:

    sudo update-initramfs -u
    

3. Prepare the Installer Executable

  1. Download the target driver .run file directly from NVIDIA's official website into your working directory (e.g., ~/Downloads).
  2. Mark the downloaded file as executable:
    chmod +x NVIDIA-Linux-x86_64-*.run
    

4. Reboot into Multi-User Mode

Reboot the machine to ensure the Nouveau driver is completely unloaded from memory.

sudo reboot

Note: If your system automatically launches a graphical display manager upon rebooting, switch to a TTY (Ctrl + Alt + F3) and stop your display manager (e.g., sudo systemctl stop gdm3 or sudo systemctl stop sddm) before running the installer.


5. Execute the NVIDIA Installer

Run the installer with root privileges:

sudo ./NVIDIA-Linux-x86_64-*.run

During the text-based installation prompts, select the following options:


6. Reboot the System

Restart the system to initialize the newly compiled NVIDIA kernel modules and display server hooks:

sudo reboot

7. Verify the Installation

Confirm that the driver is loaded and that DKMS is actively managing the modules:

  1. Check GPU state, driver version, and CUDA version:

    nvidia-smi
    
  2. Check DKMS status (must be run as root to inspect all module directories properly):

    sudo dkms status
    

    Expected output format:

    nvidia/<version>, <kernel-version>, x86_64: installed
    

Remediation: Manual DKMS Re-registration

If sudo dkms status does not list the NVIDIA module or reports an uninstalled state, reinstall DKMS and invoke the NVIDIA installer utility flags to rebuild and re-register the module:

sudo apt install dkms -y && \
sudo /usr/bin/nvidia-uninstall --dkms-uninstall || true && \
sudo /usr/bin/nvidia-installer --dkms