Xorg Ryzen with bundled AMD + Nvidia RTX 2060 (mobile) HDMI interface not detected

I bought a new laptop a few days ago (Asus TUF with RTX 2060), performed a clean install of Kubuntu 18.04 and after having connected a second screen via HDMI, nothing happened.

I have a dual boot with grub (with Win10) and everything works fine on Windows.

I performed multiple steps trying to make this work, e.g. Secondary monitor via HDMI.

When running without any nvidia drivers installed, second screen was recognized but there were only some colorful pixels rendered there and I couldn’t use it anyway.

I tried installing the newest nvidia driver 440.64, tried installing some previous releases as well (440.44, 440.46).

When I installed the newest driver (440.64) having connected my HDMI cable, my second screen finally worked, but then I couldn’t use my laptop’s base screen (was not discovered, xrandr displayed no other interface than HDMI). Then I couldn’t revert my config to make my basic screen work (even tried purging all nvidia packages). After rebooting with disconnected HDMI cable, I just couldn’t render graphical interface and only text was available.
Reinstalled OS to make my basic screen work again.

I tried using lightdm, tried switching to gddm3.

After a few OS reinstalls (multiple versions - 18.04, 19.10, 20.04 multiple times) and some different Xorg config solutions, I gave up after 3 days and decided to ask for help over here.

Currently, I have Kubuntu 20.04 installed with recommended drivers (440.59).

Snippets below present some common data / configs and here’s the link to nvidia-bug-report.log.gz.

Here are also my /usr/share/X11/xorg.conf.d/ configs - xorg.conf.d.tar.gz.

I’m a pretty new Linux user and there are many things, I can’t figure out myself yet.

tom@tom-asus:~$ uname -a
Linux tom-asus 5.4.0-14-generic #17-Ubuntu SMP Thu Feb 6 22:47:59 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
tom@tom-asus:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu Focal Fossa (development branch)
Release:        20.04
Codename:       focal
tom@tom-asus:~$ ubuntu-drivers devices
== /sys/devices/pci0000:00/0000:00:01.1/0000:01:00.0 ==
modalias : pci:v000010DEd00001F11sv00001043sd0000140Fbc03sc00i00
vendor   : NVIDIA Corporation
model    : TU106M [GeForce RTX 2060 Mobile]
driver   : nvidia-driver-435 - distro non-free
driver   : nvidia-driver-440 - distro non-free recommended
driver   : xserver-xorg-video-nouveau - distro free builtin
tom@tom-asus:~$ apt list --installed | grep -i nvidia

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

