NVIDIA driver is not loaded. Ubuntu 18.10

Hello, I have the same problem as others at Ubuntu 18.04.

I’d read a lot of advices above, ensured that secureboot is off, removed all nvidia stuff and installed driver again, updated kernel to latest, but still have an error with driver installation and running, and I have no idea why.

The errors look like other’s, for example:

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

So please, can you help me to find what I’m doing wrong?

nvidia-bug-report.log.gz (126.8 KB)

You have your system compiler set to clang/llvm but gcc 7.5 is needed. Please set your cc back to gcc-7.5 using update-alternatives.

1 Like

Thank you very much for help! Finally it works!

Re-Freedback… some Ubuntu updates broke my Nvidia/CUDA installations.

I remove all the components:

sudo apt remove --purge 'nvidia*' 'cuda*'
sudo apt autoremove --purge

Then followed the official install stapes in here (for “deb(local)”): CUDA Toolkit 11.7 Update 1 Downloads | NVIDIA Developer

 wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-ubuntu1804.pin
 sudo mv cuda-ubuntu1804.pin /etc/apt/preferences.d/cuda-repository-pin-600
 wget https://developer.download.nvidia.com/compute/cuda/11.2.1/local_installers/cuda-repo-ubuntu1804-11-2-local_11.2.1-460.32.03-1_amd64.deb
 sudo dpkg -i cuda-repo-ubuntu1804-11-2-local_11.2.1-460.32.03-1_amd64.deb
 sudo apt-key add /var/cuda-repo-ubuntu1804-11-2-local/7fa2af80.pub
 sudo apt-get update
 sudo apt-get -y install cuda

At first the install of cuda failed with a message “cuda depending on cuda” (sorry it’s vague…). That was a problem of conflict between cuda packages. I fixed this with:

sudo apt autoclean

Hopefully this way of installing will be more stable for next Ubuntu updates…

Hello,

Looks like this is one heck of a problem. Same as most of the answers above:

  • Disabled Wayland,
  • blacklisted Nouveau,
  • Disabled the Secure boot,
  • Updated the kernel to the latest stable,
  • Installed the driver using Software & Updates,

and I still have the same problem.
I am using an MSİ GF65 laptop running Ubuntu 18.04.
Here is the bug report.

nvidia-bug-report.log.gz (1.1 MB)

See:
https://forums.developer.nvidia.com/t/rtx-3060-mobile-linux-driver/169531/7?u=generix

1 Like

Same issue on a new Dell laptop with Ubuntu 18.04 installed by Dell. The NVIDIA driver worked a few weeks, then stopped. I suspect a recent Ubuntu update messed up things.

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

  • No /etc/modprobe.d/blacklist-nvidia.conf

  • Tried to remove existing NVIDIA driver, reboot and reinstall driver, and reboot

  • Tried the driver 440, 450 and 460. Nothing worked.

nvidia-bug-report.log.gz (163.6 KB)

There doesn’t seem to be any kernel module installed. I guess either the kernel headers or the dkms link to them is missing, please try installing the headers

sudo apt install linux-headers-$(uname -r)

the check if the symbolic link is created:

ls -l /lib/modules/$(uname -r)/build

and the

dkms status

Please post the output of those 3 commands.

Your suggestion worked! The terminal output is attached just in case it’s useful. But the driver now responds and CUDA also works now. Thanks!

Terminal_output.log (7.8 KB)

I am struggling so much to get an external monitor connected via HDMI to work with my laptop (MSI GS65 Stealth running ubuntu 18.04), if you could please help me i would be forever grateful.

I tried to provide as much details as i could bellow, also i attached the bug report, if you need any additional info i will be more than happy to provide it, thanks in advance!

nvidia-bug-report.log.gz (374.8 KB)

adnane@adnane:~$ sudo lshw -c display
*-display
description: VGA compatible controller
product: NVIDIA Corporation
vendor: NVIDIA Corporation
physical id: 0
bus info: pci@0000:01:00.0
version: a1
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress vga_controller bus_master cap_list rom
configuration: driver=nvidia latency=0
resources: irq:16 memory:ac000000-acffffff memory:80000000-8fffffff memory:90000000-91ffffff ioport:4000(size=128) memory:ad000000-ad07ffff
*-display
description: VGA compatible controller
product: Intel Corporation
vendor: Intel Corporation
physical id: 2
bus info: pci@0000:00:02.0
version: 00
width: 64 bits
clock: 33MHz
capabilities: pciexpress msi pm vga_controller bus_master cap_list rom
configuration: driver=i915 latency=0
resources: irq:167 memory:ab000000-abffffff memory:40000000-4fffffff ioport:5000(size=64) memory:c0000-dffff

adnane@adnane:~$ nvidia-settings
ERROR: Unable to load info from any available system
(nvidia-settings:7370): GLib-GObject-CRITICAL **: 10:41:24.964: g_object_unref: assertion ‘G_IS_OBJECT (object)’ failed
** Message: 10:41:24.966: PRIME: No offloading required. Abort
** Message: 10:41:24.966: PRIME: is it supported? no

