5

After a system upgrade, GPU infomations are not showing on the NVIDIA X Server Settings (GUI). When I run the command $ nvidia-settings, I gets the error 'NVIDIA driver is not loaded'

My system specs:

Kernel: 5.4.0-53-generic

Ubuntu Version: Ubuntu 20.04.1 LTS

GPU: GeForce GTX 1050 Ti Max-Q

NVIDIA Driver Version: 455.32.00

$ nvidia-settings 

ERROR: NVIDIA driver is not loaded


ERROR: Unable to load info from any available system


(nvidia-settings:7943): GLib-GObject-CRITICAL **: 17:02:04.348: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
** Message: 17:02:04.350: PRIME: Requires offloading
** Message: 17:02:04.350: PRIME: is it supported? yes
** Message: 17:02:04.374: PRIME: Usage: /usr/bin/prime-select nvidia|intel|on-demand|query
** Message: 17:02:04.374: PRIME: on-demand mode: "1"
** Message: 17:02:04.374: PRIME: is "on-demand" mode supported? yes

nvidia-smi output

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

gpu-manager.log

$ cat /var/log/gpu-manager.log 
log_file: /var/log/gpu-manager.log
last_boot_file: /var/lib/ubuntu-drivers-common/last_gfx_boot
new_boot_file: /var/lib/ubuntu-drivers-common/last_gfx_boot
can't access /run/u-d-c-nvidia-was-loaded file
can't access /opt/amdgpu-pro/bin/amdgpu-pro-px
Looking for nvidia modules in /lib/modules/5.4.0-53-generic/updates/dkms
Looking for amdgpu modules in /lib/modules/5.4.0-53-generic/updates/dkms
Is nvidia loaded? no
Was nvidia unloaded? no
Is nvidia blacklisted? no
Is intel loaded? yes
Is radeon loaded? no
Is radeon blacklisted? no
Is amdgpu loaded? no
Is amdgpu blacklisted? no
Is amdgpu versioned? no
Is amdgpu pro stack? no
Is nouveau loaded? no
Is nouveau blacklisted? yes
Is nvidia kernel module available? no
Is amdgpu kernel module available? no
Vendor/Device Id: 8086:3e9b
BusID "PCI:0@0:2:0"
Is boot vga? yes
Vendor/Device Id: 10de:1c8f
BusID "PCI:1@0:0:0"
Is boot vga? no
Error: can't access /sys/bus/pci/devices/0000:01:00.0/driver
The device is not bound to any driver.
Skipping "/dev/dri/card0", driven by "i915"
Skipping "/dev/dri/card0", driven by "i915"
Skipping "/dev/dri/card0", driven by "i915"
Found "/dev/dri/card0", driven by "i915"
output 0:
    card0-eDP-1
Number of connected outputs for /dev/dri/card0: 1
Does it require offloading? yes
last cards number = 2
Has amd? no
Has intel? yes
Has nvidia? yes
How many cards? 2
Has the system changed? No
Intel IGP detected
Desktop system detected
or laptop with open drivers
Nothing to do 
$ sudo prime-select nvidia
Info: the nvidia profile is already set
$ lsmod | grep nvidia

$ lsmod | grep nouveau


$ dpkg -l | grep -i nvidia
ii  libnvidia-cfg1-455:amd64                                    455.32.00-0ubuntu1                                          amd64        NVIDIA binary OpenGL/GLX configuration library
ii  libnvidia-common-455                                        455.32.00-0ubuntu1                                          all          Shared files used by the NVIDIA libraries
ii  libnvidia-compute-455:amd64                                 455.32.00-0ubuntu1                                          amd64        NVIDIA libcompute package
ii  libnvidia-decode-455:amd64                                  455.32.00-0ubuntu1                                          amd64        NVIDIA Video Decoding runtime libraries
ii  libnvidia-encode-455:amd64                                  455.32.00-0ubuntu1                                          amd64        NVENC Video Encoding runtime library
ii  libnvidia-extra-455:amd64                                   455.32.00-0ubuntu1                                          amd64        Extra libraries for the NVIDIA driver
ii  libnvidia-fbc1-455:amd64                                    455.32.00-0ubuntu1                                          amd64        NVIDIA OpenGL-based Framebuffer Capture runtime library
ii  libnvidia-gl-455:amd64                                      455.32.00-0ubuntu1                                          amd64        NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD
ii  libnvidia-ifr1-455:amd64                                    455.32.00-0ubuntu1                                          amd64        NVIDIA OpenGL-based Inband Frame Readback runtime library
ii  nvidia-compute-utils-455                                    455.32.00-0ubuntu1                                          amd64        NVIDIA compute utilities
ii  nvidia-dkms-455                                             455.32.00-0ubuntu1                                          amd64        NVIDIA DKMS package
ii  nvidia-driver-455                                           455.32.00-0ubuntu1                                          amd64        NVIDIA driver metapackage
ii  nvidia-kernel-common-455                                    455.32.00-0ubuntu1                                          amd64        Shared files used with the kernel module
ii  nvidia-kernel-source-455                                    455.32.00-0ubuntu1                                          amd64        NVIDIA kernel source package
ii  nvidia-prime                                                0.8.14                                                      all          Tools to enable NVIDIA's Prime
ii  nvidia-settings                                             455.32.00-0ubuntu1                                          amd64        Tool for configuring the NVIDIA graphics driver
ii  nvidia-utils-455                                            455.32.00-0ubuntu1                                          amd64        NVIDIA driver support binaries
ii  screen-resolution-extra                                     0.18build1                                                  all          Extension for the nvidia-settings control panel
ii  xserver-xorg-video-nvidia-455                               455.32.00-0ubuntu1                                          amd64        NVIDIA binary Xorg driver


