PowerEdge: Come installare il driver NVIDIA in Red Hat Enterprise Linux

Summary: Questo articolo descrive la compilazione e l'installazione di un driver NVIDIA con Dynamic Kernel Module Support (DKMS) in Red Hat Enterprise Linux con "Secure Boot" disabilitato.

This article applies to This article does not apply to This article is not tied to any specific product. Not all product versions are identified in this article.

Instructions

Questo articolo descrive come compilare e installare un driver NVIDIA con DKMS in Red Hat Enterprise Linux con "Secure Boot" disabilitato.

Prima di iniziare, assicurarsi che l'opzione Secure Boot sia disabilitata nel BIOS. Ciò è dovuto al fatto che questa opzione di installazione utilizza DKMS per compilare il driver NVIDIA dal codice sorgente di qualsiasi kernel attualmente in esecuzione. Non esiste la firma del fornitore per il driver compilato. Se l'avvio sicuro è abilitato, il driver autocompilato non viene caricato con l'errore Required key not available. Verifica dello stato corrente tramite comando mokutil --sb-state in Red Hat Enterprise Linux e modificarlo nel BIOS premendo F2 durante il POST del server.

Se è richiesto l'avvio protetto o se si preferisce un driver precompilato, consultare il seguente articolo per installarlo.  Come installare il driver NVIDIA online in Red Hat Enterprise Linux con la funzione Secure Boot abilitata.

  1. Scaricare il driver richiesto dal sito NVIDIA .Questo link ipertestuale indirizza a un sito web esterno a Dell Technologies.
    1. Selezionare la versione corretta di Red Hat Enterprise Linux, ad esempio Red Hat Enterprise Linux 8.
    2. Selezionare la versione corretta di CUDA (Compute Unified Device Architecture) richiesta con il toolkit CUDA che si intende installare, ad esempio 12.2.
    3. Il pacchetto di download è un RPM, ad esempio nvidia-driver-local-repo-rhel8-535.54.03-1.0-1.x86_64.rpm
  2. Installare l RPM. In questo modo viene creato un repository locale.
[root@rhel87 ~]# ls
anaconda-ks.cfg  nvidia-driver-local-repo-rhel8-535.54.03-1.0-1.x86_64.rpm
[root@rhel87 ~]# yum localinstall ./nvidia-driver-local-repo-rhel8-535.54.03-1.0-1.x86_64.rpm
...output skipped...
[root@rhel87 ~]# yum repolist
Updating Subscription Management repositories.
Unable to read consumer identity

This system is not registered with an entitlement server. You can use subscription-manager to register.

repo id                              repo name
my-rhel-87-AppStream-iso             my RHEL 87 AppStream iso
my-rhel-87-BaseOS-iso                my RHEL 87 BaseOS iso
my-rhel-extra-rpms                   my RHEL extra rpms
nvidia-driver-local-rhel8-535.54.03  nvidia-driver-local-rhel8-535.54.03
[root@rhel87 ~]#
  1. Installare DKMS. DKMS non è in Red Hat Enterprise Linux. È disponibile in pacchetti aggiuntivi per Enterprise Linux (EPEL).Questo link ipertestuale indirizza a un sito web esterno a Dell Technologies.  Per ulteriori informazioni su DKMS, consultare l'articolo di Red Hat DKMS è fornito in Red Hat Enterprise Linux Questo link ipertestuale indirizza a un sito web esterno a Dell Technologies.
[root@rhel87 ~]# yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
[root@rhel87 ~]# yum install dkms
  1. Se necessario, è possibile disattivare o rimuovere l'EPEL.
# to disable epel, edit the following configuration and change to "enabled=0" 
[root@rhel87 ~]# vi /etc/yum.repos.d/epel.repo 

# to remove the epel 
[root@rhel87 ~]# yum remove epel-release
  1. Installare gli strumenti di compilazione e l'intestazione del kernel. Assicurarsi che l'abbonamento Red Hat sia collegato.
[root@rhel87 ~]# yum groupinstall "Development Tools"
[root@rhel87 ~]# yum install kernel-devel-$(uname -r)
  1. Installare il driver cuda
[root@rhel87 ~]# yum install cuda-driver
  1. Verificare che il driver sia stato installato correttamente.
[root@rhel87 ~]# dkms status
nvidia/535.54.03, 4.18.0-425.3.1.el8.x86_64, x86_64: installed
[root@rhel87 ~]#
  1. Se lo stato indicato sopra non è installato, ma invece è Aggiunto, è possibile crearlo.
