Second Monitor not detected by Debian settings, is detected by NVidia

The problem

I did a fresh install of Debian 11 (Debian 5.10.162-1 (2023-01-21) x86_64 GNU/Linux) on my Omen 15 (15-en0xxx) laptop.

SecureBoot is currently disabled in my UEFI settings to ensure my issue is not related to unsigned software issues.

My laptop configuration is as follows:

KERNEL : 5.10.0-21-amd64

CPU : AMD Ryzen 5 4600H with Radeon Graphics (12) @ 3.000GHz

GPU : NVIDIA GeForce GTX 1660 Ti Mobile


I successfully installed the nvidia-driver package. In the next section my output logs should confirm this.

The problem is that when I plug in my second monitor, Debian does not detect this monitor at all and nothing is displayed on this monitor. This issue is present on both the HDMI port of my laptop and when using the Thunderbolt-to-DVI adapter I used to use when I had windows installed.

The nvidia-settings utility does detect the monitor correctly (both over HDMI and DVI-Adapter - see photo) but still nothing is displayed on the monitor and it is not vissible in debian settings.

Monitor is visible in nvidia-settings

The monitor and cable are confirmed working both by plugging in to another laptop and the GRUB bootloader cursor is displayed during the GRUB “phase” on the laptop with the issue. Once linux boots the monitor seems to lose connection and is no longer useable from within the linux installation.

Setup and environment information

All commands and output provided below were ran with the external monitor connected to the laptop.

Output for xrandr

Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 16384 x 16384
eDP connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 344mm x 194mm
   1920x1080    144.00*+  60.00  
   1680x1050    144.00  
   1280x1024    144.00  
   1440x900     144.00  
   1280x800     144.00  
   1280x720     144.00  
   1024x768     144.00  
   800x600      144.00  
   640x480      144.00

Output for xrandr --listproviders

Providers: number : 2
Provider 0: id: 0x54 cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 4 outputs: 1 associated providers: 0 name:Unknown AMD Radeon GPU @ pci:0000:06:00.0
Provider 1: id: 0x1f7 cap: 0x2, Sink Output crtcs: 4 outputs: 5 associated providers: 0 name:NVIDIA-G0

Output for xrandr --listmonitors

Monitors: 1
 0: +*eDP 1920/344x1080/194+0+0  eDP

Output for inxi -G

  Device-1: NVIDIA TU116M [GeForce GTX 1660 Ti Mobile] driver: nvidia 
  v: 470.161.03 
  Device-2: AMD Renoir driver: amdgpu v: kernel 
  Device-3: Luxvisions Innotech Limited HP Wide Vision HD Camera type: USB 
  driver: uvcvideo 
  Display: x11 server: X.Org 1.20.11 driver: loaded: amdgpu,ati,nvidia 
  unloaded: fbdev,modesetting,nouveau,vesa resolution: 1920x1080~144Hz 
  OpenGL: renderer: AMD RENOIR (DRM 3.40.0 5.10.0-21-amd64 LLVM 11.0.1) 
  v: 4.6 Mesa 20.3.5

Output for sudo lshw -c video

       description: VGA compatible controller
       product: TU116M [GeForce GTX 1660 Ti Mobile]
       vendor: NVIDIA Corporation
       physical id: 0
       bus info: pci@0000:01:00.0
       version: a1
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress vga_controller bus_master cap_list rom
       configuration: driver=nvidia latency=0
       resources: irq:102 memory:fb000000-fbffffff memory:b0000000-bfffffff memory:c0000000-c1ffffff ioport:f000(size=128) memory:fc000000-fc07ffff
       description: VGA compatible controller
       product: Renoir
       vendor: Advanced Micro Devices, Inc. [AMD/ATI]
       physical id: 0
       bus info: pci@0000:06:00.0
       version: c7
       width: 64 bits
       clock: 33MHz
       capabilities: pm pciexpress msi msix vga_controller bus_master cap_list
       configuration: driver=amdgpu latency=0
       resources: irq:51 memory:d0000000-dfffffff memory:e0000000-e01fffff ioport:d000(size=256) memory:fc500000-fc57ffff

Output for lsmod | grep nvidia

nvidia_drm             73728  2
nvidia_modeset       1204224  4 nvidia_drm
nvidia              35516416  107 nvidia_modeset
drm_kms_helper        278528  2 amdgpu,nvidia_drm
drm                   626688  13 gpu_sched,drm_kms_helper,nvidia,amdgpu,nvidia_drm,ttm

What I have tried

I have ran the nvidia-xconfig utility and rebooted. This generated an xorg.conf and my external monitor worked as expected. The built-in monitor of my laptop did however no longer present output (simply a black screen with a single static cursor in the top-left corner). This is not a solution to my problem.

Removing /etc/X11/xorg.conf and rebooting resulted in the built-in monitor of my laptop working again, but now the external monitor is again not working and not detected by debian settings (but, as before, visible in nvidia-settings).

What I would like to achieve

Being able to use my external monitor and main monitor of my laptop. The external monitor should extend my desktop and be manageable in the debian display settings.

If anyone could help me get this setup to work properly, it would be greatly appreciated.

Additional command output can be provided if any information is missing in my question.

