Ubuntu 20.04 problem with nvidia-smi

I have ubuntu 20.04 installed video card drivers via additional drivers, but when I type nvidia-smi it gives an error:
NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running. I also tried other ways, other versions, did not help.

Running sudo modprobe nvidia:
modprobe: FATAL: Module nvidia not found in directory /lib/modules/5.13.19-051319-generic

Running lspci | egrep ‘VGA|3D’:
01:00.0 3D controller: NVIDIA Corporation Device 25a0 (rev a1)
05:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Device 1638 (rev c5)

Running dpkg -l | grep nvidia:

details

ii libnvidia-cfg1-460:amd64 460.91.03-0ubuntu0.20.04.1 amd64 NVIDIA binary OpenGL/GLX configuration library
ii libnvidia-common-460 460.91.03-0ubuntu0.20.04.1 all Shared files used by the NVIDIA libraries
ii libnvidia-compute-460:amd64 460.91.03-0ubuntu0.20.04.1 amd64 NVIDIA libcompute package
ii libnvidia-compute-460:i386 460.91.03-0ubuntu0.20.04.1 i386 NVIDIA libcompute package
rc libnvidia-compute-495:amd64 495.46-0ubuntu0.20.04.1 amd64 NVIDIA libcompute package
ii libnvidia-decode-460:amd64 460.91.03-0ubuntu0.20.04.1 amd64 NVIDIA Video Decoding runtime libraries
ii libnvidia-decode-460:i386 460.91.03-0ubuntu0.20.04.1 i386 NVIDIA Video Decoding runtime libraries
ii libnvidia-encode-460:amd64 460.91.03-0ubuntu0.20.04.1 amd64 NVENC Video Encoding runtime library
ii libnvidia-encode-460:i386 460.91.03-0ubuntu0.20.04.1 i386 NVENC Video Encoding runtime library
ii libnvidia-extra-460:amd64 460.91.03-0ubuntu0.20.04.1 amd64 Extra libraries for the NVIDIA driver
ii libnvidia-fbc1-460:amd64 460.91.03-0ubuntu0.20.04.1 amd64 NVIDIA OpenGL-based Framebuffer Capture runtime library
ii libnvidia-fbc1-460:i386 460.91.03-0ubuntu0.20.04.1 i386 NVIDIA OpenGL-based Framebuffer Capture runtime library
ii libnvidia-gl-460:amd64 460.91.03-0ubuntu0.20.04.1 amd64 NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD
ii libnvidia-gl-460:i386 460.91.03-0ubuntu0.20.04.1 i386 NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD
ii libnvidia-ifr1-460:amd64 460.91.03-0ubuntu0.20.04.1 amd64 NVIDIA OpenGL-based Inband Frame Readback runtime library
ii libnvidia-ifr1-460:i386 460.91.03-0ubuntu0.20.04.1 i386 NVIDIA OpenGL-based Inband Frame Readback runtime library
ii nvidia-compute-utils-460 460.91.03-0ubuntu0.20.04.1 amd64 NVIDIA compute utilities
rc nvidia-compute-utils-495 495.46-0ubuntu0.20.04.1 amd64 NVIDIA compute utilities
ii nvidia-dkms-460 460.91.03-0ubuntu0.20.04.1 amd64 NVIDIA DKMS package
rc nvidia-dkms-495 495.46-0ubuntu0.20.04.1 amd64 NVIDIA DKMS package
ii nvidia-driver-460 460.91.03-0ubuntu0.20.04.1 amd64 NVIDIA driver metapackage
ii nvidia-kernel-common-460 460.91.03-0ubuntu0.20.04.1 amd64 Shared files used with the kernel module
rc nvidia-kernel-common-495 495.46-0ubuntu0.20.04.1 amd64 Shared files used with the kernel module
ii nvidia-kernel-source-460 460.91.03-0ubuntu0.20.04.1 amd64 NVIDIA kernel source package
ii nvidia-prime 0.8.16~0.20.04.1 all Tools to enable NVIDIA’s Prime
ii nvidia-settings 470.57.01-0ubuntu0.20.04.2 amd64 Tool for configuring the NVIDIA graphics driver
ii nvidia-utils-460 460.91.03-0ubuntu0.20.04.1 amd64 NVIDIA driver support binaries
ii screen-resolution-extra 0.18build1 all Extension for the nvidia-settings control panel
ii xserver-xorg-video-nvidia-460 460.91.03-0ubuntu0.20.04.1 amd64 NVIDIA binary Xorg driver

Running sudo prime-select nvidia:
Info: the nvidia profile is already set

Running dkms status:
bcmwl, 6.30.223.271+bdcom, 5.4.0-96-generic, x86_64: installed
nvidia, 460.91.03: added

nvidia-bug-report:
nvidia-bug-report.log.gz (129.0 KB)

OS: Ubuntu 20.04
Graphic card: RTX 3050 TI

5.13.19-051319-generic looks like a manually installed kernel for 21.10 or 22.04 which is incompatible. Please remove it, return to the 20.04 stock kernel and then use switching to the hwe kernel to get the correct 5.13 kernel

sudo apt install --install-recommends linux-generic-hwe-20.04 

https://wiki.ubuntu.com/Kernel/LTSEnablementStack

1 Like

Thanks a lot for the quick response, it helped me. I switched kernel to 5.13.0-27-generic

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.