Nvidia-smi has failed and couldn't communicate with NVIDIA driver

I have tried servel times of uninstall & reinstall the nvidia driver (NVIDIA-LINUX-x84_64-510.108.03.run), but still doesn’t work.
My reference cmds from here: CentOS Stream 8: NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver - #2 by han_tuch

nvidia-bug-report.log.gz (55.8 KB)

The installer message says it all:

The NVIDIA kernel module was successfully signed with a newly generated key pair. Would you like to delete the private signing key? (Answer: Yes)
An X.509 certificate containing the public signing key will be installed to /usr/share/nvidia/nvidia-modsign-crt-AFE45A82.der. The SHA1 fingerprint of this certificate is: AF:E4:5A:82:5C:82:F1:6E:46:E6:18:64:BC:41:F5:6D:82:D9:4D:E8.

This certificate must be added to a key database which is trusted by your kernel in order for the kernel to be able to verify the module signature.

Either add the key to the trusted key store or disable secure boot.

1 Like

I have tried to import the public signing key, but still not load the driver.
REF: How to add a key pair (public and private) to list of kernel's database which hold list of trusted keys - Unix & Linux Stack Exchange

mokutil --import  /usr/share/nvidia/nvidia-modsign-crt-AFE45A82.der

After I uncheck the “secure boot”, it was done.