DP connectors mixed up

Hello,

We have a simple configuration with two monitors that works great, as long as both are connected. But when booting up with the second monitor disconnected, x-screen #0 vanishes and x-screen #1 appears on the first monitor! This happens on an RTX 3060 card running the 535 driver on an Ubuntu 20.04 system. Looking into the xorg log files, it appears that the driver is giving up finding a valid mode for the primary monitor:

[ 10.090] (WW) NVIDIA(0): No valid modes for “GPU-0.Connector-0:1920x1080”; removing.

…but later on, when settings up the second screen, it obviously does find a valid mode. Please see attached screenshots on what it looks like in nvidia-settings, first under normal operations to the left and then when it is not working to the right:

And just to be clear: the “Ancor Communications Inc ASUS” monitor is connected on the same port in both cases! It is normally x-screen #0 but it is assigned x-screen #1 in the second case and moved to the right of a ghost x-screen #0 with 640x480 and no monitor.

The xorg log files under normal operations (second monitor connected):
second_monitor_connected.xorg.log (636.6 KB)

…and when it is not working (second monitor disconnected):
second_monitor_disconnected.xorg.log (351.8 KB)

The xorg configuration file looks like this:
xorg.conf.txt (1.8 KB)

Thanks for reading! Any help or suggestions are very much appreciated.

Kind Regards,
Mårten