$ lspci -nnk |egrep -A3 -i "3D|VGA"
00:02.0 VGA compatible controller [0300]: Intel Corporation UHD Graphics 630 (Mobile) [8086:3e9b]
    DeviceName: Onboard - Video
    Subsystem: Micro-Star International Co., Ltd. [MSI] UHD Graphics 630 (Mobile) [1462:127e]
    Kernel driver in use: i915
--
01:00.0 3D controller [0302]: NVIDIA Corporation GP107M [GeForce GTX 1050 Ti Max-Q] [10de:1c8f] (rev a1)
    Subsystem: Micro-Star International Co., Ltd. [MSI] GP107M [GeForce GTX 1050 Ti Max-Q] [1462:127e]
    Kernel modules: nvidiafb, nouveau
    

Things I've tried:

  • Purged and reinstall nvidia-driver-455.
  • Purged nvidia-driver-455 and install nvidia-driver-450
  • Tried switching to the kernel 5.4.0-52-generic
1
  • dkms status please and tree /var/lib/dkms
    – nobody
    Nov 14, 2020 at 13:05

4 Answers 4

7

Installing headers related to the running kernel fixed the issue for me.

sudo apt-get install linux-headers-`uname -r`

In my case it installed these 2 packages

  • linux-headers-5.4.0-53
  • linux-headers-5.4.0-53-generic
3
  • 1
    sudo apt install linux-generic this draws the newest kernel and kernel-header
    – nobody
    Nov 14, 2020 at 17:52
  • @nobody: This gives me No such package: linux-generic
    – tbrodbeck
    Feb 27, 2022 at 9:39
  • ??? apt-cache policy linux-generic linux-generic: Installiert: 5.4.0.100.104 Installationskandidat: 5.4.0.100.104 Versionstabelle: *** 5.4.0.100.104 1001 1001 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages 1001 http://archive.ubuntu.com/ubuntu focal-security/main amd64 Packages 100 /var/lib/dpkg/status 5.4.0.26.32 1001 1001 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages
    – nobody
    Feb 28, 2022 at 14:11
2

You have also to install the extra module for the particular nvidia driver in my case ..
Nvidia Driver Version : 455
Kernel : 5.8

linux-headers-5.8.0-32-generic
linux-hwe-5.8-headers-5.8.0-32
linux-hwe-5.8-tools-5.8.0-32
linux-image-5.8.0-32-generic
linux-modules-5.8.0-32-generic
linux-tools-5.8.0-32-generic
linux-modules-extra-5.8.0-32-generic #<- mandatory
linux-modules-nvidia-455-5.8.0-32-generic #<- mandatory

and for cuda follow the manual from
https://developer.nvidia.com/cuda-downloads
and choose option install from network

Cheers,
Martin

1

SOLVED: How to install nVidia drivers under Ubuntu 20

Initially followed this article, and after all that I was getting all the same stuff as OP:

nVidia drivers installed under Ubuntu 20 but not loaded correctly

Scoured the internet for days trying to figure this out and finally found this post and in particular the answer above from Martin M.

The key for me was this step:

sudo apt install linux-generic

When this command completes, you should get a terminal-ish-GUI shown below. On this screen you integrate/update UEFI and enroll in MOK, by choosing to set a secure boot password. To choose a password, use tab key to switch between the password field and text link.

UEFI Enroll in MOK screen

As soon as that is done, issue a reboot:

sudo reboot now

Upon reboot, you see a blue screen asking if you want to continue boot or Enroll in MOK, which is not obvious, but at that step, pick Enroll in MOK and enter the secure boot password you typed in the prior step.

Once you're done, you should see your Graphics card details correctly when running

sudo nvidia-settings

Succesfully loading nVidia drivers under Ubuntu

The screenshot above shows I still have this error:

RROR: nvidia-settings could not find the registry key file or the X server is not accessible. This file should have been installed along
       with this driver at /usr/share/nvidia/nvidia-application-profiles-key-documentation. The application profiles will continue to work,
       but values cannot be prepopulated or validated, and will not be listed in the help text. Please see the README for possible values
       and descriptions.

but the drivers are loaded correctly now. Still researching the impact of the registry key file error.

1
  • Not an answer with that error at the end.
    – David
    Aug 27, 2021 at 5:20
0

Installing cuda using the network install solved the problem for me.

You can follow the instructions here to install: https://developer.nvidia.com/cuda-downloads

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .