📅 2022-Jan-06 ⬩ ✍️ Ashwin Nanjappa ⬩ 🏷️ nvidia-smi ⬩ 📚 Archive
I installed a newer version of the nvidia driver successfully. But when I ran nvidia-smi, I got this error:
NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver
It seemed like there was a problem with the installed driver kernel modules.
First I removed all the driver modules associated with the current driver version XXX.YY:
$ sudo dkms remove nvidia/XXX.YY --all
Then installed them again to the current kernel:
$ sudo dkms install --force nvidia/XXX.YY -k $(uname -r)
Updated the initramfs of current kernel:
$ sudo update-initramfs -u
$ sync
Restarted the machine and nvidia-smi worked:
$ sudo shutdown -r now