Driver doesnt seem to be running

I use Ubuntu + KDE 20.04. I was trying to run a script, but accidentally run shutdown now, Before I typed shutdown now, it worked absolutely fine. But after that I boot up my laptop when I type nvidia-smi, it shows me: NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.
After I typed nvidia-settings, it says



ERROR: Unable to load info from any available system


(nvidia-settings:1586): GLib-GObject-CRITICAL **: 14:09:15.689: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
** Message: 14:09:15.691: PRIME: Requires offloading
** Message: 14:09:15.691: PRIME: is it supported? yes
** Message: 14:09:15.712: PRIME: Usage: /usr/bin/prime-select nvidia|intel|on-demand|query
** Message: 14:09:15.712: PRIME: on-demand mode: "1"
** Message: 14:09:15.712: PRIME: is "on-demand" mode supported? yes

dpkg -l | grep nvidia gives:

ii  libnvidia-cfg1-460:amd64                      460.39-0ubuntu0.20.04.1                     amd64        NVIDIA binary OpenGL/GLX configuration library
ii  libnvidia-common-460                          460.39-0ubuntu0.20.04.1                     all          Shared files used by the NVIDIA libraries
ii  libnvidia-compute-460:amd64                   460.39-0ubuntu0.20.04.1                     amd64        NVIDIA libcompute package
ii  libnvidia-compute-460:i386                    460.39-0ubuntu0.20.04.1                     i386         NVIDIA libcompute package
ii  libnvidia-decode-460:amd64                    460.39-0ubuntu0.20.04.1                     amd64        NVIDIA Video Decoding runtime libraries
ii  libnvidia-decode-460:i386                     460.39-0ubuntu0.20.04.1                     i386         NVIDIA Video Decoding runtime libraries
ii  libnvidia-encode-460:amd64                    460.39-0ubuntu0.20.04.1                     amd64        NVENC Video Encoding runtime library
ii  libnvidia-encode-460:i386                     460.39-0ubuntu0.20.04.1                     i386         NVENC Video Encoding runtime library
ii  libnvidia-extra-460:amd64                     460.39-0ubuntu0.20.04.1                     amd64        Extra libraries for the NVIDIA driver
ii  libnvidia-fbc1-460:amd64                      460.39-0ubuntu0.20.04.1                     amd64        NVIDIA OpenGL-based Framebuffer Capture runtime library
ii  libnvidia-fbc1-460:i386                       460.39-0ubuntu0.20.04.1                     i386         NVIDIA OpenGL-based Framebuffer Capture runtime library
ii  libnvidia-gl-460:amd64                        460.39-0ubuntu0.20.04.1                     amd64        NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD
ii  libnvidia-gl-460:i386                         460.39-0ubuntu0.20.04.1                     i386         NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD
ii  libnvidia-ifr1-460:amd64                      460.39-0ubuntu0.20.04.1                     amd64        NVIDIA OpenGL-based Inband Frame Readback runtime library
ii  libnvidia-ifr1-460:i386                       460.39-0ubuntu0.20.04.1                     i386         NVIDIA OpenGL-based Inband Frame Readback runtime library
ii  libnvidia-ml-dev                              10.1.243-3                                  amd64        NVIDIA Management Library (NVML) development files
ii  linux-modules-nvidia-460-5.4.0-66-generic     5.4.0-66.74                                 amd64        Linux kernel nvidia modules for version 5.4.0-66
ii  linux-modules-nvidia-460-5.4.0-67-generic     5.4.0-67.75                                 amd64        Linux kernel nvidia modules for version 5.4.0-67
ii  linux-modules-nvidia-460-generic              5.4.0-67.75                                 amd64        Extra drivers for nvidia-460 for the generic flavour
ii  nvidia-compute-utils-460                      460.39-0ubuntu0.20.04.1                     amd64        NVIDIA compute utilities
ii  nvidia-cuda-dev                               10.1.243-3                                  amd64        NVIDIA CUDA development files
ii  nvidia-cuda-doc                               10.1.243-3                                  all          NVIDIA CUDA and OpenCL documentation
ii  nvidia-cuda-gdb                               10.1.243-3                                  amd64        NVIDIA CUDA Debugger (GDB)
ii  nvidia-cuda-toolkit                           10.1.243-3                                  amd64        NVIDIA CUDA development toolkit
ii  nvidia-driver-460                             460.39-0ubuntu0.20.04.1                     amd64        NVIDIA driver metapackage
ii  nvidia-kernel-common-460                      460.39-0ubuntu0.20.04.1                     amd64        Shared files used with the kernel module
ii  nvidia-kernel-source-460                      460.39-0ubuntu0.20.04.1                     amd64        NVIDIA kernel source package
ii  nvidia-modprobe                               460.32.03-0ubuntu1                          amd64        Load the NVIDIA kernel driver and create device files
ii  nvidia-opencl-dev:amd64                       10.1.243-3                                  amd64        NVIDIA OpenCL development files
ii  nvidia-prime                                  0.8.16~0.20.04.1                            all          Tools to enable NVIDIA's Prime
ii  nvidia-profiler                               10.1.243-3                                  amd64        NVIDIA Profiler for CUDA and OpenCL
ii  nvidia-settings                               460.39-0ubuntu0.20.04.1                     amd64        Tool for configuring the NVIDIA graphics driver
ii  nvidia-utils-460                              460.39-0ubuntu0.20.04.1                     amd64        NVIDIA driver support binaries
ii  nvidia-visual-profiler                        10.1.243-3                                  amd64        NVIDIA Visual Profiler for CUDA and OpenCL
ii  screen-resolution-extra                       0.18build1                                  all          Extension for the nvidia-settings control panel
ii  xserver-xorg-video-nvidia-460                 460.39-0ubuntu0.20.04.1                     amd64        NVIDIA binary Xorg driver

Also /lib/modprobe.d/nvidia-blacklist.conf doesnt exist, Secured Boot is also disabled, and the report is attached.nvidia-bug-report.log.gz (88.2 KB)
I followed this post: NVIDIA-SMI has failed because it couldn’t communicate with the NVIDIA driver after updating Ubuntu 20.04 - #4 by generix
but cmd sudo dkms remove nvidia/460.39 --all gives me:
Error! There are no instances of module: nvidia460.39 located in the DKMS tree.

sudo dkms install nvidia/460.39 -k $(uname -r) gives me Error! Could not locate dkms.conf file. File: /usr/src/nvidia-460.39/dkms.conf does not exist. Other commands listed there don’t help as well.
Im desparate, any help would be appreciated. Thanks!!

Please try installing the dkms sources:
sudo apt install nvidia-dkms-460
sudo apt-mark auto nvidia-dkms-460

I wonder about the ic2 timeout errors:

Mar 16 09:56:16 bryant kernel: [ 3.182814] nvidia-modeset: Loading NVIDIA Kernel Mode Setting Driver for UNIX platforms 460.39 Thu Jan 21 21:49:04 UTC 2021
Mar 16 09:56:16 bryant kernel: [ 3.227671] [drm] [nvidia-drm] [GPU ID 0x00000100] Loading driver
Mar 16 09:56:16 bryant kernel: [ 3.227673] [drm] Initialized nvidia-drm 0.0.0 20160202 for 0000:01:00.0 on minor 1
Mar 16 09:56:16 bryant kernel: [ 3.237515] nvidia-uvm: Loaded the UVM driver, major device number 510.
Mar 16 09:56:17 bryant kernel: [ 3.934114] nvidia-gpu 0000:01:00.3: i2c timeout error e0000000
Mar 16 13:29:38 bryant kernel: [ 1.127957] nvidia-gpu 0000:01:00.3: enabling device (0000 → 0002)
Mar 16 13:29:38 bryant kernel: [ 3.932674] nvidia-gpu 0000:01:00.3: i2c timeout error e0000000
Mar 16 13:32:18 bryant kernel: [ 1.118523] nvidia-gpu 0000:01:00.3: enabling device (0000 → 0002)
Mar 16 13:32:18 bryant kernel: [ 3.952703] nvidia-gpu 0000:01:00.3: i2c timeout error e0000000
Mar 16 13:39:09 bryant kernel: [ 1.118752] nvidia-gpu 0000:01:00.3: enabling device (0000 → 0002)
Mar 16 13:39:10 bryant kernel: [ 4.041849] nvidia-gpu 0000:01:00.3: i2c timeout error e0000000
Mar 16 13:41:44 bryant kernel: [ 1.131664] nvidia-gpu 0000:01:00.3: enabling device (0000 → 0002)
Mar 16 13:41:44 bryant kernel: [ 3.954941] nvidia-gpu 0000:01:00.3: i2c timeout error e0000000
Mar 16 13:46:48 bryant kernel: [ 307.502263] nvidia-settings[13137]: segfault at 200000016 ip 00007f5a9f1ed160 sp 00007ffe08ccac08 error 4 in libgobject-2.0.so.0.6400.6[7f5a9f1bf000+36000]
Mar 16 13:50:13 bryant kernel: [ 1.122774] nvidia-gpu 0000:01:00.3: enabling device (0000 → 0002)
Mar 16 13:50:13 bryant kernel: [ 4.048008] nvidia-gpu 0000:01:00.3: i2c timeout error e0000000
Mar 16 13:53:56 bryant kernel: [ 227.173004] nvidia-settings[3273]: segfault at 200000016 ip 00007f43a0c63160 sp 00007ffcbc077428 error 4 in libgobject-2.0.so.0.6400.6[7f43a0c35000+36000]
Mar 16 13:54:35 bryant kernel: [ 265.718361] nvidia-settings[12015]: segfault at 200000016 ip 00007fdf66b53160 sp 00007fff27776268 error 4 in libgobject-2.0.so.0.6400.6[7fdf66b25000+36000]
Mar 16 14:00:12 bryant kernel: [ 1.123652] nvidia-gpu 0000:01:00.3: enabling device (0000 → 0002)
Mar 16 14:00:13 bryant kernel: [ 4.059160] nvidia-gpu 0000:01:00.3: i2c timeout error e0000000
Mar 16 14:08:50 bryant kernel: [ 1.119612] nvidia-gpu 0000:01:00.3: enabling device (0000 → 0002)
Mar 16 14:08:50 bryant kernel: [ 3.930972] nvidia-gpu 0000:01:00.3: i2c timeout error e0000000
Mar 16 14:34:04 bryant kernel: [ 1.117105] nvidia-gpu 0000:01:00.3: enabling device (0000 → 0002)
Mar 16 14:34:04 bryant kernel: [ 3.906401] nvidia-gpu 0000:01:00.3: i2c timeout error e0000000