[root@rhel87 ~]# dkms build nvidia/535.54.03
  1. Se lo stato designato è stato creato, è possibile installarlo.
[root@rhel87 ~]# dkms install nvidia/535.54.03
  1. Se lo stato non è riuscito durante la creazione o l'installazione, esaminare i registri nel seguente percorso:
[root@rhel87 ~]# ls /var/lib/dkms/nvidia/535.54.03/4.18.0-425.3.1.el8.x86_64/x86_64/log/make.log
[root@rhel87 ~]#
  1. Riavviare il server dopo aver installato il driver NVIDIA.
[root@rhel87 ~]# systemctl reboot
  1. Verificare che il driver sia attivo e funzionante.
[root@rhel87 ~]# lsmod | grep nvidia
nvidia_drm             73728  0
nvidia_modeset       1306624  1 nvidia_drm
nvidia_uvm           1523712  0
nvidia              56426496  2 nvidia_uvm,nvidia_modeset
drm_kms_helper        176128  4 qxl,nvidia_drm
drm                   565248  7 drm_kms_helper,qxl,nvidia,drm_ttm_helper,nvidia_drm,ttm
[root@rhel87 ~]# nvidia-smi
Tue Jul 25 12:00:29 2023
+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 535.54.03              Driver Version: 535.54.03    CUDA Version: 12.2     |
|-----------------------------------------+----------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |         Memory-Usage | GPU-Util  Compute M. |
|                                         |                      |               MIG M. |
|=========================================+======================+======================|
|   0  Tesla P100-PCIE-12GB           Off | 00000000:07:00.0 Off |                    0 |
| N/A   33C    P0              29W / 250W |      0MiB / 12288MiB |      2%      Default |
|                                         |                      |                  N/A |
+-----------------------------------------+----------------------+----------------------+

+---------------------------------------------------------------------------------------+
| Processes:                                                                            |
|  GPU   GI   CI        PID   Type   Process name                            GPU Memory |
|        ID   ID                                                             Usage      |
|=======================================================================================|
|  No running processes found                                                           |
+---------------------------------------------------------------------------------------+
[root@rhel87 ~]# modinfo nvidia
filename:       /lib/modules/4.18.0-425.3.1.el8.x86_64/extra/nvidia.ko.xz
firmware:       nvidia/535.54.03/gsp_tu10x.bin
firmware:       nvidia/535.54.03/gsp_ga10x.bin
alias:          char-major-195-*
version:        535.54.03
supported:      external
license:        NVIDIA
rhelversion:    8.7
srcversion:     EA9C7EF32617E104C8240C4



In caso di problemi, raccogliere i seguenti registri e contattare il supporto Dell:

  • sosreport
  • I file di log menzionati in precedenza in build o make se la build del driver non è riuscita
  • Qualsiasi /var/log/nvidia-installer.logo qualsiasi log menzionato nell'output durante l'installazione

Altre informazioni da sapere:

  • Se Red Hat Enterprise Linux è installato e avviato con graphical.target, è possibile che venga visualizzata una schermata nera dopo il riavvio. La soluzione consiste nello spostare /etc/X11/xorg.conf.d/10-nvidia.conf dalla cartella X11 e riavviare il server.
  • Se si desidera eseguire il passthrough della GPU a una VM in KVM con graphical.target, l'operazione ha esito negativo. La soluzione consiste nell'avviare l'hypervisor Red Hat Enterprise Linux in multi-user.target perché così graphical.target impedisce lo scaricamento del driver NVIDIA prima di passare alla macchina virtuale.

Affected Products

Red Hat Enterprise Linux Version 7, Red Hat Enterprise Linux Version 9, Red Hat Enterprise Linux Version 8

Products

DSS 8440, Poweredge C4140, PowerEdge C6525, PowerEdge R640, PowerEdge R650, PowerEdge R6515, PowerEdge R6525, PowerEdge R740, PowerEdge R740XD, PowerEdge R7425, PowerEdge R750, PowerEdge R750XA, PowerEdge R7515, PowerEdge R7525, PowerEdge R840 , PowerEdge R940xa, PowerEdge T550, PowerEdge T640, PowerEdge XE2420, PowerEdge XE7420, PowerEdge XE9680 ...
Article Properties
Article Number: 000216077
Article Type: How To
Last Modified: 06 Dec 2024
Version:  5
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.