[Debian+KDE] Cannot configure dual monitor setup, external monitor detected but not recognized by desktop environment

Hi,

I cannot configure a dual monitor setup with a fresh install of Debian 11 with KDE as desktop environment. From the Plasma settings I can only see the built-in monitor of my laptop (ASUS TUF GAMING FX504).

I’ve disabled Secure Boot and after the Debian installation I’ve just installed the required non-free hardware:

apt-add-repository contrib
apt-add-repository non-free
apt install firmware-linux-non-free
apt install firmware-misc-non-free
apt install nvidia-driver

I paste below the output of nvidia-smi:

root@asus-tuf-gaming-fx504:~# nvidia-smi 
Wed Mar  1 15:46:32 2023       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 470.161.03   Driver Version: 470.161.03   CUDA Version: 11.4     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  NVIDIA GeForce ...  On   | 00000000:01:00.0 Off |                  N/A |
| N/A   41C    P8     3W /  N/A |      6MiB /  6078MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A       680      G   /usr/lib/xorg/Xorg                  4MiB |
+-----------------------------------------------------------------------------+

xrandr output:

root@asus-tuf-gaming-fx504:~/Downloads$ xrandr 
Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 16384 x 16384
eDP-1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 344mm x 193mm
   1920x1080    120.00*+  60.01    59.97    59.96    59.93  
   1680x1050     84.94    74.89    69.88    59.95    59.88  
   1600x1024     60.17  
   1400x1050     85.00    74.76    70.00    59.98  
   1600x900      59.99    59.94    59.95    59.82  
   1280x1024     85.02    75.02    60.02  
   1440x900      59.89  
   1400x900      59.96    59.88  
   1280x960      85.00    60.00  
   1440x810      60.00    59.97  
   1368x768      59.88    59.85  
   1360x768      59.80    59.96  
   1280x800      59.99    59.97    59.81    59.91  
   1152x864     100.00    85.06    85.00    75.00    75.00    70.00    60.00  
   1280x720      60.00    59.99    59.86    59.74  
   1024x768      85.00    75.05    60.04    85.00    75.03    70.07    60.00  
   1024x768i     86.96  
   960x720       85.00    75.00    60.00  
   928x696       75.00    60.05  
   896x672       75.05    60.01  
   1024x576      59.95    59.96    59.90    59.82  
   960x600       59.93    60.00  
   832x624       74.55  
   960x540       59.96    59.99    59.63    59.82  
   800x600       85.00    75.00    70.00    65.00    60.00    85.14    72.19    75.00    60.32    56.25  
   840x525       85.02    74.96    69.88    60.01    59.88  
   864x486       59.92    59.57  
   800x512       60.17  
   700x525       85.08    74.76    70.06    59.98  
   800x450       59.95    59.82  
   640x512       85.02    75.02    60.02  
   720x450       59.89  
   700x450       59.96    59.88  
   640x480       85.09    60.00    85.01    72.81    75.00    59.94  
   720x405       59.51    58.99  
   720x400       85.04  
   684x384       59.88    59.85  
   680x384       59.80    59.96  
   640x400       59.88    59.98    85.08  
   576x432      100.11    85.15    85.09    75.00    75.00    70.00    60.06  
   640x360       59.86    59.83    59.84    59.32  
   640x350       85.08  
   512x384       85.00    75.03    70.07    60.00  
   512x384i      87.06  
   512x288       60.00    59.92  
   416x312       74.66  
   480x270       59.63    59.82  
   400x300       85.27    72.19    75.12    60.32    56.34  
   432x243       59.92    59.57  
   320x240       85.18    72.81    75.00    60.05  
   360x202       59.51    59.13  
   360x200       85.04  
   320x200       85.27  
   320x180       59.84    59.32  
   320x175       85.27  
root@asus-tuf-gaming-fx504:~/Downloads$ xrandr --listmonitors 
Monitors: 1
 0: +*eDP-1 1920/344x1080/193+0+0  eDP-1

lspci output:

