Saving mixed monitor setup in xorg.conf

I have a GeForce GTX 1060 driving two monitors, one 28" 3840x2160 and one 24" 1920x1200 using linux mint 20.3 and GeForce driver version 510.73.05. My goal is to get a single desktop across both monitors such that dragging a window from one to the other is seamless. By default, the nvidia driver drives each screen at its native resolution, so if you drag a terminal from, say, the low-resolution monitor to the high resolution monitor, the terminal becomes extremely small and unusable.

Setting up the monitors either via the “NVIDIA X Server Settings” application or via xrandr command solves the desktop resolution issue. The following is the xrandr command since it’s a bit harder to explain how to do this in the GUI setup utility:

“xrandr --dpi 160 --fb 7104x2160
–output DP-2 --mode 3840x2160 --scale 1x1 --pos 0x0 --panning 3840x2160+0+0
–output DVI-D-0 --mode 1920x1200 --scale 1.7x1.737 --pos 3840x38 --panning 3264x2084+3840+38”

The result of both of these configuration options is to have both monitors display a single desktop with windows that are dragged from one monitor to the other looking the same. Essentially, the window displays with the same height and width, fonts look the same, etc.

The problem comes with the xorg.conf file that is saved from the NVIDIA X Server Settings application. When I restart X using that generated xorg.conf, the x server automagically creates a massive virtual destop in addition to correcting the displayed geometry. Essentially, the windows dragged from one screen to the other are correctly scaled for the monitor, but the monitors, together, display only about 1/4 of a massive virtual space. I’ve pretty much exhausted the documentation I could find about this and have found no way to fix the problem. For reference, here’s my current xorg.conf:

nvidia-xconfig: X configuration file generated by nvidia-xconfig

nvidia-xconfig: version 510.73.05

Section “ServerLayout”
Identifier “Layout0”
Screen 0 “Screen0” 0 0
InputDevice “Keyboard0” “CoreKeyboard”
InputDevice “Mouse0” “CorePointer”
Option “Xinerama” “0”
EndSection

Section “Files”
EndSection

Section “Module”
Load “dbe”
Load “extmod”
Load “type1”
Load “freetype”
Load “glx”
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 “Device”
Identifier “Device0”
Driver “nvidia”
VendorName “NVIDIA Corporation”
BoardName “NVIDIA GeForce GTX 1060 6GB”
EndSection

Section “Screen”
Identifier “Screen0”
Device “Device0”
DefaultDepth 24
Option “Stereo” “0”
Option “nvidiaXineramaInfoOrder” “DFP-5”
Option “metamodes” “DP-2: 3840x2160 +0+0 {ViewPortOut=3840x2160+0+0, ViewPortIn=3840x2160, PanningTrackingArea=3840x2160+0+0}, DVI-D-0: 1920x1200 +3840+38 {ViewPortOut=1920x1200+3840+38, ViewPortIn=3264x2084, PanningTrackingArea=3264x2084+3840+38}”
Option “SLI” “Off”
Option “MultiGPU” “Off”
Option “BaseMosaic” “off”
Option “UseEdidDpi” “FALSE”
SubSection “Display”
Depth 24
Modes “7104x2160”
EndSubSection
EndSection

This seems like it should do the same thing as the above mentioned xrandr command, but it doesn’t.

Any idea how to fix this?

A pointer to appropriate documentation would also be greatly appreciated.

Update: I should have mentioned, my current workaround is to log in, then immediately open a terminal and run the above-mentioned xrandr command.