Nvidia Logo

This is guide, howto install NVIDIA proprietary drivers (manually using .run files) on Debian Sid / 12 / 11 / 10, Ubuntu 23.10 / 22.04, Linux Mint 21.3 / 21.2 / 21.1 / 21 / 20.3 / 20.2 / 20.1, LMDE 4 and disable Nouveau driver. This guide works with GeForce 8/9/200/300/400/500/600/700/800/900/10/20/30 series cards. This is alternative way to install NVIDIA drivers, because Debian based Linux distros have NVIDIA drivers directly from repos too.

  • GeForce RTX 40 series cards works with 550.xx, 545.xx, 535.xx, 525.xx NVIDIA drivers, (RTX 4090, RTX 4080, RTX 4070 Ti, RTX 4070, RTX 4060 Ti, RTX 4060)
  • GeForce RTX 30 series cards works with 550.xx, 545.xx, 535.xx, 525.xx NVIDIA drivers, (RTX 3090, RTX 3080 and RTX 3070, RTX 3060, RTX 3060 Ti)
  • GeForce RTX 20 series cards works with 550.xx, 545.xx, 535.xx, 525.xx NVIDIA drivers (RTX 2080 Ti, RTX 2080, RTX 2070 Ti, RTX 2070, RTX 2060)
  • GeForce GT/GTX 600/700/800/900/10 series cards works with 550.xx, 545.xx, 535.xx, 525.xx, 470.xx, and 390.xx NVIDIA drivers (GTX 1080 Ti, GTX 1080, GTX 1070, GTX 1060, GTX 1660 …)
  • GeForce GT/GTX 400/500 series cards works with 390.xx NVIDIA drivers
  • GeForce GT 8/9/200/300 series cards works with 340.xx NVIDIA drivers

Check video version of guide. NVIDIA drivers installed manually on Debian Bookworm 12:

Check video version of guide. NVIDIA drivers installed manually on Debian Bullseye 11:

NVIDIA drivers installed manually on Ubuntu 23.10 / 22.04:

NVIDIA drivers installed manually on Linux Mint 21.3 / 21.2 Victoria / 21.1 Vera / 21 Vanesa / 20.3 Una / 20.2 Uma / 20.1 Ulyssa:

Following Debian based distros/versions with 5.x kernels should work:

  • Debian Unstabled Sid / 12 / 11 / 10
  • Ubuntu 23.10 / 22.04
  • Linux Mint 21.3 / 21.2 / 21.1 / 21 / 20.3 / 20.2 / 20.1
  • LMDE 4

Reason why I publish this guide is following:

If you are totally happy with NVIDIA drivers from your distro repos, then this guide isn’t for you, maybe…but with manual installation you can control NVIDIA drivers versions as you wish.

You can easily install / change / test / run:

  • NVIDIA New Feature Branch (NFB) drivers
  • NVIDIA Long Lived Branch (LLB) drivers
  • NVIDIA Short Lived Branch (SLB) drivers
  • NVIDIA LEGACY drivers
  • NVIDIA BETA drivers
  • Install NVIDIA drivers with custom patches
  • Just stay in some particular NVIDIA version

This guide uses NVIDIA drivers directly from NVIDIA site and dkms to help on kernel updates. I have used this method on Fedora years and it’s working OK. Now I decided to release same guide to Debian / Ubuntu / Linux Mint users too. This is old school (and bit ugly) method to install NVIDIA drivers “manually”. I have tested this guide with 340.xx (patched), 390.xx, 418.xx (patched), 435.xx (patched), 450.xx, 460.xx, 465.xx, 470.xx, 495.xx, 510.xx, 515.xx, 525.xx, 530.xx, 535.xx, 545.xx drivers/cards.

With DKMS, you can just update your kernel and your NVIDIA drivers are compiled automatically. If you want to upgrade NVIDIA drivers, then you have to download new installer package from NVIDIA site.

Let me know, if you have some problems?

Or if you succeed, you could post output of following commands:

nvidia-installer -v |grep version
uname -a
lspci |grep -E "VGA|3D"

Backup first important files before you start installation. And this is of course at your own risk, because graphic cards, components and monitors are different and some combinations might cause totally unexpected results.