root@asus-tuf-gaming-fx504:~# lspci
00:00.0 Host bridge: Intel Corporation 8th Gen Core 4-core Processor Host Bridge/DRAM Registers [Coffee Lake H] (rev 07)
00:01.0 PCI bridge: Intel Corporation 6th-10th Gen Core Processor PCIe Controller (x16) (rev 07)
00:02.0 VGA compatible controller: Intel Corporation CoffeeLake-H GT2 [UHD Graphics 630]
00:04.0 Signal processing controller: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Thermal Subsystem (rev 07)
00:08.0 System peripheral: Intel Corporation Xeon E3-1200 v5/v6 / E3-1500 v5 / 6th/7th/8th Gen Core Processor Gaussian Mixture Model
00:12.0 Signal processing controller: Intel Corporation Cannon Lake PCH Thermal Controller (rev 10)
00:14.0 USB controller: Intel Corporation Cannon Lake PCH USB 3.1 xHCI Host Controller (rev 10)
00:14.2 RAM memory: Intel Corporation Cannon Lake PCH Shared SRAM (rev 10)
00:14.3 Network controller: Intel Corporation Wireless-AC 9560 [Jefferson Peak] (rev 10)
00:15.0 Serial bus controller [0c80]: Intel Corporation Cannon Lake PCH Serial IO I2C Controller #0 (rev 10)
00:16.0 Communication controller: Intel Corporation Cannon Lake PCH HECI Controller (rev 10)
00:17.0 SATA controller: Intel Corporation Cannon Lake Mobile PCH SATA AHCI Controller (rev 10)
00:1d.0 PCI bridge: Intel Corporation Cannon Lake PCH PCI Express Root Port #9 (rev f0)
00:1d.6 PCI bridge: Intel Corporation Cannon Lake PCH PCI Express Root Port #15 (rev f0)
00:1f.0 ISA bridge: Intel Corporation HM470 Chipset LPC/eSPI Controller (rev 10)
00:1f.3 Audio device: Intel Corporation Cannon Lake PCH cAVS (rev 10)
00:1f.4 SMBus: Intel Corporation Cannon Lake PCH SMBus Controller (rev 10)
00:1f.5 Serial bus controller [0c80]: Intel Corporation Cannon Lake PCH SPI Controller (rev 10)
01:00.0 VGA compatible controller: NVIDIA Corporation GP106M [GeForce GTX 1060 Mobile] (rev a1)
01:00.1 Audio device: NVIDIA Corporation GP106 High Definition Audio Controller (rev a1)
02:00.0 Non-Volatile memory controller: Kingston Technology Company, Inc. U-SNS8154P3 NVMe SSD (rev 01)
03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 15)

From nvidia-settings GUI I can see that the external monitor is indeed detected via HDMI (BenQ EW2480).

I tried multiple changes (reverting all of them):

  • adding nvidia-drm.modeset=1 to kernel boot params
  • adding the following lines to /etc/initramfs-tools/modules and the running update-iniramfs -u:
     nvidia
     nvidia-modeset
     nvidia-drm
    
  • manually configuring xorg device definition:
    #/etc/X11/xorg.conf.d/20-nvidia.conf
    Section "Device"
                   Identifier "GPU"
                   Driver "nvidia"
    EndSection
    

With the last change I was able to display the screen on the external monitor but the laptop monitor turned totally black and unresponsive.

Could you please help to manage both monitors displaying them side by side?

Please, find attached the bug report logs.
nvidia-bug-report.log.gz (270.8 KB)

Please set kernel parameter
nvidia-drm.modeset=1
reboot, then run
xrandr --setprovideroutputsource NVIDIA-G0 modesetting && xrandr --auto
to enable the external monitor.

2 Likes

Thanks @generix, it solved the problem.

I guess that now I have to update the GRUB default config and run that xrandr command at startup to make this config survive after the next reboot.

I think that the kernel param forces the loading of that module at boot-time. Googling around I found out an explanation for why the second command is needed. I quote it here from nvidia docs for future reference:

The X server does not automatically enable displays attached using the output sink in this configuration. To do that, use the xrandr command line tool.
For NVIDIA as an output source:
$ xrandr --setprovideroutputsource modesetting NVIDIA-0 $ xrandr --auto
For NVIDIA as an output sink:
$ xrandr --setprovideroutputsource NVIDIA-G0 modesetting $ xrandr --auto
This pair of commands can be added to your X session startup scripts, for example by putting them in $HOME/.xinitrc before running startx.
Use the
$ xrandr --listproviders

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