How to Install Nvidia Drivers on LMDE 5

Linux Mint Debian Edition is, as most users that install it would know, based on Debian. By default, Debian does come with support for Nvidia drivers over the open-source nouveau drivers, which depending on the type of graphic card you have installed, would most likely work and improve the performance of your system, especially for games and users that do graphical design. But, for users with newer cards, even the default repository Nvidia drivers can often fall behind. Luckily, there are options for LMDE users to install the latest drivers using the Nvidia CUDA repository.

The following tutorial will teach you how to install Nvidia Graphic Drivers using default repositories and to install Nvidia drivers directly from Nvidia repositories on Linux Mint Debian Edition, with both open-source and proprietary drivers available.

Important Notice

The following tutorial was done with an LMDE 5 “Linux Mint Debian Edition Elsie” release, and example images were taken, but it was tested on LMDE 4; for most users, I would recommend upgrading to LMDE 5 if you are still on 4. In the future, if the Linux Mint team makes any changes to break the tutorial for one of the distribution versions, please place a comment for me to investigate so I can update the tutorial.

Recommended Steps Before Installation

Before proceeding with the tutorial, ensuring your system is up-to-date with all existing packages is good.

sudo apt update

Optionally, you can list the updates for users who require review or are curious.

sudo apt --list upgradable

Proceed to upgrade any outdated packages using the following command.

sudo apt upgrade

Previous Nvidia Installations

Please note installing Nvidia drivers over the standard packages can result in unexpected issues, especially if you install the Nvidia drivers from the default repository, then import the Nvidia Cuda repository and try to re-install or upgrade directly over those packages. If you use one method, stick to it, and if you want to swap, ensure you remove the previous installation to avoid conflicts.

#1st Method Install NVIDIA Drivers – Default Repository

Installation Pre-setup

The first task is enabling the “contrib” and “non-free” repositories. This can be quickly done using the following commands.

First, add the contrib repository.

sudo add-apt-repository contrib

Now add the non-free repository.

sudo add-apt-repository contrib

Once added, update your repository list.

sudo apt update

Before installing any Nvidia drivers, you will need to install the proper kernel headers for the NVIDIA driver to build with. You can install either 64bit or 32bit, and you can find this out by running the lscpu command:

lscpu | grep CPU

Example output:

CPU op-mode(s):                  32-bit, 64-bit
CPU(s):                          2
On-line CPU(s) list:             0,1
CPU family:                      23
CPU MHz:                         3900.025
NUMA node0 CPU(s):               0,1

From the output, the system is 64bit, so the following headers need to be installed.

sudo apt install linux-headers-amd64

32bit LMDE systems, use the following command instead.


32-bit non-PAE kernel:

sudo apt install linux-headers-686

32-bit PAE kernel:

sudo apt install linux-headers-686-pae

Install Nvidia Drivers

Next, you can install the “nvidia-detect,” which will automatically suggest the best package for your graphics card.

To do this, use the following command:

sudo apt install nvidia-detect

Now that Nvidia-detect is installed, run the command to check your current Nvidia Graphics Card:


The output has shown the machine in the example has a GeForce GTX 1650 card and that it is recommended to install the nvidia-driver package, but this is just a recommendation.

Next, install the recommended package:

sudo apt install nvidia-driver linux-image-amd64

You will see a note about the free Nouveau graphics driver conflicting with the installed new driver. As per the message, you need to reboot to correct this; for now, press the “ENTER KEY” to proceed.

Once installed, reboot your system.

reboot now

Once logged back in, run the “nvidia-smi” command to confirm the new Nvidia Drivers have been installed.


Install Nvidia Legacy Drivers

If your Nvidia Graphics card is quite old from 400 Series downwards, you will need to install the legacy drivers. The process is the same, just with a new install command:

sudo apt install nvidia-legacy-390xx-driver firmware-misc-nonfree -y

Once complete, do not forget to reboot your system.

sudo reboot now

Next, run the “nvidia-smi” command to verify the installation.


The 340 series can technically be installed; however, it is no longer supported, and several major security flaws exist in those drivers. It is not advised to install these drivers if you need to replace 390xx with 340xx, but this is not recommended.

#2nd Method – Install Nvidia Drivers with Nvidia Repository

