DEV Community

loading...

How to fix Ubuntu NVIDIA driver is not loaded

simonpham profile image Simon Pham ・1 min read

I was using Ubuntu 20.04 on my PC with NVIDIA GTX 1060 card. Even after installed the driver from Additional Drivers, I got the below error when running nvidia-smi to check if the driver is working.

Additional Drivers

$ 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.

nvidia-settings 
ERROR: NVIDIA driver is not loaded
ERROR: Unable to load info from any available system
Enter fullscreen mode Exit fullscreen mode

After a lot of searching, I ended up with this solution:

To resolve the above issue, you can do these simple steps:
Step 1: Make sure you have nvidia-prime installed:

sudo apt install nvidia-prime
Enter fullscreen mode Exit fullscreen mode

Step 2: Run these commands in Terminal:

sudo prime-select nvidia
sudo rm /lib/modprobe.d/blacklist-nvidia.conf
sudo update-initramfs -u
Enter fullscreen mode Exit fullscreen mode

Step 3: Reboot

sudo reboot
Enter fullscreen mode Exit fullscreen mode

Step 4: Check again

nvidia-smi
Enter fullscreen mode Exit fullscreen mode

And ta-da! It's working.

nvidia-smi

Discussion (0)

Forem Open with the Forem app