How to install the NVIDIA drivers on Ubuntu 20.04 Focal Fossa Linux - LinuxConfig.org

The objective is to install the NVIDIA drivers on Ubuntu 20.04 Focal Fossa Linux and switch from a opensource Nouveau driver to proprietary Nvidia driver.

To install Nvidia driver on other Linux distributions, follow our Nvidia Linux Driver guide.


This is a companion discussion topic for the original entry at https://linuxconfig.org/how-to-install-the-nvidia-drivers-on-ubuntu-20-04-focal-fossa-linux

hello, I have a problem with install the driver on my laptop. After I have install the driver, I can see the nvidia-X-server icon, but I get a error when i type “nvidia-smi” in the command line. It shows
“NVIDIA-SMI has failed because it couldn’t communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.”
What can I do?

Hi Frank1126lin,

Welcome to our forums.

To start with, you could check if the driver is loaded. What output does the following command provide on your system?

$ sudo lsmod | grep -i nvidia

I also had that issue as mentioned above. I have tried multiple times and multiple methods to try to get my graphics drivers working (NVIDIA-390.132) However, when I run $ sudo lsmod | grep -i nvidia there is no output when I believe it should list “nvidia-390”
Any help would be greatly appreciated! :smiley:

I have the same issue. Please let me know if you have figure it out

Hi Sahel-Eskandar,

Welcome to our forums.

Which path did you take, the GUI install, or the command line install?

Hi @Lubos,
I would like to thank you. After hours of trial and error, your guide is what helped me get my GTX1650 working. Awesome!

Andre.

Hi

I’ve just installed a new Ubuntu 20.04. And I checked that nvidia-smi was working.

I’ve followed the “Automatic Install using PPA repository to install Nvidia Beta drivers” to install nvidia-drivers-450. Then I reboot the system.

I need this version to run a Docker container with CUDA 11.

Now when I run nvidia-smi, I get “NVIDIA-SMI has failed because it couldn’t communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.”

When I run sudo lsmod | grep -i nvidia, I get no output.

Any ideas how to solve it? My GPU is a GeForce 940MX.

Well, I kept searching, and found a post in nvidia forum named “newly-installed-drivers-are-not-found-when-nvidia-smi-is-called” which has the answer (I can’t add the link because I’m a new user).
TLDR the problem was the Secure Boot. Deactivate it before installing the drivers.

you can try this live image

https__sourceforge.net/projects/toysbox/files/bionic-nvidia/ubuntu-20.04-5.4.0-26-generic-nvidia-450.57-primeselect.iso

where you have latest nvidia drivers on ubuntu-20.04 ; and you can switch back and forth between

intel/nvidia using prime-select without qny reboot and with a bonus : the nvidia card does really switch

off when you are on intel

I found the method of installing NVidia drivers via the Graphical interface as the most reliable one. Somehow, other methods failed for me. Use Software and Updates utility in Ubuntu and select Additional Drivers. As for Cuda compatibiity and installation, it is a very tricky one as there are a lot of dependencies between a specific verison of NVidia driver, Cuda package, additional Cuda libraries, Tensorflow, Python, etc. There is a Ubuntu installation on Live USB called LivelyLinux that already has all components listed above preinstalled. Just look for it on the Internet.

FreeBSD nVidia 460 driver install is ONE STEP and EASY (why is see the handbook: no preinstalled bad drivers, NO REBOOT, very smart). But Mathematica (requires Qt ubu 10) doesn’t (easily) run.

I’ve tried to install Mathematica using Oracle ubreakable: it obstructed me continually. UEK was black screen, RHEL7 demands I hack initrd to install a non-broken non-lenovo driver (and doesn’t support i5’s video or selecting from multiple video adapters either - i see ubuntu has a tool). The nouveau very un-accelerated “fb driver” did vesa which is just junk (anybody does vesa even without fb - and it seemed allot slower than freebsd’s vesa btw). More: I switch to consol text is so tiny I can’t read it. reboot, reboot, reboot, no support unless you pay. Not supposed to compile kernel or a cross compiler because “that’s their job”. Before that it refused to install unless it was King - forced me to un-install freebsd so it could be “king of loaders”. Then I install freebsd to find … I can’t boot it and there’s no documented way (? call for $6,000 support?) to boot freebsd without allot of “unsupported” hacking. DONE: deleting it.

Win10 supports steam seamlessly, VM boxes, and really doesn’t preven any software or hardware from being used - as evidenced by old games still running and new hardware always running well on it. Win10 is anti-privacy pro-china pro topdog i don’t like that. But it does have open arms to free compiling and use of VMs these days: and it is NOT expensive. They even have a kernel hacking website, an F compared to freebsd’s integration though.

It’s still not freeBSD though :sly_smile:

I am 100% sure many of the linux problems are seeded by google microsoft and ibm and rh. Ubuntu is effected not the cause but they get “cross infected” and … ubuntu don’t support compiling ubuntu from scratch, suggest not compiling kernel, etc.

So Mathematica switched to being Qt based and crashes on apple and win10 and win10 has “many HID input glitches” (such as keystrokes going into minimized document un-expectedly!!!). They intently modeled it to be “requring nVidia GL” (not broken GL, good gl) but say they support REDHAT. I firmly doubt that. To me, it’s all obstruction you “must run Qt on linux”, but aren’t allowed to boot it on an nVidia machine without “doing unsupported tricks” to get rid of a fake driver. They also don’t support i5 or i7’s multimedia and GL. So I think Wolfram is lying their ass off. They don’t work on the platforms they say they do, then also they run like #(*&#$ on win10.

I’m thinking maybe try MM on Ubuntu or maybe do the necesary work so it runs on FreeBSD (missing some c7 drivers still might work!). nVidia runs well on freebsd easy. But you know: win10, despite many flaws, is such a time saver when your getting older. I loved slackware for being an advanced OS more reliable than win95 that an adolecent could install with little guidance and get X and netscape running. Linux and FreeBSD seem to have taken the worst approach to anything as far as what is required of the CONSUMER who may not be smart or even physically disabled.

(freebsd has an excellent handbook for newbies - but ultimately has chosen not to support consumers also)