3 Easy ways to Install NVIDIA Drivers on Ubuntu 20.04

Configurare noua (How To)

Situatie

Solutie

Method #1: NVIDIA Driver Installation Using the GUI

When you use Ubuntu, the system already has free Nouveau drivers for the NVIDIA GPU.

However, these drivers may not make the graphics card work at its best, and they might even make your computer act strangely. We recommend drivers made by NVIDIA. Although these drivers are not free, they work better and are more dependable.

You can install these NVIDIA drivers through the Software & Updates app. We recommend this method to users who prefer the GUI over the command line.

Step #1: Open Software and Updates

  • Go to the Applications menu and enter software and updates in the search bar.
  • Choose the Software and Updates application.

Step #2: Select the Additional Drivers tab

Wait for the application to fetch a list of extra drivers you can use for your GPU.

software & updates

The default choice is the driver that’s already installed on your computer. Note that If no drivers are installed by default, you will not see anything in the tab.

Step #3: Choose a Driver

Choose the most recent NVIDIA driver labeled as proprietary, tested from the list. This is the latest stable driver released by NVIDIA Corporation specifically for your GPU.

choose driver

  • Click Apply Changes.
  • Type in your password and wait for the installation process.

Step #4: Restart the Machine

Reboot your machine so that the system loads up the installed drivers instead of the default ones.

Method #2: Install NVIDIA Driver via the Command Line

Installing NVIDIA drivers via the command line is a great alternative to the GUI-based method.

Step #1: Search for NVIDIA Drivers

Access the terminal by pressing Ctrl+Alt+T or find it by searching for the terminal in the Applications menu.

Run the below command:

# apt search nvidia-driver

The output of the command will list the drivers you can install for your GPU.

Step #2: Update the System Package Repository

Like any other package, before you install the driver, update the system’s package repository. Use the following commands in sequence:

# sudo apt update

# sudo apt upgrade

Step #3: Install the Appropriate Driver for Your GPU

Pick a driver to install from the list of available GPU drivers. The recommended choice is the newest tested proprietary version. Note down the name of the driver so you can use it in later commands.

Next, run the following command to install the selected driver. Note that for this demonstration, we installed NVIDIA-driver-384, the latest tested proprietary driver for the GPU on our test system.

# sudo apt install [driver_name]

Step #4: Reboot the Machine

Use the following command to reboot your machine:

# sudo reboot

Method #3: Install NVIDIA Beta Drivers via the PPA Repository

The PPA repository lets developers share software that are not in the official Ubuntu repository. As such, it is a great way of installing the newest beta drivers.

Important: Since these drivers are in beta, they can make your system unstable and cause problems in image and video rendering.

Step #1: Add the PPA GPU Drivers Repository to the System

Include the graphics drivers repository in the system using this command:

# sudo add-apt-repository ppa:graphics-drivers/ppa

Type in your password and press Enter when prompted to confirm adding the repository.

Step #2: Find Your GPU Model and See the Available Drivers

To check your GPU model and see a list of drivers you can use, enter the following command:

# ubuntu-drivers devices

The result will display your GPU model and the drivers available for that particular GPU.

Step #3: Install NVIDIA Driver

Note down the name of the driver and then run the following command to install it:

# sudo apt install [driver_name]

As you can see, we installed the driver version NVIDIA-384 on our test system.

Alternatively, you can let the system install the suggested driver for you by running the following command:

# sudo ubuntu-drivers autoinstall

There were no modifications in this instance because the suggested driver is already in place.

Step #4: Restart the System

Restart your machine so the changes can occur. Use the standard reboot command for your system.

  • How to Uninstall NVIDIA Drivers

If you wish to remove the NVIDIA driver, it’s best to uninstall it completely using the –purge option with the apt command. The process has the following steps:

Step #1: View the Installed Packages

Use the following command to see which NVIDIA packages are installed on your system:

# dpkg -l | grep -i nvidia

The result will show a list of all NVIDIA packages currently on the system.

Note: You might also want to remove the ubuntu-desktop package because it’s linked to the nvidia-common package. However, you might need to reinstall it later if you delete it now.

Step #2: Purge NVIDIA Packages

Run the below command:

# sudo apt-get remove --purge '^nvidia-.*'

The command deletes all NVIDIA packages from the system.

If the ubuntu-desktop package gets deleted, reinstall it using this command:

# sudo apt-get install ubuntu-desktop.

Step #3: Reboot the System

Restart your system using the command sudo reboot. When you do this, the system will, by default, use the open-source Nouveau driver when starting up.

Tip solutie

Permanent

Voteaza

(6 din 16 persoane apreciaza acest articol)

Despre Autor

Leave A Comment?