Gỡ cài đặt nvidia driver linux

I am getting this error while doing the same…

while entering the cammond like : sudo apt install nvidia-driver-418

Reading package lists… Done
Building dependency tree
Reading state information… Done
You might want to run ‘apt --fix-broken install’ to correct these.
The following packages have unmet dependencies:
nvidia-dkms-418 : Depends: nvidia-kernel-common-418 but it is not going to be installed
nvidia-driver-418 : Depends: libnvidia-gl-418 [= 418.56-0ubuntu0~gpu18.10.1] but it is not going to be installed
Depends: nvidia-dkms-418 [= 418.56-0ubuntu0~gpu18.10.1] but 418.40.04-0ubuntu1 is to be installed
Depends: nvidia-kernel-source-418 [= 418.56-0ubuntu0~gpu18.10.1] but 418.40.04-0ubuntu1 is to be installed
Depends: libnvidia-compute-418 [= 418.56-0ubuntu0~gpu18.10.1] but it is not going to be installed
Depends: nvidia-compute-utils-418 [= 418.56-0ubuntu0~gpu18.10.1] but it is not going to be installed
Depends: libnvidia-decode-418 [= 418.56-0ubuntu0~gpu18.10.1] but it is not going to be installed
Depends: libnvidia-encode-418 [= 418.56-0ubuntu0~gpu18.10.1] but it is not going to be installed
Depends: nvidia-utils-418 [= 418.56-0ubuntu0~gpu18.10.1] but it is not going to be installed
Depends: xserver-xorg-video-nvidia-418 [= 418.56-0ubuntu0~gpu18.10.1] but it is not going to be installed
Depends: libnvidia-cfg1-418 [= 418.56-0ubuntu0~gpu18.10.1] but 418.40.04-0ubuntu1 is to be installed
Depends: libnvidia-ifr1-418 [= 418.56-0ubuntu0~gpu18.10.1] but it is not going to be installed
Depends: libnvidia-fbc1-418 [= 418.56-0ubuntu0~gpu18.10.1] but 418.40.04-0ubuntu1 is to be installed
Recommends: libnvidia-compute-418:i386 [= 418.56-0ubuntu0~gpu18.10.1]
Recommends: libnvidia-decode-418:i386 [= 418.56-0ubuntu0~gpu18.10.1]
Recommends: libnvidia-encode-418:i386 [= 418.56-0ubuntu0~gpu18.10.1]
Recommends: libnvidia-ifr1-418:i386 [= 418.56-0ubuntu0~gpu18.10.1]
Recommends: libnvidia-fbc1-418:i386 [= 418.56-0ubuntu0~gpu18.10.1]
Recommends: libnvidia-gl-418:i386 [= 418.56-0ubuntu0~gpu18.10.1]
E: Unmet dependencies. Try ‘apt --fix-broken install’ with no packages [or specify a solution].

How to uninstall proprietary NVIDIA graphics driver and switch back to Red Hat shipped nouveau graphics driver?

Solution Verified - Updated 2020-05-18T15:23:18+00:00 -

English

  • English
  • Japanese

Issue

  • What are the steps required to uninstall proprietary NVIDIA module and switch back to Red Hat shipped nouveau module?
  • How to set correct screen resolution with nouveau driver?

Environment

  • Red Hat Enterprise Linux 5
  • Red Hat Enterprise Linux 6
  • Red Hat Enterprise Linux 7
  • Proprietary NVIDIA module [nvidia.ko]
  • Red Hat shipped nouveau module [nouveau.ko]
  • xorg-x11-drv-nouveau package

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content

How can I uninstall Nvidia drivers on my Linux distribution?. There are two methods of installing Nvidia drivers on a Linux box, The first method is via OS repository, and the second method is installation from a binary package distributed by Nvidia.

Nvidia GPUs [graphics processing units] have exceptional parallel computing potential, much higher than that of CPUs. That is why GPUs are becoming the main choice for high-performance workloads.

Aside from gaming, Nvidia GPUs are also used for 3D rendering, mining, visualization, machine learning, AI, and in data centers. For example, phoenixNAP GPU dedicated servers use Nvidia Tesla GPUs.

In this tutorial, you will learn how to install the latest proprietary Nvidia drivers on Ubuntu 20.04.

