NVIDIA drivers are essential for maximizing the performance of your NVIDIA graphics card on Linux Mint. These drivers provide improved graphics performance, support for the latest technologies, and compatibility with various applications. Properly installing NVIDIA drivers ensures you get the best visual experience and performance from your system.
To install NVIDIA drivers on Linux Mint 22, 21, or 20, you have several methods to choose from. The recommended method is using the GUI via the Device Manager, which simplifies the installation process. Alternatively, you can use the PPA maintained by the Graphics Drivers Team or the NVIDIA drivers’ official APT repository. These methods provide flexibility and ensure you have access to the latest driver versions.
Remove Previous Nvidia Installations
Note: This section can be skipped if you have a fresh installation of Linux Mint or are using Mesa 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
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
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
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.
Pre-installation Steps for Nvidia Drivers
Before installing the Nvidia drivers, performing 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.
Determine Your Graphics Card Model
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 they 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.
Update Linux Mint Before Nvidia Drivers Installation
Before proceeding with the driver installation, updating your Linux Mint system to avoid any conflicts during installation is crucial. 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
Method 1: Install Nvidia Drivers on Linux Mint via Driver Manager
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.
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.
Install Nvidia Drivers on Linux Mint 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.
Rebooting Your System To Complete Nvidia Drivers Installation
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
Method 2: Install Nvidia Drivers via Graphics Drivers Team 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.
Import the Graphics Drivers Team PPA
To add this repository to your Linux Mint system, run the following command:
sudo add-apt-repository ppa:graphics-drivers/ppa -y
Update Your System After Graphics Drivers Team PPA Imported
With the PPA imported, run an APT update:
sudo apt update
Check for Recommended Drivers with new PPA
Next, enter the following command in the terminal to display recommendations for your graphics card:
ubuntu-drivers devices
The output shows that a third-party recommended driver is used, but you can technically install any available driver.
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-555
sudo apt install nvidia-driver-550
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
Reboot Your System After Nvidia Drivers Installation
Once the installation is complete, reboot your system for the changes to take effect:
reboot
Install Nvidia Drivers on Linux Mint 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.
Import the Nvidia APT PPA on Linux Mint
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 APT repository and ensure it matches your distribution version:
The first option is the commands for Linux Mint 22:
curl -fSsL https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/x86_64/3bf863cc.pub | sudo gpg --dearmor | sudo tee /usr/share/keyrings/nvidia-drivers.gpg > /dev/null 2>&1
echo 'deb [signed-by=/usr/share/keyrings/nvidia-drivers.gpg] https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/x86_64/ /' | sudo tee /etc/apt/sources.list.d/nvidia-drivers.list
The second option is the commands for Linux Mint 21:
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
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
And the third option is the commands for Linux Mint 20:
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
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
Install Nvidia Drivers: 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 ” “555” with “550”, “535”, “530,” “525”, “520”, “515”, etc.
Proprietary Drivers: Install Nvidia Drivers 555.xx Without Cuda Support Example Command:
sudo apt install nvidia-driver-555
Proprietary Drivers: Install Nvidia Drivers 555.xx With Cuda Support Example Command:
sudo apt install nvidia-driver-555 cuda
Open-Source Drivers: Install Nvidia Drivers 555.xx Without Cuda Support Example Command:
sudo apt install nvidia-driver-555-open
Open-Source Drivers: Install Nvidia Drivers 555.xx With Cuda Support Example Command:
sudo apt install nvidia-driver-555-open cuda
Confirm Nvidia Drivers are Installed
CLI Method to Check Nvidia Drivers Installation
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
GUI Method to Check Nvidia Drivers Installation
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
With the NVIDIA drivers successfully installed on your Linux Mint system, you can enjoy enhanced graphics performance and compatibility. Regularly check for driver updates to ensure optimal performance and support for the latest features. For any issues or further customization, refer to the Linux Mint documentation and community forums. Enjoy the improved graphics experience with your NVIDIA drivers.
Thank you for all this popularization.
In my RSS feeds