Rocky 8 - nvdia-smi has failed because it couldn’t communicate with the NVIDIA driver

Hello
If like me you are constantly failing to install NVIDIA & CUDA drivers using this popular method

and getting the “NVIDIA-SMI has failed because it couldn’t communicate with the NVIDIA driver” error when you launch nvidia-smi in the terminal, then maybe this might help.

  1. make sure that secure boot is turned off in the BIOS
  2. Read carefully the link below
    GeForce RTX 2080 Rocky Linux release 8.6 couldn't communicate with the NVIDIA driver - Linux - NVIDIA Developer Forums
  3. What saved me was
sudo dkms install nvidia/535.86.10

swap out /535.86.10 for the NVIDIA version that you have installed.
4. reboot and the dkms did its job properly.
This has solved my problem on 2 separate machines. I hope this helps someone.

2 Likes