Dual monitor nvidia config

Hello, iḿ with the same problem and can’t see what you to do even looking at your asnwer @bogdancovaciu.
I’m noob too so…
This is my current preview of my preview from Nvidia Settings:

# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings:  version 460.80


Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0" 0 0
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
    Option         "Xinerama" "0"
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"

    # HorizSync source: edid, VertRefresh source: edid
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Samsung S24D332"
    HorizSync       30.0 - 85.0
    VertRefresh     50.0 - 75.0
    Option         "DPMS"
EndSection

Section "Monitor"

    # HorizSync source: edid, VertRefresh source: edid
    Identifier     "Monitor1"
    VendorName     "Unknown"
    ModelName      "LG Electronics E2241"
    HorizSync       30.0 - 83.0
    VertRefresh     56.0 - 75.0
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce GTX 1060 6GB"
    BusID          "PCI:1:0:0"
EndSection

Section "Device"
    Identifier     "Device1"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce GTX 1060 6GB"
    BusID          "PCI:1:0:0"
    Screen          1
EndSection

Section "Screen"

# Removed Option "metamodes" "HDMI-0: nvidia-auto-select +0+0"
# Removed Option "metamodes" "DVI-D-0: nvidia-auto-select +1920+0 {rotation=right}, HDMI-0: nvidia-auto-select +0+0"
# Removed Option "metamodes" "DVI-D-0: nvidia-auto-select +1920+0 {rotation=right}, HDMI-0: nvidia-auto-select +0+470"
# Removed Option "metamodes" "HDMI-0: nvidia-auto-select +0+0, DVI-D-0: nvidia-auto-select +1920+0 {rotation=right}"
# Removed Option "metamodes" "DVI-D-0: nvidia-auto-select +1920+0 {rotation=right}, HDMI-0: nvidia-auto-select +0+484"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "Stereo" "0"
    Option         "nvidiaXineramaInfoOrder" "DFP-1"
    Option         "metamodes" "HDMI-0: nvidia-auto-select +0+484, DVI-D-0: nvidia-auto-select +1920+0 {rotation=right}"
    Option         "SLI" "Off"
    Option         "MultiGPU" "Off"
    Option         "BaseMosaic" "off"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Section "Screen"
    Identifier     "Screen1"
    Device         "Device1"
    Monitor        "Monitor1"
    DefaultDepth    24
    Option         "Stereo" "0"
    Option         "metamodes" "DVI-D-0: nvidia-auto-select +0+0 {AllowGSYNC=Off}"
    Option         "SLI" "Off"
    Option         "MultiGPU" "Off"
    Option         "BaseMosaic" "off"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

And this is my /etc/X11/mhwd.d/nvidia.conf:

# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 460.67

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"
    VendorName     "Unknown"
    ModelName      "Unknown"
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
	Option "NoLogo" "1"
EndSection

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

Section "Extensions"
    Option         "COMPOSITE" "Enable"
EndSection

 
Section "InputClass"
    Identifier          "Keyboard Defaults"
    MatchIsKeyboard        "yes"
    Option              "XkbOptions" "terminate:ctrl_alt_bksp"
EndSection

Both monitors shows image on login but the user button and top panel is on the wrong monitor. Its showing on LG Electronics E2241 and I want it to displayed on Samsung S24D332. After the login Samsung S24D332 becomes the primary, showing stuff like dock and top panel and LG Electronics E2241 becomes secondary.

Just to make sure, do you or not have dual GPU, 2 of the same model of GeForce GTX 1060 6GB?
Hard to tell even tho i see the PCI BusID …

Just one GPU and both monitor are connected on it. Samsung S24D332 at the HDMI slot and LG Electronics E2241 at DVI slot

Ok, before we start editing files, can you please make sure in Plasma Settings, your desired monitor is set as Primary ?

I’m using Gnome but yes, my desired monitor (Samsung S24D332 ) is set as primary.
Just as note, at the system the primary monitor is working as expected. Just on login, before loading system, the monitors are switched. Everytime I logout to login interface the monitors are switched and everytime that I enter the system the monitors work as expected.

Ok, much clearer now. Lets start with this then, as explained in previous topic, backup your original file first then edit it and paste this instead:

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"
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/psaux"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"
    Identifier     "Keyboard0"
    Driver         "kbd"
EndSection

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Samsung"
    ModelName      "Samsung S24D332"
    HorizSync       30.0 - 85.0
    VertRefresh     50.0 - 75.0
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce GTX 1060 6GB"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "Stereo" "0"
    Option         "nvidiaXineramaInfoOrder" "DFP-1"
    Option         "metamodes" "HDMI-0: nvidia-auto-select +0+484, DVI-D-0: nvidia-auto-select +1920+0 {rotation=right}"
    Option         "SLI" "Off"
    Option         "MultiGPU" "Off"
    Option         "BaseMosaic" "off"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Section "Extensions"
    Option         "COMPOSITE" "Enable"
EndSection

 
Section "InputClass"
    Identifier          "Keyboard Defaults"
    MatchIsKeyboard        "yes"
    Option              "XkbOptions" "terminate:ctrl_alt_bksp"
EndSection

But this +0+484 is something you added to your layout and you want it like this ?

1 Like

Yes, the position of the monitors its kinda messy on my desk. xP
So to match them I set it like this.
Im going to a online meeting now but as soon as is finish Ill edit the file here. I’ll let you know!
Thanks!!!

P.S:. The file that I should edit is the /etc/X11/mhwd.d/nvidia.conf or the /etc/X11/xorg.conf

Youŕe the best! It is working like a charm! Thank you!!!

I edited the /etc/X11/mhwd.d/nvidia.conf

1 Like

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