Prerequisites

  • A machine running Ubuntu 20.04
  • An account with sudo/root permissions
  • An Nvidia GPU

Note: Learn why and how GPUs are used for machine learning and AI in our article on GPU Machine Learning.

Install Nvidia Driver Using GUI

Ubuntu comes with open-source Nouveau drivers for Nvidia GPUs out of the box. The Nouveau driver does not harness the GPU’s full power and sometimes performs worse or even causes system instability. Nvidia proprietary drivers are much more reliable and stable.

The first way to install Nvidia drivers is by using the GUI Software & Updates app.

Step 1: Open Software and Updates From the App Menu

1. Open the Applications menu and type “software and updates.”

2. Select the Software and Updates app.

Step 2: Click the Additional Drivers Tab

Wait for the app to download a list of additional drivers available for your GPU.

The driver installed on your machine is selected by default. It is usually an open-source Nouveau display driver.

Step 3: Choose a Driver

1. From the list, select the latest Nvidia driver labeled proprietary, tested. This is the latest stable driver published by Nvidia for your GPU.

2. Click Apply Changes.

3. Enter your password and wait for the installation to finish.

Step 4: Restart

Restart the machine for the changes to take effect.

Install Nvidia Driver via Command Line

The second way to install Nvidia drivers is by using the terminal.

Step 1: Search for Nvidia Drivers

1. Open the terminal by pressing Ctrl+Alt+T or search for “terminal” in the Applications menu.

2. Run the following command:

apt search nvidia-driver

The output shows a list of available drivers for your GPU.

Step 2: Update the System Package Repository

Before installing the driver, make sure to update the package repository. Run the following commands:

sudo apt update
sudo apt upgrade

Step 3: Install the Right Driver for Your GPU

1. Choose a driver to install from the list of available GPU drivers. The best fit is the latest tested proprietary version.

2. The syntax for installing the driver is:

sudo apt install [driver_name]

For this tutorial, we installed nvidia-driver-340, the latest tested proprietary driver for this GPU.

Step 4: Reboot

Reboot your machine with the following command:

sudo reboot

Install Nvidia Beta Drivers via PPA Repository

The PPA repository allows developers to distribute software that is not available in the official Ubuntu repositories. This means that you can install the latest beta drivers, however, at the risk of an unstable system.

To install the latest Nvidia drivers via the PPA repository, follow these steps:

Step 1: Add PPA GPU Drivers Repository to the System

1. Add the graphics drivers repository to the system with the following command:

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

2. Enter your password and hit Enter when asked if you want to add the repository.

Step 2: Identify GPU Model and Available Drivers

To verify which GPU model you are using and to see a list of available drivers, run the following command:

ubuntu-drivers devices

The output shows your GPU model as well as any available drivers for that specific GPU.

Step 3: Install Nvidia Driver

1. To install a specific driver, use the following syntax:

sudo apt install [driver_name]

For example, we installed the nvidia-340 driver version.

2. Alternatively, install the recommended driver automatically by running:

sudo ubuntu-drivers autoinstall

In this example, no changes were made as the recommended driver is already installed.

Step 4: Restart the System

Reboot the machine for the changes to take effect.

How to Uninstall Nvidia Driver

If you want to uninstall the proprietary Nvidia driver, the best option is to

sudo apt update
2 the driver.

Step 1: See Installed Packages

To check which Nvidia packages are installed on the system, run the following command:

dpkg -l | grep -i nvidia

The output returns a list of all Nvidia packages on the system.

See also our article on how to list installed packages on Ubuntu.

Note: The ubuntu-desktop package could also be purged because it is a dependency of the nvidia-common package, so you may need to reinstall it if it gets removed.

Step 2: Purge Nvidia Packages

1. Run the following command:

sudo apt update
0

The command purges every Nvidia package from the system.

2. If the ubuntu-desktop package is removed, reinstall it with the following command:

sudo apt update
1

Step 4: Reboot the System

Reboot your system by running

sudo apt update
3. By default, the system loads the open-source Nouveau driver during boot.

Note: Check out our other Nvidia installation guides:

Conclusion

You now know how to install proprietary Nvidia drivers on your system using the GUI app, official Ubuntu repository, or the PPA repository if you want the beta versions.

You also know how to uninstall Nvidia drivers if you want to go back to using the open-source Nouveau driver.

Chủ Đề