Ubuntu Nvidia Drivers
Nvidia Graphics Processing Units (GPUs) contains the exceptional potential for parallel computing much higher as compared to the CPUs. These processing units are used for professional use in workspace and gaming. Also, Nvidia drivers are used within various data centers. So, GPU is becoming the primary selection for high-performance workloads.
Nvidia GPU is also used for mining, 3D rendering, AI, machine learning, visualization apart from gaming.
The X.org X server by default uses nouveau libre/free software drivers for all Nvidia drivers. Generally, the nouveau driver gives an excellent performance to the proprietary graphics device drivers of Nvidia for gaming and professional use.
Some key points of Nvidia drivers are discussed as follows:
Find Out Details About Our GPU
We can just naturally install the Nvidia driver when we have the Nvidia GPU in our system. We can enter the lshw command or hwinfo command for finding out details about our GPU.
The first command option is mentioned below:
If we don't have hwinfo, then we can install it by using the following command:
The second command option is mentioned below:
Installing Nvidia Driver With GUI
Ubuntu systems come with Nouveau drivers (open-source) for Nvidia GPUs. The Nouveau drivers do not harness the full power of GPU and sometimes work worse or even lead to system instability. The Nvidia proprietary drivers are more stable and reliable.
The initial way for installing the Nvidia drivers is with the help of the GUI Updates & Software app.
1. Open Software and Updates App Using App Menu
2. Select Additional Drivers Tab
We need to wait for this app for downloading the additional driver's list that exists for our GPU.
The driver which is installed on our machine is chosen by default. Usually, it is a Nouveau display driver (open-source).
3. Select a Driver
4. Reboot the System
Reboot the system for modifications to take effect.
Installing Nvidia Driver Using Command Line
It is the second way for installing Nvidia Drivers in which we will install this driver with the help of the terminal.
1. Find Nvidia Drivers
2. Update Our System Package Repository
Ensure to update the system package repository before going to install the drivers.
Execute the command which is mentioned below:
3. Installing the Accurate Driver For Our GPU
4. Restart the System
Restart our system using the below command:
Installing Nvidia Beta Drivers Using PPA Repository
A PPA repository permits developers to share software that doesn't exist inside the official repositories of Ubuntu. It means that we can install the current beta drivers, but at the chance of an unstable system.
We need to follow some of the steps which are mentioned below for installing the current Nvidia drivers using the PPA repository.
1. Include the PPA GPU Drivers Repository in Our System
i. Add a repository of the graphics drivers to our system using the below command:
ii. Type our password and press the Enter button when prompted if we wish to include the repoitory.
2. Recognize Model of GPU and Existed Drivers
We can execute the below command for verifying which of the model of GPU we are using and for checking the list of existed drivers:
The result will show the model of our GPU and any existed driver as well for that particular GPU.
3. Installing the Nvidia Driver
4. Reboot the System
Reboot our system for the modifications to take effect using a command. The command is mentioned as follows:
Uninstalling Nvidia Driver
In case, we need to uninstall the Nvidia driver, then the remove --purge option is the best.
1. Check Installed Packages
To see which of the Nvidia package is installed on our system, we can execute the command which is mentioned below:
The result is showing each Nvidia package's list on our system.
Important: A package of the Ubuntu-desktop can be purged as well because it's the nvidia-common package's dependency. Hence, we may have to reinstall the package when it gets deleted.
2. Purge the Packages of Nvidia
i. We need to execute the command which is mentioned below:
The above command will purge all Nvidia packages through the system.
ii. In case, A package of the ubuntu-desktop is deleted, then reinstall it using the below-mentioned command:
3. Restart the System
Restart our system by executing the following command:
The system will by default load a Nouveau driver (open-source) during boot.
Turn on the Command-line application and enter the nvidia-smi command to check the process and info of GPU that are using the Nvidia GPU:
The above command is a utility of the command-line that facilitates various capabilities of management and monitoring for each of Tesla of Nvidia, GeForce, and GRID devices from higher and Fermi architecture families. We can check running applications on our GPU and the temperature of GPU.
How do we configure an NVIDIA graphics driver?
A command, i.e., nvidia-settings is used for starting a GUI tool to configure the NVIDIA graphics driver. It is helpful to check all the information of GPU and configure more than one external monitor/screen linked to our system.
Turn on the command-line window and then enter the command which is mentioned as follows:
If we wish to save the settings, then start this command like below:
Also, we can switch the drivers without using the Windows desktop or X GUI. For these types of objectives, Ubuntu provides a specific command which is known as ubuntu-drivers. These drivers are used for managing the drivers (binary) for Nvidia drivers and other types of devices. It is a replacement for the apt-get command or apt command that we earlier used.
Display Each Driver Package which uses to our current system
Display Each OEM Enablement Package which uses to the system
Display Each Hardware Nvidia Device that requires drivers and packages