Manjaro 21.1.0 KDE nvidia gpu with dual monitor setup second monitor black screen

Please share your new configuration …

I checked and there is only one option for nvidia driver
please see the screenshot below

I am downloading Gnome to give it a try

Here is my nvidia-conf file:

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

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      "DELL S2721DGF"
    HorizSync       250.0 - 250.0
    VertRefresh     48.0 - 165.0
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "NVIDIA GeForce GTX 1660"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "Stereo" "0"
    Option         "nvidiaXineramaInfoOrder" "DFP-2"
    Option         "metamodes" "DP-2: 2560x1440_165 +2560+0, DP-0: 2560x1440_165 +0+0"
    Option         "SLI" "Off"
    Option         "MultiGPU" "Off"
    Option         "BaseMosaic" "off"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

what I noticed is that after applying the changes (which is DP0 monitor 2560x1440 , 165Hz , to the Left of DP2 monitor | DP2 monitor 2560x1440 , 165Hz , Absolute position (this is my main monitor)) it just blinks and goes back to some other setting like it reverted itself but the nvidia-config window still says the config mentioned above in the columns.

So it might not be able to apply the config?

also here is my .xinitrc file:

#!/bin/bash
#
# ~/.xinitrc
#
# Executed by startx (run your window manager from here)

userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap

DEFAULT_SESSION=startplasma-x11

# merge in defaults and keymaps

if [ -f $sysresources ]; then
    xrdb -merge $sysresources
fi

if [ -f $sysmodmap ]; then
    xmodmap $sysmodmap
fi

if [ -f "$userresources" ]; then
    xrdb -merge "$userresources"
fi

if [ -f "$usermodmap" ]; then
    xmodmap "$usermodmap"
fi

# start some nice programs

if [ -d /etc/X11/xinit/xinitrc.d ] ; then
    for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
        [ -x "$f" ] && . "$f"
    done
    unset f
fi

get_session(){
    local dbus_args=(--sh-syntax --exit-with-session)
    case $1 in
        awesome) dbus_args+=(awesome) ;;
        bspwm) dbus_args+=(bspwm-session) ;;
        budgie) dbus_args+=(budgie-desktop) ;;
        cinnamon) dbus_args+=(cinnamon-session) ;;
        deepin) dbus_args+=(startdde) ;;
        enlightenment) dbus_args+=(enlightenment_start) ;;
        fluxbox) dbus_args+=(startfluxbox) ;;
        gnome) dbus_args+=(gnome-session) ;;
        i3|i3wm) dbus_args+=(i3 --shmlog-size 0) ;;
        jwm) dbus_args+=(jwm) ;;
        kde) dbus_args+=(startplasma-x11) ;;
        lxde) dbus_args+=(startlxde) ;;
        lxqt) dbus_args+=(lxqt-session) ;;
        mate) dbus_args+=(mate-session) ;;
        xfce) dbus_args+=(xfce4-session) ;;
        openbox) dbus_args+=(openbox-session) ;;
        *) dbus_args+=($DEFAULT_SESSION) ;;
    esac

    echo "dbus-launch ${dbus_args[*]}"
}
**nvidia-settings --load-config-only**
exec $(get_session "$1")

now after reboot all the settings are back to default.
in nvidia-settings it does detect the second monitor but it has the same black screen

Please make sure next time you properly format the text when posting it on the forum.
.nvidia-settings-rc should belong to you as user, not root (just mentioning it)

Try this config:

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 "Monitor"
    Identifier     "Monitor0"
    VendorName     "DELL"
    ModelName      "DELL S2721DGF"
    HorizSync       250.0 - 250.0
    VertRefresh     48.0 - 165.0
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "NVIDIA GeForce GTX 1660"
    Option  "ConnectToAcpid"    "Off"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "Stereo" "0"
    Option         "nvidiaXineramaInfoOrder" "DFP-0"
    Option         "metamodes" "DP-2: 2560x1440_165 +2560+0 {ForceCompositionPipeline=On}, DP-0: 2560x1440_165 +0+0 {ForceCompositionPipeline=On}"
    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
 

Make a backup of yours first.

Some good news.
I changed ownership on the file:
chown -R t1v1wards:t1v1wards ~/.nvidia-settings-rc

ls -ld ~/.nvidia-settings-rc

-rw-r–r-- 1 t1v1wards t1v1wards 2589 aug 20 13.04 /home/t1v1wards/.nvidia-settings-rc

Now its owned by my user.