libnvidia-cfg1-440/focal,now 440.59-0ubuntu2 amd64 [installed,automatic]
libnvidia-common-440/focal,focal,now 440.59-0ubuntu2 all [installed,automatic]
libnvidia-compute-440/focal,now 440.59-0ubuntu2 amd64 [installed,automatic]
libnvidia-compute-440/focal,now 440.59-0ubuntu2 i386 [installed,automatic]
libnvidia-decode-440/focal,now 440.59-0ubuntu2 amd64 [installed,automatic]
libnvidia-decode-440/focal,now 440.59-0ubuntu2 i386 [installed,automatic]
libnvidia-encode-440/focal,now 440.59-0ubuntu2 amd64 [installed,automatic]
libnvidia-encode-440/focal,now 440.59-0ubuntu2 i386 [installed,automatic]
libnvidia-fbc1-440/focal,now 440.59-0ubuntu2 amd64 [installed,automatic]
libnvidia-fbc1-440/focal,now 440.59-0ubuntu2 i386 [installed,automatic]
libnvidia-gl-440/focal,now 440.59-0ubuntu2 amd64 [installed,automatic]
libnvidia-gl-440/focal,now 440.59-0ubuntu2 i386 [installed,automatic]
libnvidia-ifr1-440/focal,now 440.59-0ubuntu2 amd64 [installed,automatic]
libnvidia-ifr1-440/focal,now 440.59-0ubuntu2 i386 [installed,automatic]
nvidia-compute-utils-440/focal,now 440.59-0ubuntu2 amd64 [installed,automatic]
nvidia-dkms-440/focal,now 440.59-0ubuntu2 amd64 [installed,automatic]
nvidia-driver-440/focal,now 440.59-0ubuntu2 amd64 [installed]
nvidia-kernel-common-440/focal,now 440.59-0ubuntu2 amd64 [installed,automatic]
nvidia-kernel-source-440/focal,now 440.59-0ubuntu2 amd64 [installed,automatic]
nvidia-prime/focal,focal,now 0.8.14 all [installed,automatic]
nvidia-settings/focal,now 440.44-0ubuntu1 amd64 [installed,automatic]
nvidia-utils-440/focal,now 440.59-0ubuntu2 amd64 [installed,automatic]
xserver-xorg-video-nvidia-440/focal,now 440.59-0ubuntu2 amd64 [installed,automatic]
tom@tom-asus:~$ prime-select query
nvidia
tom@tom-asus:~$ dmesg | grep -i nvidia
[    1.475679] nvidia-gpu 0000:01:00.3: enabling device (0000 -> 0002)
[    1.680323] nvidia: loading out-of-tree module taints kernel.
[    1.680329] nvidia: module license 'NVIDIA' taints kernel.
[    1.699725] nvidia: module verification failed: signature and/or required key missing - tainting kernel
[    1.707871] nvidia-nvlink: Nvlink Core is being initialized, major device number 236
[    1.708621] nvidia 0000:01:00.0: enabling device (0000 -> 0003)
[    1.708793] nvidia 0000:01:00.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=none:owns=none
[    1.756725] NVRM: loading NVIDIA UNIX x86_64 Kernel Module  440.59  Thu Jan 30 01:00:41 UTC 2020
[    1.798625] nvidia-modeset: Loading NVIDIA Kernel Mode Setting Driver for UNIX platforms  440.59  Thu Jan 30 00:59:18 UTC 2020
[    2.088411] [drm] [nvidia-drm] [GPU ID 0x00000100] Loading driver
[    2.088413] [drm] Initialized nvidia-drm 0.0.0 20160202 for 0000:01:00.0 on minor 1
[    2.817532] nvidia-uvm: Loaded the UVM driver, major device number 511.
[    4.171021] input: HDA NVidia HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:01.1/0000:01:00.1/sound/card0/input14
tom@tom-asus:~$ lspci | grep -i vga
01:00.0 VGA compatible controller: NVIDIA Corporation TU106M [GeForce RTX 2060 Mobile] (rev a1)
05:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Picasso (rev c1)
tom@tom-asus:~$ xrandr --verbose
Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 16384 x 16384
eDP connected primary 1920x1080+0+0 (0x55) normal (normal left inverted right x axis y axis) 344mm x 194mm
        Identifier: 0x53
        Timestamp:  45903
        Subpixel:   unknown
        Gamma:      1.0:1.0:1.0
        Brightness: 1.0
        Clones:    
        CRTC:       0
        CRTCs:      0 1 2 3
        Transform:  1.000000 0.000000 0.000000
                    0.000000 1.000000 0.000000
                    0.000000 0.000000 1.000000
                   filter: 
        EDID: 
                00ffffffffffff003870360000000000
                011c0104a5221378036850985c588e28
                1b505400000001010101010101010101
                0101010101010b8380047138ca403020
                350058c21000001a0b83800471384d48
                3020350058c21000001a000000fd0030
                789a9a22010a202020202020000000fe
                004c4d3135364c462d474c30330a00c9
        GAMMA_LUT_SIZE: 4096 
                range: (0, -1)
        DEGAMMA_LUT_SIZE: 4096 
                range: (0, -1)
        GAMMA_LUT: 0 
                range: (0, 65535)
        CTM: 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 
                0 1 
        DEGAMMA_LUT: 0 
                range: (0, 65535)
        TearFree: auto 
                supported: off, on, auto
        vrr_capable: 1 
                range: (0, 1)
        abm level: 0 
                range: (0, 4)
        max bpc: 8 
                range: (8, 16)
        underscan vborder: 0 
                range: (0, 128)
        underscan hborder: 0 
                range: (0, 128)
        underscan: off 
                supported: off, on, auto
        scaling mode: None 
                supported: None, Full, Center, Full aspect
        link-status: Good 
                supported: Good, Bad
        CONNECTOR_ID: 64 
                supported: 64
        non-desktop: 0 
                range: (0, 1)
  1920x1080 (0x55) 335.470MHz +HSync -VSync *current +preferred
        h: width  1920 start 1968 end 2000 total 2180 skew    0 clock 153.89KHz
        v: height 1080 start 1083 end 1088 total 1282           clock 120.04Hz
  1920x1080 (0x56) 335.470MHz +HSync -VSync
        h: width  1920 start 1968 end 2000 total 2180 skew    0 clock 153.89KHz
        v: height 1080 start 1083 end 1088 total 3205           clock  48.01Hz
  1680x1050 (0x57) 335.470MHz +HSync -VSync
        h: width  1680 start 1968 end 2000 total 2180 skew    0 clock 153.89KHz
        v: height 1050 start 1083 end 1088 total 1282           clock 120.04Hz
  1280x1024 (0x58) 335.470MHz +HSync -VSync
        h: width  1280 start 1968 end 2000 total 2180 skew    0 clock 153.89KHz
        v: height 1024 start 1083 end 1088 total 1282           clock 120.04Hz
  1440x900 (0x59) 335.470MHz +HSync -VSync
        h: width  1440 start 1968 end 2000 total 2180 skew    0 clock 153.89KHz
        v: height  900 start 1083 end 1088 total 1282           clock 120.04Hz
  1280x800 (0x5a) 335.470MHz +HSync -VSync
        h: width  1280 start 1968 end 2000 total 2180 skew    0 clock 153.89KHz
        v: height  800 start 1083 end 1088 total 1282           clock 120.04Hz
  1280x720 (0x5b) 335.470MHz +HSync -VSync
        h: width  1280 start 1968 end 2000 total 2180 skew    0 clock 153.89KHz
        v: height  720 start 1083 end 1088 total 1282           clock 120.04Hz
  1024x768 (0x5c) 335.470MHz +HSync -VSync
        h: width  1024 start 1968 end 2000 total 2180 skew    0 clock 153.89KHz
        v: height  768 start 1083 end 1088 total 1282           clock 120.04Hz
  800x600 (0x5d) 335.470MHz +HSync -VSync
        h: width   800 start 1968 end 2000 total 2180 skew    0 clock 153.89KHz
        v: height  600 start 1083 end 1088 total 1282           clock 120.04Hz
  640x480 (0x5e) 335.470MHz +HSync -VSync
        h: width   640 start 1968 end 2000 total 2180 skew    0 clock 153.89KHz
        v: height  480 start 1083 end 1088 total 1282           clock 120.04Hz

A little update.

All I did today was apt-get update, apt-get upgrade and xrandr recognizes HDMI output now.