But can’t tell what they are supposed to mean.

I’d try to sudo apt install --reinstall nvidia-driver-460

1 Like

Hi, the second cmd was satisfied already, the first command gave me:

Building for 5.4.0-67-generic
Building for architecture x86_64
Building initial module for 5.4.0-67-generic
ERROR: Cannot create report: [Errno 17] File exists: '/var/crash/nvidia-dkms-460.0.crash'
Error! Application of patch disable_fstack-clash-protection_fcf-protection.patch failed.
Check /var/lib/dkms/nvidia/460.32.03/build/ for more information.
dpkg: error processing package nvidia-dkms-460 (--configure):
 installed nvidia-dkms-460 package post-installation script subprocess returned error exit status 6
Processing triggers for initramfs-tools (0.136ubuntu6.2) ...
update-initramfs: Generating /boot/initrd.img-5.4.0-67-generic
Errors were encountered while processing:
 nvidia-dkms-460
E: Sub-process /usr/bin/dpkg returned an error code (1)

Thanks for reply, but that doesnt work

Why is version 460.32.03 being built?
You have 460.39 installed.

What does dkms status say?

it says nvidia, 460.32.03: added, and this is dkms.conf:

PACKAGE_NAME="nvidia"
PACKAGE_VERSION="460.32.03"
CLEAN="make clean"
BUILT_MODULE_NAME[0]="nvidia"
DEST_MODULE_LOCATION[0]="/kernel/drivers/char/drm"
PROCS_NUM=`nproc`
[ $PROCS_NUM -gt 16 ] && PROCS_NUM=16
MAKE[0]="unset ARCH; [ ! -h /usr/bin/cc ] && export CC=/usr/bin/gcc; env NV_VERBOSE=1 \
    'make' -j$PROCS_NUM NV_EXCLUDE_BUILD_MODULES='' KERNEL_UNAME=${kernelver} IGNORE_XEN_PRESENCE=1 IGNORE_CC_MISMATCH=1 SYSSRC=$kernel_source_dir LD=/usr/bin/ld.bfd modules"
BUILT_MODULE_NAME[1]="nvidia-modeset"
DEST_MODULE_LOCATION[1]="/kernel/drivers/char/drm"
BUILT_MODULE_NAME[2]="nvidia-drm"
DEST_MODULE_LOCATION[2]="/kernel/drivers/char/drm"
AUTOINSTALL="yes"
PATCH[0]="disable_fstack-clash-protection_fcf-protection.patch"
#PATCH[1]="buildfix_kernel_5.6.patch"
#PATCH_MATCH[0]="^4.[6-7]"
BUILT_MODULE_NAME[3]="nvidia-uvm"
DEST_MODULE_LOCATION[3]="/kernel/drivers/char/drm"
#PATCH[2]="buildfix_kernel_4.9_amd64_only.patch"

Would have been nice if you would have shown the complete output.
As you have 460.39 installed, I’d do:

sudo dkms remove -m nvidia -v 460.32.03 -k $(uname -r)

and then
sudo dkms install -m nvidia -v 460.39 -k $(uname -r)

from removing 460.32.03
Error! There is no instance of nvidia 460.32.03 for kernel 5.4.0-67-generic (x86_64) located in the DKMS tree.Screenshot_20210316_170346

Hrm, dkms is misbehaving!

What nvidia-* packages are in /usr/src?
What is the content of /var/lib/dkms/nvidia?

Screenshot_20210316_170909
and 460.32.03

You should be able to copy / paste the console output directly, no need for pictures.

What does apt show nvidia-dkms-460 |grep Version say?

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

Version: 460.32.03-0ubuntu1

Please run apt update and try that command again. To see if it shows 460.39.

No, still 32.03

Weird.

Did you try that?

Error! Could not locate dkms.conf file.
File: /usr/src/nvidia-460.39/dkms.conf does not exist.

Ok, I’m officially out of ideas.
You have all the driver related files installed as version 460.39, but only the dkms is v. 460.32.03 from the package manager. I cannot explain that discrepancy.

I would still check if apt and dpkg may show different versions with dpkg -l |grep nvidia-dkms.

If yes, I’d install with dpkg.
If not, the only thing I can currently think of is, that your ubuntu mirror may be out of sync. Maybe try switching to a different mirror?

Did you install cuda at any time? Might be the cuda repo interfering.

Yes, I have cuda 11.2, how can I uninstall it then