In this article, I will show you how to install NVIDIA GPU drivers on CentOS Stream 9. So, let’s get started.”
Table of Contents
- Checking if the System Has Any NVIDIA GPU Installed
- Disable Secure Boot from the BIOS
- Enabling the EPEL Repository on CentOS Stream 9
- Installing the Required Dependencies and Build Tools for Compiling NVIDIA Kernel Modules
- Adding the Official NVIDIA CUDA Package Repository on CentOS Stream 9
- Installing the Latest NVIDIA GPU Drivers on CentOS Stream 9
- Checking If NVIDIA Drivers are Installed Properly
- Conclusion
- References
Checking if the System has any NVIDIA GPU Installed
You can check whether your computer has an NVIDIA GPU installed with the following command:
As you can see, I have an NVIDIA GeForce GTX 1050 Ti GPU installed on my computer. You may have a different NVIDIA GPU installed.
By default, the open-source Nouveau GPU drivers are used1 instead of the proprietary NVIDIA GPU drivers2 on CentOS Stream 9. Once you install the proprietary NVIDIA GPU drivers, you will see that they are used instead of the open-source Nouveau GPU drivers.
$ lsmod | grep nvidia
Disable Secure Boot From the BIOS
For NVIDIA GPU drivers to work on CentOS Stream 9, you must disable secure boot from the BIOS of your motherboard if it uses the UEFI firmware for booting operating systems.
The process of disabling secure boot from the BIOS of UEFI-capable motherboards is vendor-specific (different for each motherboard vendor like ASUS, MSI, Gigabyte, AsRock, etc.). So, it’s best to check the user manual of your motherboard to find out how to disable secure boot on your motherboard.
For older BIOS-based motherboards, you don’t need to do anything for the NVIDIA GPU drivers to work on CentOS Stream 9.
Enabling the EPEL Repository on CentOS Stream 9
To install the NVIDIA GPU drivers on CentOS Stream 9, you will have to install the required build tools and the required dependency libraries for compiling the NVIDIA kernel modules. Some of these are available in the CentOS Stream 9 EPEL repository. In this section, I am going to show you how to enable the EPEL repository on CentOS Stream 9.
First, update the DNF package repository cache with the following command:
Enable the official CentOS Stream 9 CRB package repository with the following command:
Install the epel-release and epel-next-release packages with the following command:
To confirm the installation, press Y and then press <Enter>.
To confirm the GPG key, press Y and then press <Enter>.
The epel-release and the epel-next-release packages should be installed, and the EPEL repository should be enabled.
For the changes to take effect, update the DNF package repository cache with the following command:
Installing the Required Dependencies and Build Tools for Compiling NVIDIA Kernel Modules
To install the required build tools and the required dependency libraries for compiling the NVIDIA kernel modules, run the following command:
To confirm the installation, press Y and then press <Enter>.
The required packages are being downloaded from the internet. It will take a while to complete.
Once the packages are downloaded, you will be asked to confirm the GPG key of the CentOS official package repository.
To confirm the GPG key, press Y and then press <Enter>.
To confirm the GPG key of the EPEL repository, press Y and then press <Enter>.
The installation should continue.
At this point, the required dependency libraries and build tools for compiling the NVIDIA kernel module should be installed.
Adding the Official NVIDIA CUDA Package Repository on CentOS Stream 9
To add the official NVIDIA CUDA package repository on CentOS Stream 9, run the following command:
For the changes to take effect, update the DNF package repository cache with the following command:
Installing the Latest NVIDIA GPU Drivers on CentOS Stream 9
To install the latest version of the NVIDIA GPU drivers on CentOS Stream 9, run the following command:
To confirm the installation, press Y and then press <Enter>.
All the NVIDIA GPU drivers packages and the required dependency packages are being downloaded from the internet. It will take a while to complete.
Once the packages are downloaded, you will be asked to confirm the GPG key of the official NVIDIA package repository. Press Y and then press <Enter> to confirm the GPG key.
The installation should continue. It will take a while to complete.
The installation should continue. It will take a while to complete.
For the changes to take effect, restart your computer with the following command:
Checking if NVIDIA Drivers are Installed Properly
Once your computer boots, you should see that the proprietary NVIDIA GPU drivers are used1 instead of the open-source Nouveau GPU drivers2.
$ lsmod | grep nouveau
You should also find the NVIDIA X Server Settings app in the Application Menu of CentOS Stream 9. Click on it.
The NVIDIA X Server Settings app should run without any errors, and it should show a lot of information related to your installed NVIDIA GPU.
You should also be able to run the NVIDIA command-line programs like nvidia-smi.
Conclusion
In this article, I have shown you how to add the official NVIDIA CUDA repository on CentOS Stream 9. I have also shown you how to install the latest version of the proprietary NVIDIA GPU drivers on CentOS Stream 9.
References
from https://ift.tt/MIRDs5e
0 Comments