Nvidia module failed to load, mint 20.1, kernel 5.4.0-65

Hey Nvidia team,

Nvidia kernel module is not loaded, which makes driver working in unknown mode and over-consumption of a battery. It was working few weeks ago, several required updates were installed during that time from official mint ppa.

my system:
Dell xps 15
Linux Mint 20.1, kernel 5.4.0-65

:~$ inxi -Gx
Graphics:
Device-1: Intel UHD Graphics 630 vendor: Dell driver: i915 v: kernel
bus ID: 00:02.0
Device-2: NVIDIA GP107M [GeForce GTX 1050 Ti Mobile] driver: N/A
bus ID: 01:00.0
Display: x11 server: X.Org 1.20.9 driver: modesetting unloaded: fbdev,vesa
resolution: 1920x1080~60Hz
OpenGL: renderer: Mesa Intel UHD Graphics 630 (CFL GT2) v: 4.6 Mesa 20.2.6
direct render: Yes

:~$ lspci -nnk | grep -EA3 “3D|VGA”
01:00.0 3D controller [0302]: NVIDIA Corporation GP107M [GeForce GTX 1050 Ti Mobile] [10de:1c8c] (rev a1)
Kernel modules: nvidiafb, nouveau, nvidia_drm, nvidia

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

:~$ sudo nvidia-settings

ERROR: NVIDIA driver is not loaded

ERROR: Unable to load info from any available system

(nvidia-settings:10532): GLib-GObject-CRITICAL **: 21:44:59.586: g_object_unref: assertion ‘G_IS_OBJECT (object)’ failed
** Message: 21:44:59.588: PRIME: No offloading required. Abort
** Message: 21:44:59.588: PRIME: is it supported? no

:~$ grep ‘EE’ /var/log/Xorg.0.log
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[ 5.732] (EE) Failed to load module “nvidia” (module does not exist, 0)
[ 5.976] (II) Initializing extension MIT-SCREEN-SAVER

Result of nvidia-bug-report.sh attached

Steps taken so far:

  • rollback to few previous kernels
  • reinstall nvidia drivers:
    sudo apt-get purge nvidia
    sudo apt autoremove
    apt install nvidia-driver-460

Thx in advance,nvidia-bug-report.log.gz (114.0 KB)

Looks like the driver is blacklisted, please

  • run
sudo prime-select nvidia
  • run