The second method will install the latest drivers for your desktop or server using the Cuda repository. I would recommend using these drivers since when an update is released, you will receive it straight away. This is good for security and performance since Nvidia often does new releases, and now you can install the open-source option.

Determine your Graphics Card

The first step for users with aging NVIDIA Graphics cards is to determine what it is and if it is supported, users with brand new cards can skip this part as there is no doubt they will be supported.

First, find your graphics card module.

lspci | grep -e VGA

Example output:

03:00.0 VGA compatible controller: NVIDIA Corporation TU117 [GeForce GTX 1650] (rev a1)

Importing Nvidia Repository

First, ensure you install the following packages, which may be already installed.

sudo apt install dirmngr ca-certificates software-properties-common apt-transport-https dkms curl -y

Next, import the GPG key, and ensure you match the import to your distribution version.

Import GPG key for LMDE 5:

curl -fSsL | gpg --dearmor | sudo tee /usr/share/keyrings/nvidia-drivers.gpg >/dev/null

Import GPG key for LMDE 4:

curl -fSsL | gpg --dearmor | sudo tee /usr/share/keyrings/nvidia-drivers.gpg >/dev/null

Second, import the repository for your Debian system, and again ensure you import the correct one to match your Debian distribution version.

Import Nvidia Repository for LMDE 5:

echo 'deb [signed-by=/usr/share/keyrings/nvidia-drivers.gpg] /' | sudo tee /etc/apt/sources.list.d/nvidia-drivers.list

Import Nvidia Repository for LMDE 4:

echo 'deb [signed-by=/usr/share/keyrings/nvidia-drivers.gpg] /' | sudo tee /etc/apt/sources.list.d/nvidia-drivers.list

Enable the CONTRIB repository. Run this even if you already have it enabled to be safe.

sudo add-apt-repository contrib

Installing Nvidia Drivers – Proprietary or Opensource options

Update your sources list to reflect the newly added repository.

sudo apt update

Next, install the latest NVIDIA drivers.

Install NVIDIA Drivers Without Cuda Support (Proprietary):

sudo apt install nvidia-driver nvidia-smi nvidia-settings

Install NVIDIA Drivers With Cuda Support (Proprietary):

sudo apt install nvidia-driver cuda nvidia-smi nvidia-settings

Install NVIDIA Drivers Without Cuda Support (Opensource):

sudo apt install nvidia-driver nvidia-kernel-open-dkms nvidia-smi nvidia-settings

Install NVIDIA Drivers With Cuda Support (Opensource):

sudo apt install nvidia-driver nvidia-kernel-open-dkms cuda nvidia-smi nvidia-settings

Note that the download is large and can take a while; given this is a general release, it is recommended to install all the drivers to avoid any issues or inconsistencies on your desktop.

One good thing about the Nvidia repository installation is that if you forgot to remove the previous one, you would see a prompt for users with pre-existing installations before the installation continues. Select Yes to remove any existing drivers, failure to do this may cause system instability. Once done, the installation will be complete.

Once the installation is complete, you will be prompted to reboot your PC to enable the NVIDIA drivers.


reboot notice after Nvidia Drivers install on Linux Mint Debian Edition (LMDE)

Reboot your system once done.

sudo reboot

Verify the installation by running NVIDIA-SMI as the manual installation steps showed beforehand.


Example output:

Nvidia SMI terminal output example on Linux Mint Debian Edition (LMDE)

Alternatively, you can open the GUI for desktop users using the following command.


Or open the application icon located in the following path.

Taskbar > Administration > Nvidia X Server

Example output:

Example Nvidia Drivers installed example information on Linux Mint Debian Edition (LMDE)

Install 32-bit Support for Nvidia Drivers

32-bit support can be easily enabled and installed first. Install the 64-bit drivers above, then proceed with the following steps.

First, enable 32-bit architecture.

sudo dpkg --add-architecture i386

Update the APT-CACHE to reflect the changes to the architecture.

sudo apt update

Install 32-bit support, and remove the Cuda package “libcuda1-i386” for those users not requiring it.

sudo apt install libcuda1-i386 nvidia-driver-libs-i386

Reboot your PC.

sudo reboot

Not what you were looking for? Try searching for additional tutorials.

Leave a Comment