# TUTORIAL for NVIDIA GPU

**URL:** <https://forums.rockylinux.org/t/tutorial-for-nvidia-gpu/4234>\
**Category:** Rocky Linux Help & Support\
**Created:** [October 7, 2021, 4:07am UTC](https://forums.rockylinux.org/t/tutorial-for-nvidia-gpu/4234 "2021-10-07T04:07:12Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![adelia](https://avatars.discourse-cdn.com/v4/letter/a/c57346/32.png) [@adelia](https://forums.rockylinux.org/u/adelia)\
**Post date:** [October 7, 2021, 4:07am UTC](https://forums.rockylinux.org/t/tutorial-for-nvidia-gpu/4234/1 "2021-10-07T04:07:12Z")

</div>

Here is a no nonsense tutorial on how to get nvidia gpu working with Rocky Linux desktop! It works great on nvidia rtx 2080 and others.

1. sudo dnf update && sudo dnf upgrade -y

2. sudo dnf install epel-release

3. sudo dnf config-manager --add-repo [https://developer.download.nvidia.com/compute/cuda/repos/rhel8/x86\_64/cuda-rhel8.repo](https://developer.download.nvidia.com/compute/cuda/repos/rhel8/x86_64/cuda-rhel8.repo)

4. sudo dnf install kernel-devel-$(uname -r) kernel-headers-$(uname -r)

5. sudo dnf install nvidia-driver nvidia-settings

6. sudo dnf install cuda-driver

7. sudo reboot now

---

<div class="post-metadata">

**Author:** ![jlehtone](https://avatars.discourse-cdn.com/v4/letter/j/e9a140/32.png) [@jlehtone](https://forums.rockylinux.org/u/jlehtone)\
**Post date:** [October 7, 2021, 8:58am UTC](https://forums.rockylinux.org/t/tutorial-for-nvidia-gpu/4234/2 "2021-10-07T08:58:31Z")

</div>

Nice, but there is an another version (particularly if one does not need CUDA):

1. sudo dnf update
2. sudo reboot
3. sudo dnf install elrepo-release
4. sudo dnf install nvidia-detect
5. sudo dnf install $(nvidia-detect)
6. sudo reboot

Note though that you definitely do not want both ELRepo and NVidia’s repo simultaneously enabled.

---

<div class="post-metadata">

**Author:** ![adelia](https://avatars.discourse-cdn.com/v4/letter/a/c57346/32.png) [@adelia](https://forums.rockylinux.org/u/adelia)\
**Post date:** [October 7, 2021, 9:27am UTC](https://forums.rockylinux.org/t/tutorial-for-nvidia-gpu/4234/3 "2021-10-07T09:27:59Z")

</div>

cool, thank you!! I will re-install in a day or so and report back here on how the newer version worked out. I take it you are saying I should use your version? I do not even know what cuda is for so i dont need cuda one would assume?

---

<div class="post-metadata">

**Author:** ![krono86](https://avatars.discourse-cdn.com/v4/letter/k/71c47a/32.png) [@krono86](https://forums.rockylinux.org/u/krono86)\
**Post date:** [October 14, 2021, 12:03pm UTC](https://forums.rockylinux.org/t/tutorial-for-nvidia-gpu/4234/4 "2021-10-14T12:03:51Z")

</div>

CUDA is the NVIDIA framework for GPU parallel programming.

Ivan

---

<div class="post-metadata">

**Author:** ![mach281](https://avatars.discourse-cdn.com/v4/letter/m/a8b319/32.png) [@mach281](https://forums.rockylinux.org/u/mach281)\
**Post date:** [November 7, 2021, 1:36am UTC](https://forums.rockylinux.org/t/tutorial-for-nvidia-gpu/4234/5 "2021-11-07T01:36:52Z")

</div>

Hi. After performing the above steps and rebooting, I am still running with nouveau. Is there another step to get the NVIDIA drivers working?

---

<div class="post-metadata">

**Author:** ![jlehtone](https://avatars.discourse-cdn.com/v4/letter/j/e9a140/32.png) [@jlehtone](https://forums.rockylinux.org/u/jlehtone)\
**Post date:** [November 7, 2021, 10:40am UTC](https://forums.rockylinux.org/t/tutorial-for-nvidia-gpu/4234/6 "2021-11-07T10:40:34Z")

</div>

We have listed to mutually exclusive sets of steps. Which ones did you use?

---

<div class="post-metadata">

**Author:** ![mach281](https://avatars.discourse-cdn.com/v4/letter/m/a8b319/32.png) [@mach281](https://forums.rockylinux.org/u/mach281)\
**Post date:** [November 7, 2021, 3:16pm UTC](https://forums.rockylinux.org/t/tutorial-for-nvidia-gpu/4234/7 "2021-11-07T15:16:27Z")

</div>

I used the first method listed. To confirm, I’ve installed Nvidia 495.29.05 and confirmed it with nvidia-settings. The problem is that according to “sudo lshw -c video” the driver=nouveau. How can I tell the OS to use the Nvidia? Rebooting after the procedure does not change it.

---

<div class="post-metadata">

**Author:** ![jlehtone](https://avatars.discourse-cdn.com/v4/letter/j/e9a140/32.png) [@jlehtone](https://forums.rockylinux.org/u/jlehtone)\
**Post date:** [November 7, 2021, 6:32pm UTC](https://forums.rockylinux.org/t/tutorial-for-nvidia-gpu/4234/8 "2021-11-07T18:32:29Z")

</div>

I don’t know how the content from NVidia’s own repo installs.

- The ELrepo packages apped `nouveau.modeset=0 rd.driver.blacklist=nouveau plymouth.ignore-udev` to kernel command-line options
- They also add

```auto
Section "Device"
	Identifier "Videocard0"
	Driver "nvidia"
EndSection

```

into X11 configuration. Furthermore, they did disable Wayland too. (Not sure if they still do.)

---

<div class="post-metadata">

**Author:** ![mach281](https://avatars.discourse-cdn.com/v4/letter/m/a8b319/32.png) [@mach281](https://forums.rockylinux.org/u/mach281)\
**Post date:** [November 8, 2021, 1:42am UTC](https://forums.rockylinux.org/t/tutorial-for-nvidia-gpu/4234/9 "2021-11-08T01:42:23Z")

</div>

OK now. To recap: I had two issues. First, in order to disengage nouveau, I had to get back to the Rocky/Fedora boot menu which was configured secondary to Manjaro’s. (It’s seems strange to me that nouveau can only be blacklisted in the grub bootmenu, not in the OS itself.) Once I did that I finally got to the install with the nvidia driver. However, the nvidia install I used from the 1st post here wasn’t working properly as the screen was stuck at a stretched 1024x768 res. I needed to restart the procedure so I removed the nvidia driver with:

`sudo dnf remove ‘_nvidia_’

after which I was back with nouveau. From there I ran jlehtone’s steps in post 2. That went smoothly and I now seem to have a correctly configured desktop with nvidia drivers. In my setup I just have a couple extra steps using the efi setting boot menu.

---

<div class="post-metadata">

**Author:** ![ligenix](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/ligenix/32/1285_2.png) [@ligenix](https://forums.rockylinux.org/u/ligenix)\
**Post date:** [January 19, 2022, 11:30am UTC](https://forums.rockylinux.org/t/tutorial-for-nvidia-gpu/4234/10 "2022-01-19T11:30:32Z")

</div>

There are some important information here if you want to use NVIDIA GPU within a virtual machine :

> **[Setting up an NVIDIA GPU for a virtual machine in Red Hat Virtualization Red...](https://access.redhat.com/documentation/en-us/red_hat_virtualization/4.3/html-single/setting_up_an_nvidia_gpu_for_a_virtual_machine_in_red_hat_virtualization/index)**
>
> This document describes how to use a host with a graphics processing unit (GPU) to run virtual machines in Red Hat Virtualization for graphics-intensive tasks and software that cannot run without a GPU.

---

<div class="post-metadata">

**Author:** ![desercat](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/desercat/32/1192_2.png) [@desercat](https://forums.rockylinux.org/u/desercat)\
**Post date:** [January 20, 2022, 8:38am UTC](https://forums.rockylinux.org/t/tutorial-for-nvidia-gpu/4234/11 "2022-01-20T08:38:49Z")

</div>

'cuda are fish that swim in da sea.

---

<div class="post-metadata">

**Author:** ![timppu](https://avatars.discourse-cdn.com/v4/letter/t/a6a055/32.png) [@timppu](https://forums.rockylinux.org/u/timppu)\
**Post date:** [April 30, 2023, 8:51pm UTC](https://forums.rockylinux.org/t/tutorial-for-nvidia-gpu/4234/12 "2023-04-30T20:51:22Z")

</div>

> [@jlehtone](#):
>
> 1. sudo dnf update
> 2. sudo reboot
> 3. sudo dnf install elrepo-release
> 4. sudo dnf install nvidia-detect
> 5. sudo dnf install $(nvidia-detect)
> 6. sudo reboot

Before performing step 5, I checked “nvidia-detect -v”, which gives the following:

> nvidia-detect -v  
> Probing for supported NVIDIA devices…  
> [8086:3e9b] Intel Corporation CoffeeLake-H GT2 [UHD Graphics 630]  
> [10de:1cbc] NVIDIA Corporation GP107GLM [Quadro P600 Mobile]  
> This device requires the current 525.85.05 NVIDIA driver  
> WARNING: Xorg log file /var/log/Xorg.0.log does not exist  
> WARNING: Unable to determine Xorg ABI compatibility  
> WARNING: The driver for this device does not support the current Xorg version  
> An Intel display controller was also detected

So what to make of that? Am I stuck with nouveau drivers, or should I be able to install and use 525.85.05 Nvidia drivers ok?

---

<div class="post-metadata">

**Author:** ![desercat](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/desercat/32/1192_2.png) [@desercat](https://forums.rockylinux.org/u/desercat)\
**Post date:** [July 23, 2023, 10:34pm UTC](https://forums.rockylinux.org/t/tutorial-for-nvidia-gpu/4234/13 "2023-07-23T22:34:18Z")

</div>

HUMMMMMM

OK Here is what I got:

## Downloading Packages: nvidia-detect-525.85.05-1.el9.x86\_64.rpm 48 kB/s | 24 kB 00:00

Total 34 kB/s | 24 kB 00:00  
[ELRepo.org](http://ELRepo.org) Community Enterprise Linux Repository - el9 1.6 MB/s | 1.7 kB 00:00  
Importing GPG key 0xBAADAE52:  
Userid : “[elrepo.org](http://elrepo.org) (RPM Signing Key for [elrepo.org](http://elrepo.org)) [secure@elrepo.org](mailto:secure@elrepo.org)”  
Fingerprint: 96C0 104F 6315 4731 1E0B B1AE 309B C305 BAAD AE52  
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-elrepo.org  
Is this ok [y/N]: y  
Key imported successfully  
Running transaction check  
Transaction check succeeded.  
Running transaction test  
Transaction test succeeded.  
Running transaction  
Preparing : 1/1  
Installing : nvidia-detect-525.85.05-1.el9.x86\_64 1/1  
Running scriptlet: nvidia-detect-525.85.05-1.el9.x86\_64 1/1  
Verifying : nvidia-detect-525.85.05-1.el9.x86\_64 1/1

Installed:  
nvidia-detect-525.85.05-1.el9.x86\_64

Complete!

* * *

root@ocelot/home/dcat nvidia-detect -v  
Probing for supported NVIDIA devices…  
[10de:1c82] NVIDIA Corporation GP107 [GeForce GTX 1050 Ti]  
This device requires the current 525.85.05 NVIDIA driver  
WARNING: Xorg log file /var/log/Xorg.0.log does not exist  
WARNING: Unable to determine Xorg ABI compatibility  
WARNING: The driver for this device does not support the current Xorg version

* * *

The last time I tried to install the NVidia drivers it blew up in my face. Not eager to repeat the experience.

D’ Cat

---

<div class="post-metadata">

**Author:** ![jlehtone](https://avatars.discourse-cdn.com/v4/letter/j/e9a140/32.png) [@jlehtone](https://forums.rockylinux.org/u/jlehtone)\
**Post date:** [July 24, 2023, 6:25am UTC](https://forums.rockylinux.org/t/tutorial-for-nvidia-gpu/4234/14 "2023-07-24T06:25:15Z")

</div>

> [@desercat](#):
>
> ```plaintext
> WARNING: Xorg log file /var/log/Xorg.0.log does not exist
> WARNING: Unable to determine Xorg ABI compatibility
> 
> ```

It seems that the `nvidia-detect` reads the version of X11 from the `/var/log/Xorg.0.log`  
Your system does not have the `/var/log/Xorg.0.log` yet – you probably have not started X11. Not even once.

The ELRepo driver is built for EL8 and does support the Xorg that is provided by EL8.  
Therefore, the “does not support” warning message is false.

---

<div class="post-metadata">

**Author:** ![gadgetaccess](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/gadgetaccess/32/4362_2.png) [@gadgetaccess](https://forums.rockylinux.org/u/gadgetaccess)\
**Post date:** [June 11, 2024, 10:59am UTC](https://forums.rockylinux.org/t/tutorial-for-nvidia-gpu/4234/16 "2024-06-11T10:59:33Z")

</div>

Team!  
I’ve been trawling this (fantastic) forum - Trying to get Rocky Linux 9.3 and 9.4 working with my NVIDIA A100 GPU… No luck.

Error:

[8.722326] nvidia-nvlink: Nvlink Core is being initialized, major device num ber 239  
[8.722333] NVRM: The NVIDIA GPU 0000:02:00.0 (PCI ID: 10de:20b0)  
NVRM: installed in this system is not supported by the  
NVRM: NVIDIA 555.42.02 driver release.  
NVRM: Please see ‘Appendix A - Supported NVIDIA GPU Products’  
NVRM: in this release’s README, available on the operating system  
NVRM: specific graphics driver download page at [www.nvidia.com](http://www.nvidia.com).

Any hints as to the issue above? (NVIDIA docs suggests otherwise on the compatibility.)

---

<div class="post-metadata">

**Author:** ![jlehtone](https://avatars.discourse-cdn.com/v4/letter/j/e9a140/32.png) [@jlehtone](https://forums.rockylinux.org/u/jlehtone)\
**Post date:** [June 11, 2024, 11:59am UTC](https://forums.rockylinux.org/t/tutorial-for-nvidia-gpu/4234/17 "2024-06-11T11:59:33Z")

</div>

> [@gadgetaccess](#):
>
> The NVIDIA GPU 0000:02:00.0 (PCI ID: 10de:20b0)

There is no “A100” on the list: [Linux x64 (AMD64/EM64T) Display Driver | 555.42.02 | Linux 64-bit | NVIDIA](https://www.nvidia.com/Download/driverResults.aspx/224751/en-us/)  
But they do list for “Data Center Driver”: [Data Center Driver for Linux RHEL 9 | 550.90.07 | Linux 64-bit RHEL 9 | NVIDIA](https://www.nvidia.com/Download/driverResults.aspx/226775/en-us/)

The latter seems to download an RPM?

---

<div class="post-metadata">

**Author:** ![gadgetaccess](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/gadgetaccess/32/4362_2.png) [@gadgetaccess](https://forums.rockylinux.org/u/gadgetaccess)\
**Post date:** [June 11, 2024, 12:22pm UTC](https://forums.rockylinux.org/t/tutorial-for-nvidia-gpu/4234/19 "2024-06-11T12:22:59Z")

</div>

Thanks very much for the reply. Appreciated. Well spotted. I’d incorrectly assumed that the A100 GPU was supported in the repo versions. I can’t get that one to install on Rocky 9.3 or 4 so it looks like I’ll have to persist trying that path on a clean OS build.

---

<div class="post-metadata">

**Author:** ![gadgetaccess](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/gadgetaccess/32/4362_2.png) [@gadgetaccess](https://forums.rockylinux.org/u/gadgetaccess)\
**Post date:** [June 11, 2024, 10:46pm UTC](https://forums.rockylinux.org/t/tutorial-for-nvidia-gpu/4234/20 "2024-06-11T22:46:38Z")

</div>

Hi Guys - Worked it out. Turns out that the notes aren’t clear at all on what supports what…  
The A100 needs the Enterprise AEI flavour of drivers (create an NVIDIA Enterprise Trial login to download etc). Then you can download from their portal a special RHEL9 driver (RPM) and that just works first time on RL9.4 - No fussing around at all!

Hope that helps someone with an A100 GPU get their sanity restored.

---

<div class="post-metadata">

**Author:** ![telahee](https://avatars.discourse-cdn.com/v4/letter/t/f1d935/32.png) [@telahee](https://forums.rockylinux.org/u/telahee)\
**Post date:** [September 25, 2024, 5:49pm UTC](https://forums.rockylinux.org/t/tutorial-for-nvidia-gpu/4234/21 "2024-09-25T17:49:10Z")

</div>

This did not work for me. I still get the following error when executing `nvidia-smi`

`NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.`

This is what I get when I run `nvidia-detect -v`

```auto
[telahee@localhost ~]$ nvidia-detect -v
Probing for supported NVIDIA devices...
[10de:1ff2] NVIDIA Corporation TU117GL [T400 4GB]
This device requires the current 550.107.02 NVIDIA driver kmod-nvidia

```

I also checked `lsmod`

```auto
[telahee@localhost ~]$ lsmod|grep -i nouveau
[telahee@localhost ~]$ lsmod|grep -i nvidia

```

And I see nothing. I’m not sure if the driver is not installed properly or if it is misconfigured and so is not being loaded.