grep nvidia /etc/modprobe.d/* /lib/modprobe.d/*

to find a file containing

blacklist nvidia

and remove it,
then run

sudo update-initramfs -u

and reboot

The same after

prime-select nvidia

configs seems to be in place, nvidia is not blacklisted.
in root shell i can successfully execute

modprobe nvidia

module is not loading during X startup, can’t find whats wrong

x log:

Summary

[ 14.287]
XOrg X Server 1.20.13
X Protocol Version 11, Revision 0
[ 14.287] Build Operating System: linux Ubuntu
[ 14.287] Current Operating System: Linux ar 5.15.0-051500rc3-generic #202109262230 SMP Sun Sep 26 22:33:44 UTC 2021 x86_64
[ 14.287] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-5.15.0-051500rc3-generic root=UUID=d5a736ad-fcd7-41ad-a389-2f3d13e344c4 ro nosplash
[ 14.287] Build Date: 10 August 2021 09:32:48AM
[ 14.287] xorg-server 2:1.20.13-1ubuntu1
[ 14.287] Current version of pixman: 0.40.0
[ 14.287] Before reporting problems, check
to make sure that you have the latest version.
[ 14.287] Markers: (–) probed, () from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[ 14.287] (==) Log file: “/var/log/Xorg.0.log”, Time: Fri Oct 1 12:42:11 2021
[ 14.287] (==) Using system config directory “/usr/share/X11/xorg.conf.d”
[ 14.287] (==) No Layout section. Using the first Screen section.
[ 14.287] (==) No screen section available. Using defaults.
[ 14.287] (
) |–>Screen “Default Screen Section” (0)
[ 14.287] () | |–>Monitor “”
[ 14.287] (==) No device specified for screen “Default Screen Section”.
Using the first device section listed.
[ 14.287] (
) | |–>Device “intelgpu0”
[ 14.287] (==) No monitor specified for screen “Default Screen Section”.
Using a default monitor configuration.
[ 14.287] (==) Automatically adding devices
[ 14.287] (==) Automatically enabling devices
[ 14.287] (==) Automatically adding GPU devices
[ 14.287] (==) Automatically binding GPU devices
[ 14.287] (==) Max clients allowed: 256, resource mask: 0x1fffff
[ 14.287] (WW) The directory “/usr/share/fonts/X11/cyrillic” does not exist.
[ 14.287] Entry deleted from font path.
[ 14.287] (WW) The directory “/usr/share/fonts/X11/100dpi/” does not exist.
[ 14.287] Entry deleted from font path.
[ 14.287] (WW) The directory “/usr/share/fonts/X11/75dpi/” does not exist.
[ 14.287] Entry deleted from font path.
[ 14.287] (WW) The directory “/usr/share/fonts/X11/100dpi” does not exist.
[ 14.287] Entry deleted from font path.
[ 14.287] (WW) The directory “/usr/share/fonts/X11/75dpi” does not exist.
[ 14.287] Entry deleted from font path.
[ 14.287] (==) FontPath set to:
/usr/share/fonts/X11/misc,
/usr/share/fonts/X11/Type1,
built-ins
[ 14.287] (==) ModulePath set to “/usr/lib/xorg/modules”
[ 14.287] (II) The server relies on udev to provide the list of input devices.
If no devices become available, reconfigure udev or disable AutoAddDevices.
[ 14.287] (II) Loader magic: 0x55dafc506020
[ 14.287] (II) Module ABI versions:
[ 14.287] XOrg ANSI C Emulation: 0.4
[ 14.287] XOrg Video Driver: 24.1
[ 14.287] XOrg XInput driver : 24.1
[ 14.287] XOrg Server Extension : 10.0
[ 14.288] (++) using VT number 7

[ 14.288] (II) systemd-logind: logind integration requires -keeptty and -keeptty was not provided, disabling logind integration
[ 14.288] (II) xfree86: Adding drm device (/dev/dri/card1)
[ 14.306] (II) xfree86: Adding drm device (/dev/dri/card0)
[ 14.317] () OutputClass “Nvidia Prime” ModulePath extended to “/lib/x86_64-linux-gnu/nvidia/xorg,/usr/lib/xorg/modules”
[ 14.317] (
) OutputClass “Nvidia Prime” setting /dev/dri/card1 as PrimaryGPU
[ 14.318] (–) PCI: (0@0:2:0) 8086:9a60:1458:75d3 rev 1, Mem @ 0x622c000000/16777216, 0x4000000000/268435456, I/O @ 0x00005000/64, BIOS @ 0x???/131072
[ 14.318] (–) PCI:*(1@0:0:0) 10de:2520:1458:75d3 rev 161, Mem @ 0x5f000000/16777216, 0x6000000000/8589934592, 0x6200000000/33554432, I/O @ 0x00004000/128, BIOS @ 0x???/524288
[ 14.318] (II) LoadModule: “glx”
[ 14.318] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[ 14.318] (II) Module glx: vendor=“XOrg Foundation”
[ 14.318] compiled for 1.20.13, module version = 1.0.0
[ 14.318] ABI class: XOrg Server Extension, version 10.0
[ 14.318] (II) LoadModule: “intel”
[ 14.318] (II) Loading /usr/lib/xorg/modules/drivers/intel_drv.so
[ 14.318] (II) Module intel: vendor=“XOrg Foundation”
[ 14.318] compiled for 1.20.10, module version = 2.99.917
[ 14.318] Module class: XOrg Video Driver
[ 14.318] ABI class: XOrg Video Driver, version 24.1
[ 14.318] (II) intel: Driver for Intel(R) Integrated Graphics Chipsets:
i810, i810-dc100, i810e, i815, i830M, 845G, 854, 852GM/855GM, 865G,
915G, E7221 (i915), 915GM, 945G, 945GM, 945GME, Pineview GM,
Pineview G, 965G, G35, 965Q, 946GZ, 965GM, 965GME/GLE, G33, Q35, Q33,
GM45, 4 Series, G45/G43, Q45/Q43, G41, B43
[ 14.319] (II) intel: Driver for Intel(R) HD Graphics
[ 14.319] (II) intel: Driver for Intel(R) Iris™ Graphics
[ 14.319] (II) intel: Driver for Intel(R) Iris™ Pro Graphics
[ 14.319] (II) intel(G0): Using Kernel Mode Setting driver: i915, version 1.6.0 20201103
[ 14.319] (II) intel(G0): SNA compiled: xserver-xorg-video-intel 2:2.99.917+git20200714-1ubuntu1 (Matthias Klose)
[ 14.319] (II) intel(G0): SNA compiled for use with valgrind
[ 14.337] (EE) No devices detected.
[ 14.337] (II) Applying OutputClass “Nvidia Prime” to /dev/dri/card1
[ 14.337] loading driver: nvidia
[ 14.540] (==) Matched nvidia as autoconfigured driver 0
[ 14.540] (==) Matched nouveau as autoconfigured driver 1
[ 14.540] (==) Matched modesetting as autoconfigured driver 2
[ 14.540] (==) Matched fbdev as autoconfigured driver 3
[ 14.540] (==) Matched vesa as autoconfigured driver 4
[ 14.540] (==) Assigned the driver to the xf86ConfigLayout
[ 14.540] (II) LoadModule: “nvidia”
[ 14.541] (WW) Warning, couldn’t open module nvidia
[ 14.541] (EE) Failed to load module “nvidia” (module does not exist, 0)
[ 14.541] (II) LoadModule: “nouveau”
[ 14.541] (II) Loading /usr/lib/xorg/modules/drivers/nouveau_drv.so
[ 14.541] (II) Module nouveau: vendor=“XOrg Foundation”
[ 14.541] compiled for 1.20.9, module version = 1.0.17
[ 14.541] Module class: XOrg Video Driver
[ 14.541] ABI class: XOrg Video Driver, version 24.1
[ 14.541] (II) LoadModule: “modesetting”
[ 14.541] (II) Loading /usr/lib/xorg/modules/drivers/modesetting_drv.so
[ 14.541] (II) Module modesetting: vendor=“XOrg Foundation”
[ 14.541] compiled for 1.20.13, module version = 1.20.13
[ 14.541] Module class: XOrg Video Driver
[ 14.541] ABI class: XOrg Video Driver, version 24.1
[ 14.541] (II) LoadModule: “fbdev”
[ 14.541] (II) Loading /usr/lib/xorg/modules/drivers/fbdev_drv.so
[ 14.541] (II) Module fbdev: vendor=“XOrg Foundation”
[ 14.541] compiled for 1.20.10, module version = 0.5.0
[ 14.541] Module class: XOrg Video Driver
[ 14.541] ABI class: XOrg Video Driver, version 24.1
[ 14.541] (II) LoadModule: “vesa”
[ 14.541] (II) Loading /usr/lib/xorg/modules/drivers/vesa_drv.so
[ 14.541] (II) Module vesa: vendor=“XOrg Foundation”
[ 14.541] compiled for 1.20.10, module version = 2.5.0
[ 14.541] Module class: XOrg Video Driver
[ 14.541] ABI class: XOrg Video Driver, version 24.1
[ 14.541] (II) intel: Driver for Intel(R) Integrated Graphics Chipsets:
i810, i810-dc100, i810e, i815, i830M, 845G, 854, 852GM/855GM, 865G,
915G, E7221 (i915), 915GM, 945G, 945GM, 945GME, Pineview GM,
Pineview G, 965G, G35, 965Q, 946GZ, 965GM, 965GME/GLE, G33, Q35, Q33,
GM45, 4 Series, G45/G43, Q45/Q43, G41, B43
[ 14.541] (II) intel: Driver for Intel(R) HD Graphics
[ 14.541] (II) intel: Driver for Intel(R) Iris™ Graphics
[ 14.541] (II) intel: Driver for Intel(R) Iris™ Pro Graphics
[ 14.541] (II) NOUVEAU driver Date: Sat Jan 23 12:24:42 2021 -0500
[ 14.541] (II) NOUVEAU driver for NVIDIA chipset families :
[ 14.541] RIVA TNT (NV04)
[ 14.541] RIVA TNT2 (NV05)
[ 14.541] GeForce 256 (NV10)
[ 14.541] GeForce 2 (NV11, NV15)
[ 14.541] GeForce 4MX (NV17, NV18)
[ 14.541] GeForce 3 (NV20)
[ 14.541] GeForce 4Ti (NV25, NV28)
[ 14.541] GeForce FX (NV3x)
[ 14.541] GeForce 6 (NV4x)
[ 14.541] GeForce 7 (G7x)
[ 14.541] GeForce 8 (G8x)
[ 14.541] GeForce 9 (G9x)
[ 14.541] GeForce GTX 2xx/3xx (GT2xx)
[ 14.541] GeForce GTX 4xx/5xx (GFxxx)
[ 14.541] GeForce GTX 6xx/7xx (GKxxx)
[ 14.541] GeForce GTX 9xx (GMxxx)
[ 14.541] GeForce GTX 10xx (GPxxx)
[ 14.541] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[ 14.541] (II) FBDEV: driver for framebuffer: fbdev
[ 14.541] (II) VESA: driver for VESA chipsets: vesa
[ 14.541] (WW) xf86OpenConsole: setpgid failed: Operation not permitted
[ 14.541] (WW) xf86OpenConsole: setsid failed: Operation not permitted
[ 14.541] (WW) Falling back to old probe method for modesetting
[ 14.541] (WW) Falling back to old probe method for fbdev
[ 14.541] (WW) Falling back to old probe method for modesetting
[ 14.541] (WW) Falling back to old probe method for fbdev
[ 14.559] (EE) [drm] Failed to open DRM device for (null): -2
[ 14.576] (II) modeset(G1): using drv /dev/dri/card1
[ 14.576] (EE) No devices detected.
[ 14.576] (EE)
Fatal server error:
[ 14.576] (EE) no screens found(EE)
[ 14.576] (EE)
Please consult the The XOrg Foundation support
for help.
[ 14.576] (EE) Please also check the log file at “/var/log/Xorg.0.log” for additional information.
[ 14.576] (EE)
[ 14.596] (EE) Server terminated with error (1). Closing log file.

Run nvidia-bug-report.sh and attach the resulting file here.

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

Well I’m not sure about this one.
As in your Xorg.log you pasted, in that one and on this boot:

*** ls: -rw-r–r-- 1 root root 9807 2021-10-01 14:41:32.532000611 +0300 /var/log/Xorg.0.log.old

[ 20.605] (II) LoadModule: “nvidia”
[ 20.605] (WW) Warning, couldn’t open module nvidia
[ 20.605] (EE) Failed to load module “nvidia” (module does not exist, 0)

The X server can’t find the module. Might be some wrong module path option in one of the X configs.

But in dmesg the driver actually loads.

[ 3.608840] nouveau 0000:01:00.0: enabling device (0000 → 0003)

But also nouveau → you should make sure it’s blacklisted anyway.

Consistently this pops up:

окт 01 14:43:22 ar nvidia-persistenced[980]: Failed to open libnvidia-cfg.so.1: libnvidia-cfg.so.1: cannot open shared object file: No such file or directory
окт 01 14:43:22 ar systemd[1]: nvidia-persistenced.service: Control process exited, code=exited, status=1/FAILURE

So somethings wrong with the installation.

You also had some warnings at kernel modules compile time. 5.15 is a very new kernel, not sure it’s fully supported yet.
Do you have a 5.14 or older available to test?

Also I’ve seen it now many times, users switch to nvidia with prime-select and it does nothing, until they switch to intel and then back to nvidia (maybe followed by a sudo update-initramfs -u).

Sorry no definite answer/solution, but hopefully some hints?!

Fixed nvidia-persistenced by installing libnvidia-cfg1-470
But nothing changed
prime-select doesn’t blacklist nouveau, if i do it manually i’ll boot to black-screen

I tried full purge and install, and different workaround found across internet…

Everything worked until some kernel update, i have 5.13, 5.14, 5.15 and the same behavior now

Below report after black screen and boot to root shell
nvidia-bug-report.log.gz (314.9 KB)