Linux 20.04.4 LTS can't detect second monitor

Recently I have been trying to install nvidia graphics drivers but I guess with little to no effect.

When I use
nvidia-smi

The result I get is
NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running

The data file from my nvidia-bug-report.log.tz should be attached in this post
data (531.6 KB)

1 Like

Please post the output of
dpkg -l |grep nvidia
and
dkms status

Furthermore, please make sure secure boot is disabled in bios.

Output of dpkg -l | grep nvidia:

ii  libnvidia-cfg1-515:amd64                   515.65.01-0ubuntu0.20.04.1          amd64        NVIDIA binary OpenGL/GLX configuration library
ii  libnvidia-common-515                       515.65.01-0ubuntu0.20.04.1          all          Shared files used by the NVIDIA libraries
rc  libnvidia-compute-390:i386                 390.154-0ubuntu0.20.04.1            i386         NVIDIA libcompute package
ii  libnvidia-compute-515:amd64                515.65.01-0ubuntu0.20.04.1          amd64        NVIDIA libcompute package
ii  libnvidia-compute-515:i386                 515.65.01-0ubuntu0.20.04.1          i386         NVIDIA libcompute package
ii  libnvidia-decode-515:amd64                 515.65.01-0ubuntu0.20.04.1          amd64        NVIDIA Video Decoding runtime libraries
ii  libnvidia-decode-515:i386                  515.65.01-0ubuntu0.20.04.1          i386         NVIDIA Video Decoding runtime libraries
ii  libnvidia-encode-515:amd64                 515.65.01-0ubuntu0.20.04.1          amd64        NVENC Video Encoding runtime library
ii  libnvidia-encode-515:i386                  515.65.01-0ubuntu0.20.04.1          i386         NVENC Video Encoding runtime library
ii  libnvidia-extra-515:amd64                  515.65.01-0ubuntu0.20.04.1          amd64        Extra libraries for the NVIDIA driver
ii  libnvidia-fbc1-515:amd64                   515.65.01-0ubuntu0.20.04.1          amd64        NVIDIA OpenGL-based Framebuffer Capture runtime library
ii  libnvidia-fbc1-515:i386                    515.65.01-0ubuntu0.20.04.1          i386         NVIDIA OpenGL-based Framebuffer Capture runtime library
ii  libnvidia-gl-515:amd64                     515.65.01-0ubuntu0.20.04.1          amd64        NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD
ii  libnvidia-gl-515:i386                      515.65.01-0ubuntu0.20.04.1          i386         NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD
ii  linux-modules-nvidia-515-5.15.0-46-generic 5.15.0-46.49~20.04.1                amd64        Linux kernel nvidia modules for version 5.15.0-46
ii  linux-modules-nvidia-515-generic-hwe-20.04 5.15.0-46.49~20.04.1                amd64        Extra drivers for nvidia-515 for the generic-hwe-20.04 flavour
ii  linux-objects-nvidia-515-5.15.0-46-generic 5.15.0-46.49~20.04.1                amd64        Linux kernel nvidia modules for version 5.15.0-46 (objects)
ii  linux-signatures-nvidia-5.15.0-46-generic  5.15.0-46.49~20.04.1                amd64        Linux kernel signatures for nvidia modules for version 5.15.0-46-generic
ii  nvidia-compute-utils-515                   515.65.01-0ubuntu0.20.04.1          amd64        NVIDIA compute utilities
ii  nvidia-driver-515                          515.65.01-0ubuntu0.20.04.1          amd64        NVIDIA driver metapackage
ii  nvidia-kernel-common-515                   515.65.01-0ubuntu0.20.04.1          amd64        Shared files used with the kernel module
ii  nvidia-kernel-source-515                   515.65.01-0ubuntu0.20.04.1          amd64        NVIDIA kernel source package
ii  nvidia-prime                               0.8.16~0.20.04.2                    all          Tools to enable NVIDIA's Prime
ii  nvidia-settings                            470.57.01-0ubuntu0.20.04.3          amd64        Tool for configuring the NVIDIA graphics driver
ii  nvidia-utils-515                           515.65.01-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-515              515.65.01-0ubuntu0.20.04.1          amd64        NVIDIA binary Xorg driver

dkms status is an empty string

image

secure boot is disabled

You have precompiled, signed nvidia modules for the standard kernel (5.15.0-46) installed but are running an oem kernel (5.14.0-1048-oem).
You’ll either have to switch to the standard kernel in grub or install the dkms modules instead.

So I installed dkms modules and I switched to the standard kernel (5.15.0-46) in the grub menu, it seemed to work the best, since when I reach the login screen, it also shows on the second monitor. The problem is that when I log into my account, my computer freezes and it disconnects from the monitor

Either or, doesn’t matter, though.
Please create a new nvidia-bug-report.log

data (450.5 KB)

If it matters, I generated this file from an oem kernel, since I couldn’t run anything on the standard one.

[   34.281583] [drm:__nv_drm_gem_nvkms_memory_prime_get_sg_table [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Cannot create sg_table for NvKmsKapiMemory 0x000000006bad1422

Please set kernel parameter
nvidia-drm.modeset=1

I’m not sure whether or not I did it correctly, since I have never set a kernel parameter, but I edited /ect/default/grub file and added the parameter you mentioned, at the end of the file.

I restarted my computer and in the GRUB menu, I chose advaced options, hovered the standard 5.15.0-46 kernel and pressed ‘e’. Then, I found a line that started with ‘linux’ and after the words “quiet splash” I wrote nvidia-drm.modeset=1 (remembered to add space after’splash’) and pressed F10.

I’m writing in so much detail since I’m not sure if I did everything correctly because unfortunately, I didn’t see any change.

Please remove it from the end of /ect/default/grub and put it inside
GRUB_CMDLINE_DEFAULT=“quiet splash nvidia-drm.modeset=1”
afterwards, run
sudo update-grub

In the login screen, please check what session is selected, should be gnome on Xorg.

1 Like

I changed the grub file and installed GNOME session manager and it works. Thanks!

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