Screen 0: minimum 320 x 200, current 3840 x 1080, maximum 16384 x 16384
eDP-1 connected primary 1920x1080+0+0 (0x45) normal (normal left inverted right x axis y axis) 344mm x 194mm
	Identifier: 0x43
	Timestamp:  95480
	Subpixel:   unknown
	Gamma:      1.0:1.0:1.0
	Brightness: 1.0
	Clones:    
	CRTC:       0
	CRTCs:      0 1 2 3
	Transform:  1.000000 0.000000 0.000000
	            0.000000 1.000000 0.000000
	            0.000000 0.000000 1.000000
	           filter: 
	EDID: 
		00ffffffffffff003870360000000000
		011c0104a5221378036850985c588e28
		1b505400000001010101010101010101
		0101010101010b8380047138ca403020
		350058c21000001a0b83800471384d48
		3020350058c21000001a000000fd0030
		789a9a22010a202020202020000000fe
		004c4d3135364c462d474c30330a00c9
	vrr_capable: 1 
		range: (0, 1)
	abm level: 0 
		range: (0, 4)
	max bpc: 8 
		range: (8, 16)
	underscan vborder: 0 
		range: (0, 128)
	underscan hborder: 0 
		range: (0, 128)
	underscan: off 
		supported: off, on, auto
	scaling mode: None 
		supported: None, Full, Center, Full aspect
	link-status: Good 
		supported: Good, Bad
	CONNECTOR_ID: 64 
		supported: 64
	non-desktop: 0 
		range: (0, 1)
  1920x1080 (0x45) 335.470MHz +HSync -VSync *current +preferred
        h: width  1920 start 1968 end 2000 total 2180 skew    0 clock 153.89KHz
        v: height 1080 start 1083 end 1088 total 1282           clock 120.04Hz
  1920x1080 (0x46) 335.470MHz +HSync -VSync
        h: width  1920 start 1968 end 2000 total 2180 skew    0 clock 153.89KHz
        v: height 1080 start 1083 end 1088 total 3205           clock  48.01Hz
  1680x1050 (0x47) 335.470MHz +HSync -VSync
        h: width  1680 start 1968 end 2000 total 2180 skew    0 clock 153.89KHz
        v: height 1050 start 1083 end 1088 total 1282           clock 120.04Hz
  1280x1024 (0x48) 335.470MHz +HSync -VSync
        h: width  1280 start 1968 end 2000 total 2180 skew    0 clock 153.89KHz
        v: height 1024 start 1083 end 1088 total 1282           clock 120.04Hz
  1440x900 (0x49) 335.470MHz +HSync -VSync
        h: width  1440 start 1968 end 2000 total 2180 skew    0 clock 153.89KHz
        v: height  900 start 1083 end 1088 total 1282           clock 120.04Hz
  1280x800 (0x4a) 335.470MHz +HSync -VSync
        h: width  1280 start 1968 end 2000 total 2180 skew    0 clock 153.89KHz
        v: height  800 start 1083 end 1088 total 1282           clock 120.04Hz
  1280x720 (0x4b) 335.470MHz +HSync -VSync
        h: width  1280 start 1968 end 2000 total 2180 skew    0 clock 153.89KHz
        v: height  720 start 1083 end 1088 total 1282           clock 120.04Hz
  1024x768 (0x4c) 335.470MHz +HSync -VSync
        h: width  1024 start 1968 end 2000 total 2180 skew    0 clock 153.89KHz
        v: height  768 start 1083 end 1088 total 1282           clock 120.04Hz
  800x600 (0x4d) 335.470MHz +HSync -VSync
        h: width   800 start 1968 end 2000 total 2180 skew    0 clock 153.89KHz
        v: height  600 start 1083 end 1088 total 1282           clock 120.04Hz
  640x480 (0x4e) 335.470MHz +HSync -VSync
        h: width   640 start 1968 end 2000 total 2180 skew    0 clock 153.89KHz
        v: height  480 start 1083 end 1088 total 1282           clock 120.04Hz