1. Before NVIDIA drivers installation

1.1 Check is your NVIDIA card supported

lspci |grep -E "VGA|3D"
## Example outputs ##
01:00.0 VGA compatible controller: NVIDIA Corporation TU106 [GeForce RTX 2060 Rev. A] (rev a1)

List of Supported NVIDIA GPU Products, check best driver for your card. If you see multiple VGA controllers, then check next step and sometimes you might see example Intel VGA controller which have nothing to do with Optimus, normally you can go to BIOS and simply disable it.

1.2 NVIDIA Optimus Technology

If your lspci |grep -E “VGA|3D” output looks like following:

00:02.0 VGA compatible controller: Intel Corporation 2n Generation Core Processor Family Integrated Graphics Controller (rev 09)
01:00.0 VGA compatible controller: NVIDIA Corporation GF106 [GeForce GT 555M SDDR3] (rev a1)

Or

00:02.0 VGA compatible controller: Intel Corporation 4th Gen Core Processor Integrated Graphics Controller (rev 06)
01:00.0 3D controller: NVIDIA Corporation GK107M [GeForce GT 750M] (rev a1)

Or you know that your computer have NVIDIA Optimus Technology, and it is impossible to turn Intel Graphics / NVIDIA Optimus off in the BIOS then this guide might not work for you and it’s not tested. You should read this NVIDIA Optimus page first and maybe check Bumblebee Project or NVIDIA XRun Project.

1.3 Disable UEFI Secure Boot or Check Howto Sign NVIDIA Kernel Module

Check is UEFI Secure Boot Enabled or Disabled

mokutil --sb-state

If you have UEFI Secure Boot enabled, then you have to disable Secure Boot or sign your NVIDIA kernel module.

2. Install NVIDIA proprietary drivers on Debian / Ubuntu / Linux Mint / LMDE and disable the nouveau driver

2.1 Download NVIDIA Installer Package

Go to http://www.nvidia.com/Download/Find.aspx?lang=en-us and find latest version of installer package. When you use browser this is normally downloaded /home/<username>/Downloads/NVIDIA-Linux-xxxx.run location.

Tested versions with 6.5+ / 6.4+ / 6.3+ / 6.2+ kernels:

Debian Sid / Bookworm 12 / Bullseye 11 / Buster 10 Ubuntu 22.04 Ubuntu 23.10 Linux Mint 21.3 / 21.2 / 21.1 / 21 / 20.3 / 20.2 / 20.1 LMDE 4
550.54.14 (February 23, 2024) 550.54.14 (February 23, 2024) 550.54.14 (February 23, 2024) 550.54.14 (February 23, 2024) 550.54.14 (February 23, 2024)
545.29.06 (November 22, 2023) (NFB) 545.29.06 (November 22, 2023) (NFB) 545.29.06 (November 22, 2023) (NFB) 545.29.06 (November 22, 2023) (NFB) 545.29.06 (November 22, 2023) (NFB)
535.161.07 (February 22, 2024) 535.161.07 (February 22, 2024) 535.161.07 (February 22, 2024) 535.161.07 (February 22, 2024) 535.161.07 (February 22, 2024)
525.147.05 (October 31, 2023) 525.147.05 (October 31, 2023) 525.147.05 (October 31, 2023) 525.147.05 (October 31, 2023) 525.147.05 (October 31, 2023)
470.239.06 (February 22, 2024) 470.239.06 (February 22, 2024) 470.239.06 (February 22, 2024) 470.239.06 (February 22, 2024) 470.239.06 (February 22, 2024)
435.21 (August 29, 2019) (Patched) 435.21 (August 29, 2019) (Patched) 435.21 (August 29, 2019) (Patched) 435.21 (August 29, 2019) (Patched) 435.21 (August 29, 2019) (Patched)
418.113 (November 5, 2019) (Patched) 418.113 (November 5, 2019) (Patched) 418.113 (November 5, 2019) (Patched) 418.113 (November 5, 2019) (Patched) 418.113 (November 5, 2019) (Patched)
390.157 (November 22, 2022) 390.157 (November 22, 2022) 390.157 (November 22, 2022) 390.157 (November 22, 2022) 390.157 (November 22, 2022)
340.108 (December 23, 2019) (Patched) 340.108 (December 23, 2019) (Patched) 340.108 (December 23, 2019) (Patched) 340.108 (December 23, 2019) (Patched) 340.108 (December 23, 2019) (Patched)

Note 390.157 users: 390.157 on Debian / Ubuntu / Linux Mint / LMDE with Kernel 6.5 / 6.4 / 6.3 / 6.2 needs a patched version (Download inttf NVIDIA patcher and patch NVIDIA-Linux-x86_64-390.157 for Kernel 6.5 / 6.4 / 6.3 / 6.2).

Note 340.108 users: 340.108 on Debian / Ubuntu / Linux Mint / LMDE Kernel 6.5 / 6.4 / 6.3 / 6.2 needs a patched version (Download inttf NVIDIA patcher and patch NVIDIA-Linux-x86_64-340.108 for Kernel 5.15 / 5.14).

Note 418.113 and 435.21 users: These are not official NVIDIA LEGACY drivers, but there is example GeForce GTX 1650 Mobile card which is not supported by older or newer drivers. (Download inttf NVIDIA patcher and patch NVIDIA-Linux-x86_64-418.113 and NVIDIA-Linux-x86_64-435.21 for Kernel 5.x)

2.2 Make NVIDIA installer executable

chmod +x /path/to/NVIDIA-Linux-*.run

2.3 Change root user

su -
## OR ##
sudo -i

2.4 Make sure that you system is up-to-date and you are running latest kernel, also make sure that you don’t have any Debian / Ubuntu / Linux Mint / LMDE NVIDIA package installed

## Ubuntu / Debian / Linux Mint / LMDE ##
apt update
apt upgrade
## Debian and Linux Mint ##
apt autoremove $(dpkg -l nvidia-driver* |grep ii |awk '{print $2}')
## Ubuntu ##
apt autoremove $(dpkg -l *nvidia* |grep ii |awk '{print $2}')
apt reinstall xserver-xorg-video-nouveau

After update and/or NVIDIA drivers remove reboot your system and boot using latest kernel and nouveau:

reboot

2.5 Install needed dependencies

## Ubuntu / Debian / Linux Mint ##
apt install linux-headers-$(uname -r) gcc make acpid dkms libglvnd-core-dev libglvnd0 libglvnd-dev dracut libc-dev

2.6 Disable nouveau

2.6.1 Create or edit /etc/modprobe.d/blacklist.conf

Append ‘blacklist nouveau’

echo "blacklist nouveau" >> /etc/modprobe.d/blacklist.conf

2.6.2 Edit /etc/default/grub

Append ‘rd.driver.blacklist=nouveau’ to end of ‘GRUB_CMDLINE_LINUX=”…”‘.

## Example row on Debian ##
GRUB_CMDLINE_LINUX_DEFAULT="quiet rd.driver.blacklist=nouveau"
## OR with Ubuntu and Linux Mint ##
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash rd.driver.blacklist=nouveau"

2.6.3 Update grub2 conf

Ubuntu / Debian / Linux Mint

## BIOS and UEFI ##
update-grub2

2.6.4 Generate initramfs

## Backup old initramfs nouveau image ##
mv /boot/initrd.img-$(uname -r) /boot/initrd.img-$(uname -r)-nouveau
 
## Generate new initramfs image ##
dracut -q /boot/initrd.img-$(uname -r) $(uname -r)

2.7 Reboot to runlevel 3

Note: You don’t have Desktop/GUI on runlevel 3. Make sure that you have some access to end of guide. (Open it on mobile browser, Print it, use lynx/links/w3m, save it to text file).

systemctl set-default multi-user.target
reboot

OR alternatively you can change the runlevel on GRUB2 adding one additional parameter. Quick guide howto change runlevel on GRUB2. If you use this method, then don’t set multi-user.target and don’t set graphical.target on step 2.9 (just reboot).

2.8 Install NVIDIA proprietary drivers for GeForce 6/7 & GeForce 8/9/200/300 & GeForce 400/500/600/700/800/900/10/20/30 series cards

2.8.1 Log in as root user

Or alternatively change root user (you shouldn’t have nouveau and xorg loaded)

su -
## OR ##
sudo -i

2.8.2 Run NVIDIA Binary

Following command executes driver install routine. Use full file name command if you have multiple binaries on same directory.

./NVIDIA-Linux-*.run
## OR full path / full file name ##
Downloads/NVIDIA-Linux-x86_64-550.54.14.run
Downloads/NVIDIA-Linux-x86_64-545.29.02.run
Downloads/NVIDIA-Linux-x86_64-535.161.07.run
Downloads/NVIDIA-Linux-x86_64-525.147.05.run
Downloads/NVIDIA-Linux-x86_64-470.239.06.run
Downloads/NVIDIA-Linux-x86_64-465.31.run
./NVIDIA-Linux-x86_64-435.21-patched-kernel-5.16.run
./NVIDIA-Linux-x86_64-418.113-patched-kernel-5.16.run
./NVIDIA-Linux-x86_64-390.154-patched-kernel-6.5.run
export IGNORE_CC_MISMATCH=1 && /path/to/NVIDIA-Linux-x86_64-340.108-patched-kernel-6.5.run

2.8.3 NVIDIA Installer Register the Kernel Source Modules with DKMS

NVIDIA Installer dkms

2.8.4 NVIDIA Installer 32-bit Compatibility Libraries

NVIDIA Installer 32-bit Compatibility Libraries

2.8.5 NVIDIA Installer Installing Drivers and Building kernel module

NVIDIA Installer Installing Files

NVIDIA Installer Building Kernel Module

NVIDIA Installer Installing Kernel Module

2.8.6 NVIDIA Installer Automatic Xorg Config and Backup

NVIDIA Installer Automatic Xorg Config and Backup

2.8.7 NVIDIA Drivers Installation Complete

NVIDIA Drivers Installation Complete

2.8.8 Additional Xorg.conf for Ubuntu 22.04 + NVIDIA 340.xx users

Add following to /etc/X11/xorg.conf. This will use NVIDIA Drivers when ABI version mismatch.

Section "ServerFlags"
  Option "IgnoreABI" "1"
EndSection

2.9 All Is Done and Then Reboot Back to Runlevel 5

systemctl set-default graphical.target
reboot

3. Some Screenshots Using Different Cards and Drivers

3.1 NVIDIA 470.42.01 Running on Ubuntu 21.10 GNOME 40

NVIDIA 470.42.01 Running on Ubuntu 21.10 GNOME 40

3.2 NVIDIA 470.42.01 Running on Linux Mint 20.2 Cinnamon 5.0.2

NVIDIA 470.42.01 Running on Linux Mint 20.2 Cinnamon 5.0.2

3.3 NVIDIA 465.31 Running on Debian Bullseye 11 Gnome 3.38.5

NVIDIA 465.31 Running on Debian Bullseye 11 Gnome 3.38.5

3.4 NVIDIA 435.21 Running on Debian Bullseye 11 Gnome 3.38.5

NVIDIA 435.21 Running on Debian Bullseye 11 Gnome 3.38.5

3.5 NVIDIA 418.113 Running on Linux Mint 20.1 Kernel 5.4.0 Cinnamon 4.8.6

NVIDIA 418.113 Running on Linux Mint 20.1 Kernel 5.4.0 Cinnamon 4.8.6

3.6 NVIDIA 390.143 Running on LMDE 4 Debbie Kernel 5.10 Cinnamon 4.8.6

NVIDIA 390.143 Running on LMDE 4 Debbie Kernel 5.10 Cinnamon 4.8.6

3.7 NVIDIA 340.108 Running on Ubuntu 21.10 Kernel 5.11 Gnome 3.38.5

NVIDIA 340.108 Running on Ubuntu 21.10 Kernel 5.11 Gnome 3.38.5

Let me know, if you have problems?

If you see Black Screen after NVIDIA drivers install, then check following video:

Or if you succeed, you could post output of following commands:

nvidia-installer -v |grep version
uname -a
lspci |grep -E "VGA|3D"