I was able to run nvidia-settings with sudo and check/change the correct settings. Once applied it is now saved (I think there was a popup asking me to confirm the settings on the black monitor so I blindly pressed Tab and Enter until it worked).
After reboot changes are saved and looking great although the main problem is still present and my second monitor is just a black screen still.

Here are some screenshots of the settings after reboot.





My nvidia.conf file content:

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

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      "DELL S2721DGF"
    HorizSync       250.0 - 250.0
    VertRefresh     48.0 - 165.0
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "NVIDIA GeForce GTX 1660"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "Stereo" "0"
    Option         "nvidiaXineramaInfoOrder" "DFP-2"
    Option         "metamodes" "DP-2: 2560x1440_165 +2560+0 {ForceCompositionPipeline=On}, DP-0: 2560x1440_165 +0+0 {ForceCompositionPipeline=On}"
    Option         "SLI" "Off"
    Option         "MultiGPU" "Off"
    Option         "BaseMosaic" "off"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Any idea why my second screen is still displaying black screen?

I am just trying different options in the meantime and even with i3wm it does not work.
I run the command: xrandr --output DP-0 --auto --left-of DP-2

Secondary monitor turns of but still just black screen.

any ideas to solve this dual monitor issue? should I just buy an AMD GPU?

of or off or on ?
if is off then it will be black.

You are still missing a couple of entries in comparison with the one i provided, did you tried it yet?

Have you tried to disable DPMS?
xset -dpms
to reenable it
xset +dpms

Have you tried a different cable?

Another thing. That black is as if the monitor is off, or if you move a window there you can see it? If you can see it, then just change the background …

Sorry it turns ON and stays with a black screen.

xset -dpms and then xset +dpms did not help.

Yes, tried different cables, same thing unfortunately.

I’ve added the missing parts to the config but its still the same.


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

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 "Monitor"
    # HorizSync source: edid, VertRefresh source: edid
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "DELL S2721DGF"
    HorizSync       250.0 - 250.0
    VertRefresh     48.0 - 165.0
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "NVIDIA GeForce GTX 1660"
    Option         "ConnectToAcpid"    "Off"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "Stereo" "0"
    Option         "nvidiaXineramaInfoOrder" "DFP-2"
    Option         "metamodes" "DP-2: 2560x1440_165 +2560+0 {ForceCompositionPipeline=On}, DP-0: 2560x1440_165 +0+0 {ForceCompositionPipeline=On}"
    Option         "SLI" "Off"
    Option         "MultiGPU" "Off"
    Option         "BaseMosaic" "off"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

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

As if the monitor is on and I can move a window or mouse pointer to it but cannot see as its black. So its not like its just a black background… I cannot see the desktop interface at all.

It works on another OS? And you switch the connectors between monitors and always is the same monitor or the one connected to a certain port, also you tried to power off and on the monitor from the in built power button?
If that is the case, and always the same result, then i’m left out of ideas.

Tried with PopOS (nvidia version) but did not work. Should I try ubuntu too?
Switched ports on the gpu and on the monitor but still the same results.
I just tried kernel version 5.4, 5.10 with nvidia-driver reinstall and its still not working.

Can you try two HDMI cables (at this point it is not relevant to have 165Hz, find what works for now)?

1 Like

Yeah, totally agree with this, and OP could try to remove the line

in the nvidia.config and instead use
Option "metamodes" "nvidia-auto-select +0+0 {ForceCompositionPipeline=On}"

I turned on ForceCompositionPipeline on all two monitors but no luck.

I also tried second monitor via HDMI and its very strange (haven’t seen such thing during my career) its displaying the interface but with super low brightness and even when I somehow on the monitor’s UI increase it its still soo dim that I cannot really see anything.

So with HDMI we can say its kind of working but still unusable.

At this point I am trying the second (on the left) monitor and just that without any extra monitor connected.
I really hope this is not the monitor saying goodbye and me having a hardware issue.

OK the second monitor (just alone) is fine.
Not hardware issue. With only this monitor connected it works.

Freaking great news.
I connected the monitors in a different order (which I tried 2,3 times before so no idea why it worked now):

First connected the left secondary monitor to DP on the GPU and booted the OS.
Worked fine.
Then connected the main display via DP to the GPU and it just worked.
All two monitors are working.

1 Like

Rebooted a few times and updated to 5.13 kernel and it still works.
So much screen tearing is going on so I have to figure that out still.

Thank you for everyone involved.
This is such a great community :slight_smile: