

The nvidia-smi command should display information about your graphics card, if this command fails to show the details or throws an error after the command is entered, it means that the driver did not install correctly.

Verify that it is working by running nvidia-smi nvidia-smi (This is optional but recommended) sudo dnf install cuda-driver sudo dnf install nvidia-driver nvidia-settings The command below will download the latest stable driver available. Installing Nvidia drivers and settings applications. sudo dnf install kernel-devel-$(uname -r) kernel-headers-$(uname -r) Code language: JavaScript ( javascript ) Installing the kernel-devel and headers used by the drivers. sudo dnf config-manager -add-repo https: ///compute/cuda/repos/rhel8/x86_64/cuda-rhel8.repo Code language: JavaScript ( javascript ) If your Ubuntu computer has an NVIDIA GPU, you can choose between the open-source driver Nouveau and NVIDIA’s proprietary drivers.

Adding the official Nvidia drivers repository to our package managers repository list. (The step speed may vary depending on your internet connection) Update: In order for the driver to install and work correctly you need to disable secure boot, this is by design. The extra steps are out of the scope of this article. This works best on the default kernel that ships with Rocky Linux, if you have a custom Kernel or modified setup, there might be a need for extra steps. Here is how to install the official Nvidia drivers on Rocky Linux and it works flawlessly.
