DEV Community

Simon Pham
Simon Pham

Posted on

3 1

How to fix Ubuntu NVIDIA driver is not loaded

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

Heroku

This site is built on Heroku

Join the ranks of developers at Salesforce, Airbase, DEV, and more who deploy their mission critical applications on Heroku. Sign up today and launch your first app!

Get Started

Top comments (3)

Collapse
 
emreshepherd profile image
Emre

It didn't work for Ubuntu 22. There is still the same error. Please, someone do find a solution for this problem.

Collapse
 
emreshepherd profile image
Emre

I reinstalled Ubuntu 22, and then solved.

Collapse
 
vividvibe profile image
Jamie Kitchens

When I issue the command: 'sudo rm /lib/modprobe.d/blacklist-nvidia.conf' it says no such file exists. So I move on, and I still get the error.

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more