Optimizing your Linux Mint system for the best graphical performance is essential, especially for gaming, streaming, or graphic design tasks. One of the most effective ways to achieve this is by installing proprietary NVIDIA drivers. This guide will explore how to install NVIDIA drivers for Linux Mint 21 or the older stable release of Linux Mint 20 and why they are preferred over open-source alternatives.
Key Advantages of NVIDIA Drivers for Linux Mint 21 or 20:
- Performance Boost: Proprietary NVIDIA drivers are known to outperform open-source alternatives, ensuring a seamless experience in graphics-intensive tasks.
- Broad Compatibility: Tailored for the latest hardware, NVIDIA drivers guarantee compatibility with a vast array of NVIDIA GPUs, unlocking the latest graphics features.
- Advanced Configuration: With tools like the NVIDIA Control Panel and NVIDIA System Monitor, users can fine-tune graphics settings, enhancing the overall system performance.
- Stability and Reliability: Proprietary NVIDIA drivers undergo rigorous testing, ensuring a stable experience, which is crucial for high-end tasks where system crashes can be detrimental.
- Regular Updates: NVIDIA’s commitment to regular updates means users benefit from the latest performance improvements, bug fixes, and new features.
The proprietary NVIDIA drivers are a clear choice for those keen on maximizing their system’s graphical capabilities. They enhance the overall performance and ensure a stable and reliable experience. Next, we’ll guide you through installing NVIDIA drivers on Linux Mint 21 or Linux Mint 20, ensuring your system is primed for the best graphical output.
This guide offers multiple methods. If you’re new to Linux, we strongly recommend using the version provided by the Linux Mint device manager until you become more familiar with the system.
For secure boot installations, it’s likely that you’ll need to disable this feature. Depending on the method you choose from this guide, you can install various Nvidia Driver series including: 535, 530, 525, 520, 515, 510, 490, 470, 450, and 390.
Table of Contents
Section 1: Remove Previous Nvidia Installations from Linux Mint 21 or 20
This is not required if you are sure you are using the Nouveau drivers and have not installed Nvidia drivers.
Before installing the new Nvidia drivers, it is essential to remove any previous installations to avoid conflicts or unexpected issues. This is particularly important if you have installed Nvidia drivers from different sources, such as the default and CUDA repositories. To ensure a smooth installation, follow the steps below to remove the previous Nvidia drivers from your system.
APT Remove Method for Nvidia Drivers on Linux Mint
First, use the following command to remove any traces of Nvidia installation on your system. This command will uninstall all Nvidia-related packages and their configuration files:
sudo apt autoremove nvidia* --purge
Runfile Remove Method for Nvidia Drivers Installation on Linux Mint
If you have installed the Nvidia drivers using the .run
file, which is not recommended but can be found on some Linux blogs; you need to uninstall it using a different command. The .run
file installation method is less preferable due to the availability of better alternatives, such as the Nvidia CUDA repository.
To remove the runfile type of installation, use the following command:
sudo /usr/bin/nvidia-uninstall
CUDA Toolkit Runfile Remove Method Installation on Linux Mint
Lastly, if you have installed the CUDA toolkit using the runfile, you can remove it by running the following command. Replace X.Y
with the appropriate version number:
sudo /usr/local/cuda-X.Y/bin/cuda-uninstall
Following these steps, you can successfully remove any previous Nvidia driver installations from your system and prepare for a fresh installation.
Section 2: Pre-installation Steps for Nvidia Drivers on Linux Mint 21 or 20
Before installing the Nvidia drivers, performing some pre-installation steps is essential to ensure a smooth installation process. These steps include determining your graphics card model and ensuring your Linux Mint system is up-to-date.
Step 1: Determine Your Graphics Card Model on Linux Mint
For users with older NVIDIA graphics cards, it’s crucial to determine the card model and verify its compatibility with the latest drivers. Users with new graphics cards can skip this step as their cards will likely be supported.
First, find your graphics card model by running the following command:
lspci | grep -e VGA
Example output:
03:00.0 VGA compatible controller: NVIDIA Corporation TU117 [GeForce GTX 1650] (rev a1)
If you have an older graphics card, check the NVIDIA website to determine if the latest NVIDIA drivers still support it. In some cases, you may need to install legacy drivers for compatibility.
Step 2: Update Linux Mint Before Nvidia Drivers Installation on Linux Mint
Before proceeding with the driver installation, it’s crucial to update your Linux Mint system to avoid any conflicts during installation. Updating your system ensures that all packages, including new kernels and graphics card drivers, are compatible with your current setup.
To update your system, first, run the following command to check for any available updates:
sudo apt update
Next, upgrade any outdated packages using the following command:
sudo apt upgrade
Section 3: Install Nvidia Drivers on Linux Mint 21 or 20 via Driver Manager (GUI)
The recommended method for most Linux Mint users is to install the Nvidia drivers using the built-in Driver Manager. This method typically installs the open-source version of the drivers and provides some alternative options for better system compatibility.
Step 1: Accessing the Driver Manager on Linux Mint
To access the Driver Manager in Linux Mint, follow these steps:
- Click on the Menu (Taskbar) in the lower-left corner of your screen.
- Navigate to Administration.
- Click on Driver Manager.
Step 2: Install Nvidia Drivers on Linux Mint 21 or 20 via Driver Manager
Once you have opened the Driver Manager, follow these steps to install the Nvidia drivers:
- The Driver Manager will prompt you for your password. Enter your password and click on Authenticate.
- The Driver Manager will scan your system for available drivers. Once the scanning is complete, you will see a list of available drivers for your graphics card.
- Select the recommended Nvidia driver from the list.
- Click on Apply Changes to start the installation process.
Step 3: Rebooting Your System To Complete Nvidia Drivers Installation on Linux Mint
After installing or removing any Nvidia drivers, it’s essential to reboot your system for the changes to take effect. To reboot your system, either use the graphical interface to restart your computer or run the following command in the terminal:
reboot
Section 4: Install Nvidia Drivers on Linux Mint 21 or 20 via APT PPA
The second method for installing Nvidia drivers involves using the command-line terminal to access the well-known PPA maintained by the Graphics Drivers team. This PPA is recognized for providing the most up-to-date Nvidia proprietary drivers, making it a suitable choice for users who wish to update their graphics cards regularly.
Step 1: Import the Graphics Drivers Team PPA on Linux Mint
To add this repository to your Linux Mint system, run the following command:
sudo add-apt-repository ppa:graphics-drivers/ppa -y
Step 2: Update Your System After Graphics Drivers Team PPA Imported on Linux Mint
With the PPA imported, run an APT update:
sudo apt update
Step 3: Check for Recommended Drivers on Linux Mint with new PPA
Next, enter the following command in the terminal to display recommendations for your graphics card:
ubuntu-drivers devices
As shown in the output, there is a third-party recommended driver, but you can technically install any of the available drivers.
Step 4: Install the Recommended Driver or Choose a Different Version
If you are satisfied with the recommended version, use this command to install it:
sudo ubuntu-drivers autoinstall
Alternatively, you can install a specific driver version by choosing from the commands below:
sudo apt install nvidia-driver-535
sudo apt install nvidia-driver-525
sudo apt install nvidia-driver-525
sudo apt install nvidia-driver-520
sudo apt install nvidia-driver-515
sudo apt install nvidia-driver-510
sudo apt install nvidia-driver-470
sudo apt install nvidia-driver-450
sudo apt install nvidia-driver-390
Step 5: Reboot Your System After Nvidia Drivers Installation on Linux Mint
Once the installation is complete, reboot your system for the changes to take effect:
reboot
Section 5: Install Nvidia Drivers on Linux Mint 21 or 20 CUDA APT PPA
The third and final method of installing Nvidia drivers is utilizing the Nvidia CUDA repository. This repository is frequently updated and supports Debian, Ubuntu, RHEL, and the most popular Linux distributions. Since Linux Mint is based on Ubuntu, installing drivers from this repository works just as well as on any Ubuntu system.
Step 1: Import the Nvidia APT PPA on Linux Mint 21 or 20
First, ensure the following packages are installed; they may already be present on your system:
sudo apt install dirmngr ca-certificates software-properties-common apt-transport-https dkms curl -y
Next, import the GPG key and ensure it matches your distribution version. The first command is for Linux Mint 21, and the second command is for Linux Mint 20:
curl -fSsL https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/3bf863cc.pub | sudo gpg --dearmor | sudo tee /usr/share/keyrings/nvidia-drivers.gpg > /dev/null 2>&1
curl -fSsL https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/3bf863cc.pub | sudo gpg --dearmor | sudo tee /usr/share/keyrings/nvidia-drivers.gpg > /dev/null 2>&1
Now, import the repository for your system, ensuring you choose the correct one to match your Linux Mint distribution version. The first command is for Linux Mint 21, and the second command is for Linux Mint 20:
echo 'deb [signed-by=/usr/share/keyrings/nvidia-drivers.gpg] https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/ /' | sudo tee /etc/apt/sources.list.d/nvidia-drivers.list
echo 'deb [signed-by=/usr/share/keyrings/nvidia-drivers.gpg] https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/ /' | sudo tee /etc/apt/sources.list.d/nvidia-drivers.list
Step 2: Install Nvidia Drivers on Linux Mint 21 or 20 (Proprietary or Open-Source)
Update your sources list to include the newly added repository:
sudo apt update
Next, install the latest Nvidia drivers. Most users should know the version they prefer. You can also use the APT search command to display the complete list if you want to investigate what is available:
apt search nvidia-driver-*
This tutorial demonstrates how to install the latest version currently available. To install a different version, replace “535” with “530,” “525”, “520”, “515”, etc.
Proprietary Drivers: Install Nvidia Drivers 535.xx Without Cuda Support Example Command:
sudo apt install nvidia-driver-535
Proprietary Drivers: Install Nvidia Drivers 535.xx With Cuda Support Example Command:
sudo apt install nvidia-driver-535 cuda
Open-Source Drivers: Install Nvidia Drivers 535.xx Without Cuda Support Example Command:
sudo apt install nvidia-driver-535-open
Open-Source Drivers: Install Nvidia Drivers 535.xx With Cuda Support Example Command:
sudo apt install nvidia-driver-530-open cuda
Section 5: Confirm Nvidia Drivers are Installed on Linux Mint 21 or 20
After installing the Nvidia drivers and restarting your system, verifying that the installation was successful is essential. You can do this using the command line terminal with the nvidia-smi
command:
nvidia-smi
Alternatively, you can launch the NVIDIA settings GUI by running:
nvidia-settings
Or, navigate to Taskbar > Administration > NVIDIA X Server Settings.
Once open, you can view your NVIDIA card configuration, information, and various settings.
Conclusion
In conclusion, installing Nvidia drivers on Linux Mint can be accomplished using different methods, such as the Linux Mint Driver Manager (GUI), the Graphics Drivers Team PPA, or the Nvidia CUDA Repository. Each method has benefits and allows you to choose between proprietary and open-source drivers. Verifying the successful installation of the drivers is an essential step to ensure your graphics card is configured correctly and functioning optimally.