berny

berny

github
x

NVIDIA Driver Installation Guide on Debian sid

This article provides a detailed description of the process of installing NVIDIA drivers on Debian sid, including key steps and precautions.

Preparation#

Preparation steps before installation:

  1. Confirm the graphics card model

    lspci | grep -E "VGA|3D"
    

    This command displays the graphics card information.

  2. Backup important data
    It is recommended to backup important files before performing any system operations.

  3. Disable UEFI Secure Boot
    If UEFI Secure Boot is enabled, it needs to be disabled first. Alternatively, refer to the sign in nvidia kernel module for NVIDIA driver kernel module signing.

  4. Download the driver
    Download the NVIDIA 560.35.03 version Linux driver from the NVIDIA driver page.

  5. Clean up old drivers
    If NVIDIA drivers were previously installed, it is recommended to clean them up:

    sudo apt autoremove $(dpkg -l nvidia-driver-* | grep ii | awk '{print $2}')
    sudo apt autoremove $(dpkg -l *nvidia* | grep ii | awk '{print $2}')
    
  6. Install dependencies

    sudo apt install linux-headers-$(uname -r) gcc make acpid dkms libglvnd-core-dev libglvnd0 libglvnd-dev dracut libc-dev
    

Installation Steps#

  1. Disable Nouveau driver
    Disable the open-source NVIDIA driver Nouveau:

    echo "blacklist nouveau" | sudo tee -a /etc/modprobe.d/blacklist-nouveau.conf
    

    Modify the GRUB configuration:

    sudo vim /etc/default/grub
    # Add rd.driver.blacklist=nouveau to GRUB_CMDLINE_LINUX_DEFAULT
    sudo update-grub2
    
  2. Update initramfs

    sudo cp /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r)-nouveau.img
    sudo dracut -q /boot/initramfs-$(uname -r).img $(uname -r)
    
  3. Switch to multi-user mode and reboot

    sudo systemctl set-default multi-user.target
    sudo reboot
    
  4. Install NVIDIA driver
    After rebooting, log in and run:

    sudo /path/to/nvidia-linux-*.run
    
  5. Switch back to graphical mode and reboot

    sudo systemctl set-default graphical.target
    sudo reboot
    

Optimization Configuration#

Optimization steps after installation:

  1. Enable NVIDIA DRM KMS

    echo "options nvidia_drm modeset=1" | sudo tee -a /etc/modprobe.d/nvidia.conf
    

    Modify the GRUB configuration, add nvidia-drm.modeset=1, and then update GRUB.

  2. Configure dracut

    cat <<EOF | sudo tee -a /etc/dracut.conf.d/nvidia.conf
    add_drivers+=" nvidia nvidia_modeset nvidia_uvm nvidia_drm"
    install_items+=" /etc/modprobe.d/nvidia.conf"
    EOF
    
  3. Update initramfs

    sudo dracut -qf /boot/initramfs-$(uname -r).img $(uname -r)
    
  4. Configure Plymouth (optional)
    Change the boot screen:

    plymouth-set-default-theme -l
    plymouth-set-default-theme moonlight
    
  5. Configure Wayland (optional)
    Try Wayland:

    sudo apt install xwayland libxcb1 libnvidia-egl-wayland1
    

After completion, restart the system to use the newly installed NVIDIA driver.

Conclusion#

This article provides detailed steps for installing NVIDIA drivers on Debian sid. If you encounter any issues, please refer to relevant documentation or seek help on technical forums.

References#

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.