adnane@adnane:~$ nvidia-smi
Thu Mar 11 10:44:05 2021
±----------------------------------------------------------------------------+
| NVIDIA-SMI 460.32.03 Driver Version: 460.32.03 CUDA Version: 11.2 |
|-------------------------------±---------------------±---------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|===============================+======================+======================|
| 0 GeForce RTX 2060 Off | 00000000:01:00.0 Off | N/A |
| N/A 55C P0 32W / N/A | 0MiB / 5934MiB | 0% Default |
| | | N/A |
±------------------------------±---------------------±---------------------+
±----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| No running processes found |
±----------------------------------------------------------------------------+

adnane@adnane:~$ uname -a
Linux adnane 5.4.0-66-generic #74~18.04.2-Ubuntu SMP Fri Feb 5 11:17:31 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

adnane@adnane:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.5 LTS
Release: 18.04
Codename: bionic

adnane@adnane:~$ lspci -v | grep VGA
00:02.0 VGA compatible controller: Intel Corporation Device 3e9b (prog-if 00 [VGA controller])
01:00.0 VGA compatible controller: NVIDIA Corporation Device 1f11 (rev a1) (prog-if 00 [VGA controller])

adnane@adnane:~$ sudo prime-select nvidia
Info: the nvidia profile is already set

See this:
https://forums.developer.nvidia.com/t/linux-mint-nvidia-driver-loads-with-startx-but-not-on-initial-startup/168262/2?u=generix

Hello. I have tried several of the solutions above but none worked. I attached the log file here. Please help!

nvidia-bug-report.log.gz (110.0 KB)

You have gcc 5.5 installed and set as system compiler but gcc 7.5 is needed. Please set gcc and cc to gcc 7.5 using update-alternatives.

1 Like

I seem to have the same problem (Ubuntu 18.04, kernel 5.3.0-62 or 5.4.0-66, nvidia Quatro M3000M card, nouveau blacklists, but no nvidia drivers work. The display is unclaimed and shows as “llvmpipe” in Settings > Details)

Is this related to this ubuntu bug (wrong gcc version of kernel prevents KMS from working)

I have gcc and cc version 7.5. Still no luck.

Would it be easier to disable DKMS for all nvidia drivers?

Please run nvidia-bug-report.sh as root and attach the resulting nvidia-bug-report.log.gz file to your post.

Attachednvidia-bug-report.log.gz (346.3 KB)

Here’s some more info:
inxi -G

Graphics:  Card: NVIDIA GM204GLM [Quadro M3000M]
           Display Server: x11 (X.Org 1.20.8 )
           drivers: fbdev,nouveau (unloaded: vesa) FAILED: modesetting
           Resolution: 1024x768@76.00hz
           OpenGL: renderer: llvmpipe (LLVM 10.0.0, 256 bits)
           version: 3.3 Mesa 20.0.8

Which I guess makes sense because I have grub line
GRUB_CMDLINE_LINUX_DEFAULT="nouveau.modeset=1"?
(I also commented #blacklist nvidiafb in /etc/modprobe.d/blacklist-framebuffer.conf hoping that would help.)

sudo lshw -c display

  *-display                 
       description: VGA compatible controller
       product: GM204GLM [Quadro M3000M]
       vendor: NVIDIA Corporation
       physical id: 0
       bus info: pci@0000:01:00.0
       version: a1
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress vga_controller bus_master cap_list rom
       configuration: driver=nvidia latency=0
       resources: irq:16 memory:b2000000-b2ffffff memory:a0000000-afffffff memory:b0000000-b1ffffff ioport:5000(size=128) memory:c0000-dffff

lspci -nnk | grep -iA2 VGA

01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GM204GLM [Quadro M3000M] [10de:13fa] (rev a1)
	Subsystem: Lenovo GM204GLM [Quadro M3000M] [17aa:222f]
	Kernel driver in use: nvidia

But most importantly…
nvidia-smi
Failed to initialize NVML: Driver/library version mismatch

Some nvidia drivers fail to claim the graphics card, and llvmpipe takes over and I still get atleast desktop. Other driver versions…I just get a blank black screen after grub and have to reboot into recovery mode.

Please see this:
https://forums.developer.nvidia.com/t/linux-mint-nvidia-driver-loads-with-startx-but-not-on-initial-startup/168262/2

No luck with adding nvidia to /etc/initramfs-tools/modules. Still get blank screen.
I suspect the problem is with the driver/library version mismatch, possibly involving dkms.
Months ago, I tried to install the nvidia driver from a .run script downloaded from the nvidia website. I haven’t gotten any nvidia driver to work since.

cat /proc/driver/nvidia/version
NVRM version: NVIDIA UNIX x86_64 Kernel Module 460.32.03 Sun Dec 27 19:00:34 UTC 2020 GCC version: gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu~18.04)

dpkg -l grep nvidia-driver
ii nvidia-driver-460-server 460.32.03-0ubuntu0.18.04.01 amd64 NVIDIA Server Driver metapackage

I’ll have to revert back to nouveau. I wanted to try nvidia again because nouveau can’t wake my main screen after suspend/resume.

Update: well, now nouveau driver freezes on the login screen. :/

Indeed. I changed to an old gcc to compile an app. I thought the change was harmless though. Anw thanks alot and have to good week ahead.

Hello,

I have tried all these solutions, but I al still getting the same error, could you help me please?nvidia-bug-report.log.gz (159.4 KB)