HDMI-1-1 connected 1920x1080+1920+0 (0x84) normal (normal left inverted right x axis y axis) 480mm x 270mm
	Identifier: 0x82
	Timestamp:  95480
	Subpixel:   unknown
	Gamma:      1.0:1.0:1.0
	Brightness: 1.0
	Clones:    
	CRTC:       4
	CRTCs:      4 5 6 7
	Transform:  1.000000 0.000000 0.000000
	            0.000000 1.000000 0.000000
	            0.000000 0.000000 1.000000
	           filter: 
	EDID: 
		00ffffffffffff001e6db85a01010101
		0118010380301b78ea3135a5554ea126
		0c5054a54b00714f81809500b300a9c0
		810081c09040023a801871382d40582c
		4500e00e1100001e000000fd00384b1e
		530f000a202020202020000000fc004c
		47204950532046554c4c4844000000ff
		000a2020202020202020202020200164
		02031df14a900403011412051f101323
		0907078301000065030c001000023a80
		1871382d40582c4500e00e1100001e01
		1d8018711c1620582c2500e00e110000
		9e011d007251d01e206e285500e00e11
		00001e8c0ad08a20e02d10103e9600e0
		0e110000180000000000000000000000
		000000000000000000000000000000ae
	PRIME Synchronization: 1 
		supported: 0, 1
	dithering depth: auto 
		supported: auto, 6 bpc, 8 bpc
	dithering mode: auto 
		supported: auto, off, static 2x2, dynamic 2x2, temporal
	scaling mode: None 
		supported: None, Full, Center, Full aspect
	color vibrance: 150 
		range: (0, 200)
	vibrant hue: 90 
		range: (0, 180)
	underscan vborder: 0 
		range: (0, 128)
	underscan hborder: 0 
		range: (0, 128)
	underscan: off 
		supported: auto, off, on
	link-status: Good 
		supported: Good, Bad
	CONNECTOR_ID: 85 
		supported: 85
	non-desktop: 0 
		range: (0, 1)
  1920x1080 (0x84) 148.500MHz +HSync +VSync *current +preferred
        h: width  1920 start 2008 end 2052 total 2200 skew    0 clock  67.50KHz
        v: height 1080 start 1084 end 1089 total 1125           clock  60.00Hz
  1920x1080 (0x85) 148.500MHz +HSync +VSync
        h: width  1920 start 2448 end 2492 total 2640 skew    0 clock  56.25KHz
        v: height 1080 start 1084 end 1089 total 1125           clock  50.00Hz
  1920x1080 (0x86) 148.352MHz +HSync +VSync
        h: width  1920 start 2008 end 2052 total 2200 skew    0 clock  67.43KHz
        v: height 1080 start 1084 end 1089 total 1125           clock  59.94Hz
  1920x1080 (0x87) 138.500MHz +HSync -VSync
        h: width  1920 start 1968 end 2000 total 2080 skew    0 clock  66.59KHz
        v: height 1080 start 1083 end 1088 total 1111           clock  59.93Hz
  1920x1080i (0x88) 74.250MHz +HSync +VSync Interlace
        h: width  1920 start 2008 end 2052 total 2200 skew    0 clock  33.75KHz
        v: height 1080 start 1084 end 1094 total 1125           clock  60.00Hz
  1920x1080i (0x89) 74.250MHz +HSync +VSync Interlace
        h: width  1920 start 2448 end 2492 total 2640 skew    0 clock  28.12KHz
        v: height 1080 start 1084 end 1094 total 1125           clock  50.00Hz
  1920x1080i (0x8a) 74.176MHz +HSync +VSync Interlace
        h: width  1920 start 2008 end 2052 total 2200 skew    0 clock  33.72KHz
        v: height 1080 start 1084 end 1094 total 1125           clock  59.94Hz
  1680x1050 (0x8b) 146.250MHz -HSync +VSync
        h: width  1680 start 1784 end 1960 total 2240 skew    0 clock  65.29KHz
        v: height 1050 start 1053 end 1059 total 1089           clock  59.95Hz
  1680x1050 (0x8c) 119.000MHz +HSync -VSync
        h: width  1680 start 1728 end 1760 total 1840 skew    0 clock  64.67KHz
        v: height 1050 start 1053 end 1059 total 1080           clock  59.88Hz
  1600x1024 (0x8d) 103.125MHz +HSync +VSync
        h: width  1600 start 1600 end 1656 total 1664 skew    0 clock  61.97KHz
        v: height 1024 start 1024 end 1029 total 1030           clock  60.17Hz
  1400x1050 (0x8e) 155.800MHz +HSync +VSync
        h: width  1400 start 1464 end 1784 total 1912 skew    0 clock  81.49KHz
        v: height 1050 start 1052 end 1064 total 1090           clock  74.76Hz
  1400x1050 (0x8f) 145.060MHz -HSync +VSync
        h: width  1400 start 1496 end 1648 total 1896 skew    0 clock  76.51KHz
        v: height 1050 start 1051 end 1054 total 1093           clock  70.00Hz
  1400x1050 (0x90) 122.000MHz +HSync +VSync
        h: width  1400 start 1488 end 1640 total 1880 skew    0 clock  64.89KHz
        v: height 1050 start 1052 end 1064 total 1082           clock  59.98Hz
  1400x1050 (0x91) 101.000MHz +HSync -VSync
        h: width  1400 start 1448 end 1480 total 1560 skew    0 clock  64.74KHz
        v: height 1050 start 1053 end 1057 total 1080           clock  59.95Hz
  1600x900 (0x92) 118.250MHz -HSync +VSync
        h: width  1600 start 1696 end 1856 total 2112 skew    0 clock  55.99KHz
        v: height  900 start  903 end  908 total  934           clock  59.95Hz
  1600x900 (0x93) 108.000MHz +HSync +VSync
        h: width  1600 start 1624 end 1704 total 1800 skew    0 clock  60.00KHz
        v: height  900 start  901 end  904 total 1000           clock  60.00Hz
  1600x900 (0x94) 97.500MHz +HSync -VSync
        h: width  1600 start 1648 end 1680 total 1760 skew    0 clock  55.40KHz
        v: height  900 start  903 end  908 total  926           clock  59.82Hz
  1280x1024 (0x95) 135.000MHz +HSync +VSync
        h: width  1280 start 1296 end 1440 total 1688 skew    0 clock  79.98KHz
        v: height 1024 start 1025 end 1028 total 1066           clock  75.02Hz
  1280x1024 (0x96) 108.000MHz +HSync +VSync
        h: width  1280 start 1328 end 1440 total 1688 skew    0 clock  63.98KHz
        v: height 1024 start 1025 end 1028 total 1066           clock  60.02Hz
  1440x900 (0x97) 106.500MHz -HSync +VSync
        h: width  1440 start 1520 end 1672 total 1904 skew    0 clock  55.93KHz
        v: height  900 start  903 end  909 total  934           clock  59.89Hz
  1440x900 (0x98) 88.750MHz +HSync -VSync
        h: width  1440 start 1488 end 1520 total 1600 skew    0 clock  55.47KHz
        v: height  900 start  903 end  909 total  926           clock  59.90Hz
  1400x900 (0x99) 103.500MHz -HSync +VSync
        h: width  1400 start 1480 end 1624 total 1848 skew    0 clock  56.01KHz
        v: height  900 start  903 end  913 total  934           clock  59.96Hz
  1400x900 (0x9a) 86.500MHz +HSync -VSync
        h: width  1400 start 1448 end 1480 total 1560 skew    0 clock  55.45KHz
        v: height  900 start  903 end  913 total  926           clock  59.88Hz
  1280x960 (0x9b) 108.000MHz +HSync +VSync
        h: width  1280 start 1376 end 1488 total 1800 skew    0 clock  60.00KHz
        v: height  960 start  961 end  964 total 1000           clock  60.00Hz
  1440x810 (0x9c) 151.875MHz +HSync -VSync DoubleScan
        h: width  1440 start 1464 end 1480 total 1520 skew    0 clock  99.92KHz
        v: height  810 start  811 end  814 total  833           clock  59.97Hz
  1368x768 (0x9d) 85.250MHz -HSync +VSync
        h: width  1368 start 1440 end 1576 total 1784 skew    0 clock  47.79KHz
        v: height  768 start  771 end  781 total  798           clock  59.88Hz
  1368x768 (0x9e) 72.250MHz +HSync -VSync
        h: width  1368 start 1416 end 1448 total 1528 skew    0 clock  47.28KHz
        v: height  768 start  771 end  781 total  790           clock  59.85Hz
  1360x768 (0x9f) 84.750MHz -HSync +VSync
        h: width  1360 start 1432 end 1568 total 1776 skew    0 clock  47.72KHz
        v: height  768 start  771 end  781 total  798           clock  59.80Hz
  1360x768 (0xa0) 72.000MHz +HSync -VSync
        h: width  1360 start 1408 end 1440 total 1520 skew    0 clock  47.37KHz
        v: height  768 start  771 end  781 total  790           clock  59.96Hz
  1280x800 (0xa1) 134.250MHz +HSync -VSync DoubleScan
        h: width  1280 start 1304 end 1320 total 1360 skew    0 clock  98.71KHz
        v: height  800 start  801 end  804 total  823           clock  59.97Hz
  1280x800 (0xa2) 83.500MHz -HSync +VSync
        h: width  1280 start 1352 end 1480 total 1680 skew    0 clock  49.70KHz
        v: height  800 start  803 end  809 total  831           clock  59.81Hz
  1280x800 (0xa3) 71.000MHz +HSync -VSync
        h: width  1280 start 1328 end 1360 total 1440 skew    0 clock  49.31KHz
        v: height  800 start  803 end  809 total  823           clock  59.91Hz
  1152x864 (0xa4) 108.000MHz +HSync +VSync
        h: width  1152 start 1216 end 1344 total 1600 skew    0 clock  67.50KHz
        v: height  864 start  865 end  868 total  900           clock  75.00Hz
  1152x864 (0xa5) 104.990MHz -HSync +VSync
        h: width  1152 start 1224 end 1352 total 1552 skew    0 clock  67.65KHz
        v: height  864 start  865 end  868 total  902           clock  75.00Hz
  1152x864 (0xa6) 96.770MHz -HSync +VSync
        h: width  1152 start 1224 end 1344 total 1536 skew    0 clock  63.00KHz
        v: height  864 start  865 end  868 total  900           clock  70.00Hz
  1152x864 (0xa7) 81.620MHz -HSync +VSync
        h: width  1152 start 1216 end 1336 total 1520 skew    0 clock  53.70KHz
        v: height  864 start  865 end  868 total  895           clock  60.00Hz
  1280x720 (0xa8) 156.125MHz -HSync +VSync DoubleScan
        h: width  1280 start 1376 end 1512 total 1744 skew    0 clock  89.52KHz
        v: height  720 start  721 end  724 total  746           clock  60.00Hz
  1280x720 (0xa9) 120.750MHz +HSync -VSync DoubleScan
        h: width  1280 start 1304 end 1320 total 1360 skew    0 clock  88.79KHz
        v: height  720 start  721 end  724 total  740           clock  59.99Hz
  1280x720 (0xaa) 74.500MHz -HSync +VSync
        h: width  1280 start 1344 end 1472 total 1664 skew    0 clock  44.77KHz
        v: height  720 start  723 end  728 total  748           clock  59.86Hz
  1280x720 (0xab) 74.250MHz +HSync +VSync
        h: width  1280 start 1390 end 1430 total 1650 skew    0 clock  45.00KHz
        v: height  720 start  725 end  730 total  750           clock  60.00Hz
  1280x720 (0xac) 74.250MHz +HSync +VSync
        h: width  1280 start 1720 end 1760 total 1980 skew    0 clock  37.50KHz
        v: height  720 start  725 end  730 total  750           clock  50.00Hz
  1280x720 (0xad) 74.176MHz +HSync +VSync
        h: width  1280 start 1390 end 1430 total 1650 skew    0 clock  44.96KHz
        v: height  720 start  725 end  730 total  750           clock  59.94Hz
  1280x720 (0xae) 63.750MHz +HSync -VSync
        h: width  1280 start 1328 end 1360 total 1440 skew    0 clock  44.27KHz
        v: height  720 start  723 end  728 total  741           clock  59.74Hz
  1024x768 (0xaf) 133.475MHz -HSync +VSync DoubleScan
        h: width  1024 start 1100 end 1212 total 1400 skew    0 clock  95.34KHz
        v: height  768 start  768 end  770 total  794           clock  60.04Hz
  1024x768 (0xb0) 78.750MHz +HSync +VSync
        h: width  1024 start 1040 end 1136 total 1312 skew    0 clock  60.02KHz
        v: height  768 start  769 end  772 total  800           clock  75.03Hz
  1024x768 (0xb1) 75.000MHz -HSync -VSync
        h: width  1024 start 1048 end 1184 total 1328 skew    0 clock  56.48KHz
        v: height  768 start  771 end  777 total  806           clock  70.07Hz
  1024x768 (0xb2) 65.000MHz -HSync -VSync
        h: width  1024 start 1048 end 1184 total 1344 skew    0 clock  48.36KHz
        v: height  768 start  771 end  777 total  806           clock  60.00Hz
  960x720 (0xb3) 148.500MHz -HSync +VSync DoubleScan
        h: width   960 start 1032 end 1144 total 1320 skew    0 clock 112.50KHz
        v: height  720 start  720 end  722 total  750           clock  75.00Hz
  960x720 (0xb4) 117.000MHz -HSync +VSync DoubleScan
        h: width   960 start 1024 end 1128 total 1300 skew    0 clock  90.00KHz
        v: height  720 start  720 end  722 total  750           clock  60.00Hz
  928x696 (0xb5) 144.000MHz -HSync +VSync DoubleScan
        h: width   928 start  992 end 1104 total 1280 skew    0 clock 112.50KHz
        v: height  696 start  696 end  698 total  750           clock  75.00Hz
  928x696 (0xb6) 109.150MHz -HSync +VSync DoubleScan
        h: width   928 start  976 end 1088 total 1264 skew    0 clock  86.35KHz
        v: height  696 start  696 end  698 total  719           clock  60.05Hz
  896x672 (0xb7) 130.500MHz -HSync +VSync DoubleScan
        h: width   896 start  944 end 1052 total 1228 skew    0 clock 106.27KHz
        v: height  672 start  672 end  674 total  708           clock  75.05Hz
  896x672 (0xb8) 102.400MHz -HSync +VSync DoubleScan
        h: width   896 start  960 end 1060 total 1224 skew    0 clock  83.66KHz
        v: height  672 start  672 end  674 total  697           clock  60.01Hz
  1024x576 (0xb9) 98.500MHz -HSync +VSync DoubleScan
        h: width  1024 start 1092 end 1200 total 1376 skew    0 clock  71.58KHz
        v: height  576 start  577 end  580 total  597           clock  59.95Hz
  1024x576 (0xba) 78.375MHz +HSync -VSync DoubleScan
        h: width  1024 start 1048 end 1064 total 1104 skew    0 clock  70.99KHz
        v: height  576 start  577 end  580 total  592           clock  59.96Hz
  1024x576 (0xbb) 46.500MHz -HSync +VSync
        h: width  1024 start 1064 end 1160 total 1296 skew    0 clock  35.88KHz
        v: height  576 start  579 end  584 total  599           clock  59.90Hz
  1024x576 (0xbc) 42.000MHz +HSync -VSync
        h: width  1024 start 1072 end 1104 total 1184 skew    0 clock  35.47KHz
        v: height  576 start  579 end  584 total  593           clock  59.82Hz
  960x600 (0xbd) 96.625MHz -HSync +VSync DoubleScan
        h: width   960 start 1028 end 1128 total 1296 skew    0 clock  74.56KHz
        v: height  600 start  601 end  604 total  622           clock  59.93Hz
  960x600 (0xbe) 77.000MHz +HSync -VSync DoubleScan
        h: width   960 start  984 end 1000 total 1040 skew    0 clock  74.04KHz
        v: height  600 start  601 end  604 total  617           clock  60.00Hz
  832x624 (0xbf) 57.284MHz -HSync -VSync
        h: width   832 start  864 end  928 total 1152 skew    0 clock  49.73KHz
        v: height  624 start  625 end  628 total  667           clock  74.55Hz
  960x540 (0xc0) 86.500MHz -HSync +VSync DoubleScan
        h: width   960 start 1024 end 1124 total 1288 skew    0 clock  67.16KHz
        v: height  540 start  541 end  544 total  560           clock  59.96Hz
  960x540 (0xc1) 69.250MHz +HSync -VSync DoubleScan
        h: width   960 start  984 end 1000 total 1040 skew    0 clock  66.59KHz
        v: height  540 start  541 end  544 total  555           clock  59.99Hz
  960x540 (0xc2) 40.750MHz -HSync +VSync
        h: width   960 start  992 end 1088 total 1216 skew    0 clock  33.51KHz
        v: height  540 start  543 end  548 total  562           clock  59.63Hz
  960x540 (0xc3) 37.250MHz +HSync -VSync
        h: width   960 start 1008 end 1040 total 1120 skew    0 clock  33.26KHz
        v: height  540 start  543 end  548 total  556           clock  59.82Hz
  800x600 (0xc4) 101.250MHz +HSync +VSync DoubleScan
        h: width   800 start  832 end  928 total 1080 skew    0 clock  93.75KHz
        v: height  600 start  600 end  602 total  625           clock  75.00Hz
  800x600 (0xc5) 94.500MHz +HSync +VSync DoubleScan
        h: width   800 start  832 end  928 total 1080 skew    0 clock  87.50KHz
        v: height  600 start  600 end  602 total  625           clock  70.00Hz
  800x600 (0xc6) 87.750MHz +HSync +VSync DoubleScan
        h: width   800 start  832 end  928 total 1080 skew    0 clock  81.25KHz
        v: height  600 start  600 end  602 total  625           clock  65.00Hz
  800x600 (0xc7) 81.000MHz +HSync +VSync DoubleScan
        h: width   800 start  832 end  928 total 1080 skew    0 clock  75.00KHz
        v: height  600 start  600 end  602 total  625           clock  60.00Hz
  800x600 (0xc8) 50.000MHz +HSync +VSync
        h: width   800 start  856 end  976 total 1040 skew    0 clock  48.08KHz
        v: height  600 start  637 end  643 total  666           clock  72.19Hz
  800x600 (0xc9) 49.500MHz +HSync +VSync
        h: width   800 start  816 end  896 total 1056 skew    0 clock  46.88KHz
        v: height  600 start  601 end  604 total  625           clock  75.00Hz
  800x600 (0xca) 40.000MHz +HSync +VSync
        h: width   800 start  840 end  968 total 1056 skew    0 clock  37.88KHz
        v: height  600 start  601 end  605 total  628           clock  60.32Hz
  800x600 (0xcb) 36.000MHz +HSync +VSync
        h: width   800 start  824 end  896 total 1024 skew    0 clock  35.16KHz
        v: height  600 start  601 end  603 total  625           clock  56.25Hz
  840x525 (0xcc) 93.500MHz -HSync +VSync DoubleScan
        h: width   840 start  900 end  988 total 1136 skew    0 clock  82.31KHz
        v: height  525 start  526 end  529 total  549           clock  74.96Hz
  840x525 (0xcd) 87.000MHz -HSync +VSync DoubleScan
        h: width   840 start  900 end  988 total 1136 skew    0 clock  76.58KHz
        v: height  525 start  526 end  529 total  548           clock  69.88Hz
  840x525 (0xce) 73.125MHz -HSync +VSync DoubleScan
        h: width   840 start  892 end  980 total 1120 skew    0 clock  65.29KHz
        v: height  525 start  526 end  529 total  544           clock  60.01Hz
  840x525 (0xcf) 59.500MHz +HSync -VSync DoubleScan
        h: width   840 start  864 end  880 total  920 skew    0 clock  64.67KHz
        v: height  525 start  526 end  529 total  540           clock  59.88Hz
  864x486 (0xd0) 32.500MHz -HSync +VSync
        h: width   864 start  888 end  968 total 1072 skew    0 clock  30.32KHz
        v: height  486 start  489 end  494 total  506           clock  59.92Hz
  864x486 (0xd1) 30.500MHz +HSync -VSync
        h: width   864 start  912 end  944 total 1024 skew    0 clock  29.79KHz
        v: height  486 start  489 end  494 total  500           clock  59.57Hz
  720x576 (0xd2) 27.000MHz -HSync -VSync
        h: width   720 start  732 end  796 total  864 skew    0 clock  31.25KHz
        v: height  576 start  581 end  586 total  625           clock  50.00Hz
  800x512 (0xd3) 51.562MHz +HSync +VSync DoubleScan
        h: width   800 start  800 end  828 total  832 skew    0 clock  61.97KHz
        v: height  512 start  512 end  514 total  515           clock  60.17Hz
  700x525 (0xd4) 77.900MHz +HSync +VSync DoubleScan
        h: width   700 start  732 end  892 total  956 skew    0 clock  81.49KHz
        v: height  525 start  526 end  532 total  545           clock  74.76Hz
  700x525 (0xd5) 72.530MHz -HSync +VSync DoubleScan
        h: width   700 start  748 end  824 total  948 skew    0 clock  76.51KHz
        v: height  525 start  525 end  527 total  546           clock  70.06Hz
  700x525 (0xd6) 61.000MHz +HSync +VSync DoubleScan
        h: width   700 start  744 end  820 total  940 skew    0 clock  64.89KHz
        v: height  525 start  526 end  532 total  541           clock  59.98Hz
  800x450 (0xd7) 59.125MHz -HSync +VSync DoubleScan
        h: width   800 start  848 end  928 total 1056 skew    0 clock  55.99KHz
        v: height  450 start  451 end  454 total  467           clock  59.95Hz
  800x450 (0xd8) 48.750MHz +HSync -VSync DoubleScan
        h: width   800 start  824 end  840 total  880 skew    0 clock  55.40KHz
        v: height  450 start  451 end  454 total  463           clock  59.82Hz
  720x480 (0xd9) 27.027MHz -HSync -VSync
        h: width   720 start  736 end  798 total  858 skew    0 clock  31.50KHz
        v: height  480 start  489 end  495 total  525           clock  60.00Hz
  720x480 (0xda) 27.000MHz -HSync -VSync
        h: width   720 start  736 end  798 total  858 skew    0 clock  31.47KHz
        v: height  480 start  489 end  495 total  525           clock  59.94Hz
  640x512 (0xdb) 67.500MHz +HSync +VSync DoubleScan
        h: width   640 start  648 end  720 total  844 skew    0 clock  79.98KHz
        v: height  512 start  512 end  514 total  533           clock  75.02Hz
  640x512 (0xdc) 54.000MHz +HSync +VSync DoubleScan
        h: width   640 start  664 end  720 total  844 skew    0 clock  63.98KHz
        v: height  512 start  512 end  514 total  533           clock  60.02Hz
  720x450 (0xdd) 53.250MHz -HSync +VSync DoubleScan
        h: width   720 start  760 end  836 total  952 skew    0 clock  55.93KHz
        v: height  450 start  451 end  454 total  467           clock  59.89Hz
  700x450 (0xde) 51.750MHz -HSync +VSync DoubleScan
        h: width   700 start  740 end  812 total  924 skew    0 clock  56.01KHz
        v: height  450 start  451 end  456 total  467           clock  59.96Hz
  700x450 (0xdf) 43.250MHz +HSync -VSync DoubleScan
        h: width   700 start  724 end  740 total  780 skew    0 clock  55.45KHz
        v: height  450 start  451 end  456 total  463           clock  59.88Hz
  640x480 (0xe0) 54.000MHz +HSync +VSync DoubleScan
        h: width   640 start  688 end  744 total  900 skew    0 clock  60.00KHz
        v: height  480 start  480 end  482 total  500           clock  60.00Hz
  640x480 (0xe1) 31.500MHz -HSync -VSync
        h: width   640 start  656 end  720 total  840 skew    0 clock  37.50KHz
        v: height  480 start  481 end  484 total  500           clock  75.00Hz
  640x480 (0xe2) 31.500MHz -HSync -VSync
        h: width   640 start  664 end  704 total  832 skew    0 clock  37.86KHz
        v: height  480 start  489 end  492 total  520           clock  72.81Hz
  640x480 (0xe1) 31.500MHz -HSync -VSync
        h: width   640 start  656 end  720 total  840 skew    0 clock  37.50KHz
        v: height  480 start  481 end  484 total  500           clock  75.00Hz
  640x480 (0xe3) 25.200MHz -HSync -VSync
        h: width   640 start  656 end  752 total  800 skew    0 clock  31.50KHz
        v: height  480 start  490 end  492 total  525           clock  60.00Hz
  640x480 (0xe4) 25.175MHz -HSync -VSync
        h: width   640 start  656 end  752 total  800 skew    0 clock  31.47KHz
        v: height  480 start  490 end  492 total  525           clock  59.94Hz
  720x405 (0xe5) 22.500MHz -HSync +VSync
        h: width   720 start  744 end  808 total  896 skew    0 clock  25.11KHz
        v: height  405 start  408 end  413 total  422           clock  59.51Hz
  720x405 (0xe6) 21.750MHz +HSync -VSync
        h: width   720 start  768 end  800 total  880 skew    0 clock  24.72KHz
        v: height  405 start  408 end  413 total  419           clock  58.99Hz
  720x400 (0xe7) 28.320MHz -HSync +VSync
        h: width   720 start  738 end  846 total  900 skew    0 clock  31.47KHz
        v: height  400 start  412 end  414 total  449           clock  70.08Hz
  684x384 (0xe8) 42.625MHz -HSync +VSync DoubleScan
        h: width   684 start  720 end  788 total  892 skew    0 clock  47.79KHz
        v: height  384 start  385 end  390 total  399           clock  59.88Hz
  684x384 (0xe9) 36.125MHz +HSync -VSync DoubleScan
        h: width   684 start  708 end  724 total  764 skew    0 clock  47.28KHz
        v: height  384 start  385 end  390 total  395           clock  59.85Hz
  680x384 (0xea) 42.375MHz -HSync +VSync DoubleScan
        h: width   680 start  716 end  784 total  888 skew    0 clock  47.72KHz
        v: height  384 start  385 end  390 total  399           clock  59.80Hz
  680x384 (0xeb) 36.000MHz +HSync -VSync DoubleScan
        h: width   680 start  704 end  720 total  760 skew    0 clock  47.37KHz
        v: height  384 start  385 end  390 total  395           clock  59.96Hz
  640x400 (0xec) 41.750MHz -HSync +VSync DoubleScan
        h: width   640 start  676 end  740 total  840 skew    0 clock  49.70KHz
        v: height  400 start  401 end  404 total  415           clock  59.88Hz
  640x400 (0xed) 35.500MHz +HSync -VSync DoubleScan
        h: width   640 start  664 end  680 total  720 skew    0 clock  49.31KHz
        v: height  400 start  401 end  404 total  411           clock  59.98Hz
  576x432 (0xee) 54.000MHz +HSync +VSync DoubleScan
        h: width   576 start  608 end  672 total  800 skew    0 clock  67.50KHz
        v: height  432 start  432 end  434 total  450           clock  75.00Hz
  576x432 (0xef) 52.495MHz -HSync +VSync DoubleScan
        h: width   576 start  612 end  676 total  776 skew    0 clock  67.65KHz
        v: height  432 start  432 end  434 total  451           clock  75.00Hz
  576x432 (0xf0) 48.385MHz -HSync +VSync DoubleScan
        h: width   576 start  612 end  672 total  768 skew    0 clock  63.00KHz
        v: height  432 start  432 end  434 total  450           clock  70.00Hz
  576x432 (0xf1) 40.810MHz -HSync +VSync DoubleScan
        h: width   576 start  608 end  668 total  760 skew    0 clock  53.70KHz
        v: height  432 start  432 end  434 total  447           clock  60.06Hz
  640x360 (0xf2) 37.250MHz -HSync +VSync DoubleScan
        h: width   640 start  672 end  736 total  832 skew    0 clock  44.77KHz
        v: height  360 start  361 end  364 total  374           clock  59.86Hz
  640x360 (0xf3) 31.875MHz +HSync -VSync DoubleScan
        h: width   640 start  664 end  680 total  720 skew    0 clock  44.27KHz
        v: height  360 start  361 end  364 total  370           clock  59.83Hz
  640x360 (0xf4) 18.000MHz -HSync +VSync
        h: width   640 start  664 end  720 total  800 skew    0 clock  22.50KHz
        v: height  360 start  363 end  368 total  376           clock  59.84Hz
  640x360 (0xf5) 17.750MHz +HSync -VSync
        h: width   640 start  688 end  720 total  800 skew    0 clock  22.19KHz
        v: height  360 start  363 end  368 total  374           clock  59.32Hz
  512x384 (0xf6) 39.375MHz +HSync +VSync DoubleScan
        h: width   512 start  520 end  568 total  656 skew    0 clock  60.02KHz
        v: height  384 start  384 end  386 total  400           clock  75.03Hz
  512x384 (0xf7) 37.500MHz -HSync -VSync DoubleScan
        h: width   512 start  524 end  592 total  664 skew    0 clock  56.48KHz
        v: height  384 start  385 end  388 total  403           clock  70.07Hz
  512x384 (0xf8) 32.500MHz -HSync -VSync DoubleScan
        h: width   512 start  524 end  592 total  672 skew    0 clock  48.36KHz
        v: height  384 start  385 end  388 total  403           clock  60.00Hz
  512x288 (0xf9) 23.250MHz -HSync +VSync DoubleScan
        h: width   512 start  532 end  580 total  648 skew    0 clock  35.88KHz
        v: height  288 start  289 end  292 total  299           clock  60.00Hz
  512x288 (0xfa) 21.000MHz +HSync -VSync DoubleScan
        h: width   512 start  536 end  552 total  592 skew    0 clock  35.47KHz
        v: height  288 start  289 end  292 total  296           clock  59.92Hz
  416x312 (0xfb) 28.642MHz -HSync -VSync DoubleScan
        h: width   416 start  432 end  464 total  576 skew    0 clock  49.73KHz
        v: height  312 start  312 end  314 total  333           clock  74.66Hz
  480x270 (0xfc) 20.375MHz -HSync +VSync DoubleScan
        h: width   480 start  496 end  544 total  608 skew    0 clock  33.51KHz
        v: height  270 start  271 end  274 total  281           clock  59.63Hz
  480x270 (0xfd) 18.625MHz +HSync -VSync DoubleScan
        h: width   480 start  504 end  520 total  560 skew    0 clock  33.26KHz
        v: height  270 start  271 end  274 total  278           clock  59.82Hz
  400x300 (0xfe) 25.000MHz +HSync +VSync DoubleScan
        h: width   400 start  428 end  488 total  520 skew    0 clock  48.08KHz
        v: height  300 start  318 end  321 total  333           clock  72.19Hz
  400x300 (0xff) 24.750MHz +HSync +VSync DoubleScan
        h: width   400 start  408 end  448 total  528 skew    0 clock  46.88KHz
        v: height  300 start  300 end  302 total  312           clock  75.12Hz
  400x300 (0x100) 20.000MHz +HSync +VSync DoubleScan
        h: width   400 start  420 end  484 total  528 skew    0 clock  37.88KHz
        v: height  300 start  300 end  302 total  314           clock  60.32Hz
  400x300 (0x101) 18.000MHz +HSync +VSync DoubleScan
        h: width   400 start  412 end  448 total  512 skew    0 clock  35.16KHz
        v: height  300 start  300 end  301 total  312           clock  56.34Hz
  432x243 (0x102) 16.250MHz -HSync +VSync DoubleScan
        h: width   432 start  444 end  484 total  536 skew    0 clock  30.32KHz
        v: height  243 start  244 end  247 total  253           clock  59.92Hz
  432x243 (0x103) 15.250MHz +HSync -VSync DoubleScan
        h: width   432 start  456 end  472 total  512 skew    0 clock  29.79KHz
        v: height  243 start  244 end  247 total  250           clock  59.57Hz
  320x240 (0x104) 15.750MHz -HSync -VSync DoubleScan
        h: width   320 start  332 end  352 total  416 skew    0 clock  37.86KHz
        v: height  240 start  244 end  246 total  260           clock  72.81Hz
  320x240 (0x105) 15.750MHz -HSync -VSync DoubleScan
        h: width   320 start  328 end  360 total  420 skew    0 clock  37.50KHz
        v: height  240 start  240 end  242 total  250           clock  75.00Hz
  320x240 (0x106) 12.587MHz -HSync -VSync DoubleScan
        h: width   320 start  328 end  376 total  400 skew    0 clock  31.47KHz
        v: height  240 start  245 end  246 total  262           clock  60.05Hz
  360x202 (0x107) 11.250MHz -HSync +VSync DoubleScan
        h: width   360 start  372 end  404 total  448 skew    0 clock  25.11KHz
        v: height  202 start  204 end  206 total  211           clock  59.51Hz
  360x202 (0x108) 10.875MHz +HSync -VSync DoubleScan
        h: width   360 start  384 end  400 total  440 skew    0 clock  24.72KHz
        v: height  202 start  204 end  206 total  209           clock  59.13Hz
  320x180 (0x109)  9.000MHz -HSync +VSync DoubleScan
        h: width   320 start  332 end  360 total  400 skew    0 clock  22.50KHz
        v: height  180 start  181 end  184 total  188           clock  59.84Hz
  320x180 (0x10a)  8.875MHz +HSync -VSync DoubleScan
        h: width   320 start  344 end  360 total  400 skew    0 clock  22.19KHz
        v: height  180 start  181 end  184 total  187           clock  59.32Hz

