In this post, I will show you how to install NVIDIA Driver on Debian Linux using the Nvidia Official installation package.
➡️ If you think this tutorial is helpful, please support my channel by subscribing to my YouTube channel or by using the Amazon/eBay/ClouDNS Affiliated links below (Full Disclaimer). I will get a small commission from your purchase to grow my channel:
🚀 ClouDNS Affiliated: https://www.cloudns.net/aff/id/255803/
🚀 Things I used for my server: https://amzn.to/3hudohP
🚀 Tools I used: https://amzn.to/3uXaSUr
🚀 Devices I used: https://amzn.to/3FYlfxk
🚀 Networking/Cybersecurity/Programming Books: https://amzn.to/3HEYwb0
🚀 TrueNAS HBA SAS controller IT Mode from the Art of Server: https://ebay.us/cBWEvJ
🧧 PayPal Donation: https://www.paypal.com/paypalme/sysadmin102
If you don’t like reading posts like I do, you can follow along on my YouTube Channel. Below is the video:
➡️ Introduction:
Nvidia Driver on Linux is properly the most difficult driver to install on a Linux system for everyday users. So why would we need them? You would need an Nvidia driver and CUDA Toolkit to run Hashcat or video editing software such as DaVinci Resolve.
➡️ Step 1: Determine the Product Type and Series
On Debian Linux, you can easily do this by using the list command as shown below
┌─[sysadmin102@parrot]─[~]
└──╼ $ lspci | grep -i NVIDIA
41:00.0 VGA compatible controller: NVIDIA Corporation GP102 [GeForce GTX 1080 Ti] (rev a1)
41:00.1 Audio device: NVIDIA Corporation GP102 HDMI Audio Controller (rev a1)
┌─[sysadmin102@parrot]─[~]
└──╼ $
➡️ Step 2: Download the driver installation package
Download the correct driver package for your NVIDIA from the Official Driver download page: https://www.nvidia.com/download/index.aspx
➡️ Step 3: Disable Nouveau Driver
To access tty console, press Ctrl + Atl + F1
To find out which driver was currently being used, you can use the below command. Note: Replace the device ID with your (41:00.0 is the ID for GeForce GTX 1080 Ti)
┌─[sysadmin102@parrot]─[~]
└──╼ $ lspci -s 41:00.0 -v
41:00.0 VGA compatible controller: NVIDIA Corporation GP102 [GeForce GTX 1080 Ti] (rev a1) (prog-if 00 [VGA controller])
Subsystem: Micro-Star International Co., Ltd. [MSI] GP102 [GeForce GTX 1080 Ti]
Flags: bus master, fast devsel, latency 0, IRQ 94, NUMA node 1
Memory at 9d000000 (32-bit, non-prefetchable) [size=16M]
Memory at 80000000 (64-bit, prefetchable) [size=256M]
Memory at 90000000 (64-bit, prefetchable) [size=32M]
I/O ports at 2000 [size=128]
Expansion ROM at 000c0000 [virtual] [disabled] [size=128K]
Capabilities: <access denied>
Kernel driver in use: nouveau
Kernel modules: nouveau
┌─[sysadmin102@parrot]─[~]
└──$
If you see the Kernel driver as “nouveau”, follow the step below to disable Nouveau:
┌─[sysadmin102@parrot]─[~]
└──$ cat <<EOF | sudo tee /etc/modprobe.d/blacklist-nouveau.conf
> blacklist nouveau
options nouveau modeset =0
EOF
┌─[sysadmin102@parrot]─[~]
└──╼ $
➡️ Step 4: Regenerate the kernel initramfs
You can regenerate the kernel initramfs using the below command:
┌─[sysadmin102@parrot]─[~]
└──╼ $ sudo update-initramfs -u
➡️ Step 5: Stop Lightdm service
Stop Lightdm service using the below command:
┌─[sysadmin102@parrot]─[~]
└──╼ $ sudo service lightdm stop
➡️ Step 5: Install NVIDIA Driver from the installation package
First, change the directory to the folder that you saved the downloaded package to. Execute the installation package and select OK/YES when prompted.
┌─[sysadmin102@parrot]─[~]
└──╼ $ cd Downloads/
┌─[sysadmin102@parrot]─[~/Downloads]
└──╼ $ ls
NVIDIA-Linux-x86_64-525.116.04.run
┌─[sysadmin102@parrot]─[~/Downloads]
└──╼ $ sudo sh ./NVIDIA-Linux-x86_64-525.116.04.run
┌─[sysadmin102@parrot]─[~/Downloads]
└──╼ $ reboot
Follow this instruction to remove Nvidia Driver and reinstall Nouveau if you are having issues with Nvidia Driver after reboot: https://link-hub.net/795304/uninstall-nvidia-on-linux
To verify that the Nvidia driver is being used, you can run the list command or nvidia-smi
┌─[sysadmin102@parrot]─[~/Downloads]
└──╼ $ lspci | grep -i NVIDIA
41:00.0 VGA compatible controller: NVIDIA Corporation GP102 [GeForce GTX 1080 Ti] (rev a1)
41:00.1 Audio device: NVIDIA Corporation GP102 HDMI Audio Controller (rev a1)
┌─[sysadmin102@parrot]─[~/Downloads]
└──╼ $ lspci -s 41:00.0 -v
41:00.0 VGA compatible controller: NVIDIA Corporation GP102 [GeForce GTX 1080 Ti] (rev a1) (prog-if 00 [VGA controller])
Subsystem: Micro-Star International Co., Ltd. [MSI] GP102 [GeForce GTX 1080 Ti]
Flags: bus master, fast devsel, latency 0, IRQ 94, NUMA node 1
Memory at 9d000000 (32-bit, non-prefetchable) [size=16M]
Memory at 80000000 (64-bit, prefetchable) [size=256M]
Memory at 90000000 (64-bit, prefetchable) [size=32M]
I/O ports at 2000 [size=128]
Expansion ROM at 000c0000 [virtual] [disabled] [size=128K]
Capabilities: <access denied>
Kernel driver in use: nvidia
Kernel modules: nouveau, nvidia_drm, nvidia
┌─[sysadmin102@parrot]─[~/Downloads]
└──╼ $ nvidia-smi
Thu Jun 1 12:08:08 2023
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 525.116.04 Driver Version: 525.116.04 CUDA Version: 12.0 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|===============================+======================+======================|
| 0 NVIDIA GeForce ... Off | 00000000:41:00.0 On | N/A |
| 29% 28C P0 61W / 250W | 1338MiB / 11264MiB | 2% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| 0 N/A N/A 1297 G /usr/lib/xorg/Xorg 576MiB |
| 0 N/A N/A 2283 G ...b/firefox-esr/firefox-esr 271MiB |
| 0 N/A N/A 5769 G /usr/bin/vlc 483MiB |
+-----------------------------------------------------------------------------+
┌─[sysadmin102@parrot]─[~/Downloads]
└──╼ $
➡️ If you think this tutorial is helpful, please subscribe to my YouTube channel for more tutorials: https://www.youtube.com/@sysadmin102