Please set kernel parameter
and reboot, then run
xrandr --setprovideroutputsource NVIDIA-G0 modesetting && xrandr --auto

1 Like

Thank you. The setprovideroutputsource command returns “no provider named modesetting”. I jad come across this command already a few times while researching yesterday but it just didn’t seem to work.

Sorry, you have an AMD gpu so the correct command is
xrandr --setprovideroutputsource 1 0 && xrandr --auto

Did you mean AMD iGpu? Because my dGpu is Nvidia. Anyways I can only test these commands this evening.

of course.

Okay, executing

xrandr --setprovideroutputsource 1 0
xrandr --auto

did not result in any errors but I’m still unsure if my setup works correctly.

Since I created my original post I’ve also gone through the Linux CUDA setup guide by NVidia. This (as far as I understand it) also installed vulkan support.

(Steps I followed: CUDA Installation Guide for Linux).

Anyways when I run vulkaninfo | grep devicename from the vulkan-toolspackage the following is returned:

ERROR: [Loader Message] Code 0 : /usr/lib/i386-linux-gnu/ wrong ELF class: ELFCLASS32
ERROR: [Loader Message] Code 0 : /usr/lib/i386-linux-gnu/ wrong ELF class: ELFCLASS32
ERROR: [Loader Message] Code 0 : /usr/lib/i386-linux-gnu/ wrong ELF class: ELFCLASS32
WARNING: lavapipe is not a conformant vulkan implementation, testing use only.
	deviceName     = AMD RADV RENOIR (ACO)
	deviceName     = llvmpipe (LLVM 11.0.1, 256 bits)

Note that the first 4 lines (Error, error, error, warning) are STDERR.

The 5th line is what I’m confused about → it seems to suggest vulkan only recognizes my iGPU. Why is my dGPU not listed?

The biggest “change” in setup from my original post is that I moved from nvidia drivers 4xx (the default from standard debian non-free) to version 525.85.12 (which became available after I added the repo in the CUDA install steps).

Any suggestions as to why vulkan is not recognizing my dGPU? I assume I botched some configuration or didn’t set something up correctly but documentation is hard to find and all those “linux hint” website seem to say something different.

Please create a new nvidia-bug-report.log.

I restarted my computer today.

My xrandr-setup commands (I still run this manually for the moment) did return an error now. I did not notice or see this yesterday. A second monitor is attached now.

❯ xrandr --setprovideroutputsource 1 0
❯ xrandr --auto
xrandr: Configure crtc 4 failed

Output of sudo ran just now:

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

You did not set the kernel parameter.

Regarding Vulkan, the Nvidia ICD is not installed, should be in the package nvidia-vulkan-common.

I see, indeed I did not - when you mentioned it I added it by pressing E in GRUB being unaware this change is not persistent. I’ll retry.

Second monitor works OK now. I can’t seem to make it extend my desktop but I suspect this has more to do with Mutter and Cinnamon than it has to do with NVidia.

Anyways, setting kernel param and installing nvidia-vulkan-common does not seem to fix the issue I have with vulkan:

ERROR: [Loader Message] Code 0 : /usr/lib/i386-linux-gnu/ wrong ELF class: ELFCLASS32
ERROR: [Loader Message] Code 0 : /usr/lib/i386-linux-gnu/ wrong ELF class: ELFCLASS32
ERROR: [Loader Message] Code 0 : /usr/lib/i386-linux-gnu/ wrong ELF class: ELFCLASS32
The NVIDIA driver was unable to open ''.  This library is required at run time.

WARNING: [Loader Message] Code 0 : terminator_CreateInstance: Failed to CreateInstance in ICD 1.  Skipping ICD.
WARNING: lavapipe is not a conformant vulkan implementation, testing use only.
	deviceName     = AMD RADV RENOIR (ACO)
	deviceName     = llvmpipe (LLVM 11.0.1, 256 bits)

Seems there’s some more packages missing, please install the meta package nvidia-vulkan-icd, this should also pull in libnvidia-glvkspirv

Device is now indeed visible in output for vulkan-info. Steam doesn’t seem to use it though, all games that require rendering are extremely sluggish so I think it’s still running of the CPU.

I think I’m going for a reinstall (OS) now with all I know to do it “clean”, I probably have a whole bunch of useless junk on my disk from all my attempts.

A question: is there an nvidia repository available for all tools? E.g. nvidia drivers I have are 525.XXX but when I ran sudo apt install vulkan-tools I got a warning that conflicting driver version 3XX was going to be installed.

That seems to be an issue (debian repo driver is probably outdated) but I don’t want to install conflicting drivers when I download e.g. vulkan utilities.

What’s a good strategy to avoid this?

Thank you so far by the way for taking the time to help me here - really appreciated.

I can’t help you with the debian repo dependencies, those are often a mistery.
The nvidia gpu is in offload mode, meaning per default the amd igpu is used. To select the nvidia gpu, prepend
In steam, you can set the lauch options of the games you want to use the nvidia gpu to

Okay. I’ll mark this thread as solved now with the message above (the one with xrandr commands and the kernel parameter) as that solved the original issue stated in the title. Thank you for your help!

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