Unable to generate dual monitor xorg.conf with nvidia-xconfig

I’m using RHEL 7 and I’m having an issue generating xorg.conf from the command line. Its close but not quite there. The issue is it appears that I have to have the ModelName of the monitor in the Monitor section in order for the screen layout to work properly. Monitors are positioned one above the other. If this were just one or two systems, it would be no big deal to use nvidia-settings to layout the screens, but this is many systems across an enterprise.

While I could issue an xrandr command using a custom systemd service definition file, each system runs a secondary Xorg display which depends on a copy of xorg.conf for its screen layout. Adjusting the screen layout using xrandr on this secondary display does not always appear to work.

Additionally there is no guarantee the monitor will be the same on every system. This prevents generating a custom xorg.conf and using it everywhere. The only guarantee I have is the top screen will be attached to DVI-I-1.

xorg.conf generated by nvidia-setting:

# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings:  version 352.55  (buildmeister@swio-display-x64-rhel04-15)  Thu Oct  8 15:51:28 PDT 2015

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

Section "Files"
    FontPath        "/usr/share/fonts/default/Type1"
EndSection

Section "InputDevice"

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

Section "InputDevice"

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

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "NEC LCD2490WUXi2"
    HorizSync       31.0 - 92.0
    VertRefresh     50.0 - 85.0
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "Quadro K5200"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "Stereo" "0"
    Option         "nvidiaXineramaInfoOrder" "DFP-2"
    Option         "metamodes" "DP-1: nvidia-auto-select +0+1200, DVI-I-1: nvidia-auto-select +0+0"
    Option         "SLI" "Off"
    Option         "MultiGPU" "Off"
    Option         "BaseMosaic" "off"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Here is the command I used to generate xorg.conf from nvidia-xconfig:

nvidia-xconfig -a --metamodes=“DP-1: nvidia-auto-select +0+1200, DVI-I-1: nvidia-auto-select +0+0” --sli=off --stereo=0 --multigpu=off --nvidia-xinerama-info-order=DFP-2

xorg.conf generated by above command:

# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 352.55  (buildmeister@swio-display-x64-rhel04-15)  Thu Oct  8 15:52:34 PDT 2015

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

Section "Files"
    FontPath        "/usr/share/fonts/default/Type1"
EndSection

Section "InputDevice"

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

Section "InputDevice"

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

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Unknown"
    HorizSync       28.0 - 33.0
    VertRefresh     43.0 - 72.0
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "Quadro K5200"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "Stereo" "0"
    Option         "MultiGPU" "off"
    Option         "SLI" "off"
    Option         "MetaModes" "DP-1: nvidia-auto-select +0+1200, DVI-I-1: nvidia-auto-select +0+0"
    Option         "nvidiaXineramaInfoOrder" "DFP-2 DVI-I-1"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Immediatly the items I find in a diff are as follows:

In ServerLayout section: Missing " 0 0" on the screen line.

In Monitor section: missing the Modelname, HorizSync and VertRefresh are wrong.

In Screen section: “BaseMosaic” “off” is missing all together

Any help in fixing my command would be greatly appreciated.