I can’t yet use my monitor, though.
When I want to extend the screen, all I can see on the second screen is the cursor. When I move any window to the second screen, it just isn’t displayed there. If I aim the window borders, though, cursor changes and I can change the window size or move the window on the second screen. It just isn’t displayed and all I can see is the black screen with cursor.

So, I played around with xorg.conf.
I used nvidia-xsetting to create basic xorg.conf, which enabled HDMI, but completely disabled my laptop basic screen.
After having modified the file a little, my both screens finally work!

That’s how my /etc/X11/xorg.conf looks like:

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0"
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
EndSection

Section "Files"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/psaux"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Keyboard0"
    Driver         "kbd"
EndSection

Section "Monitor"
    Identifier     "Monitor0"
    Option         "DPMS"
    Option         "LeftOf"      "Monitor1"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BusID          "PCI:1:0:0"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Section "Device"
    Identifier     "Device1"
    Driver         "amdgpu"
    BusID          "PCI:5:0:0"
EndSection

Section "Monitor"
    Identifier     "Monitor1"
    Option         "DPMS"
    Option         "RightOf"      "Monitor0"
EndSection

Section "Screen"
    Identifier     "Screen1"
    Device         "Device1"
    Monitor        "Monitor1"
    DefaultDepth    24
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Is there a solution for Wayland instead of X.org?

The better way to do this on xorg and ubuntu would be:
https://forums.developer.nvidia.com/t/nvidia-xconfig-doesnt-do-what-i-want-it-to-nor-does-nvidia-settings/107883/7?u=generix
Regarding wayland, this would be up to the compositor used, nothing configurable.