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

Hi All,

I need some help/advice.
My setup is:
Manjaro 21.1.0
DE - KDE
Kernel - 5.13.11-1
CPU - Ryzen 5 3600
GPU - GTX 1660 (full size desktop gpu)
Monitor - 2x Dell S2721DGF 165Hz 1440p G-Sync compatible
Two monitors connected with Displayport to discrete GPU

So I decided to install Manjaro but with KDE and Gnome variant I got the same issue.
When I boot from the install USB and select load with propriety drivers I only got one monitor actively displaying content. Same with open-source drivers.
Now I install Manjaro anyway and after booting up its still the same.
I can change to 165Hz and G-Sync enable under nVidia settings panel and all 2 monitors are detected, set to extend. Even with all this one is black and shows nothing.
Virtually it seems to be working as I can bring an active app window to the black monitor.

I tried the official manjaro wiki about installing and checking nvidia drivers with no luck. Driver is installed.

Also the settings changed on KDE display or nvidia settings are not persistent and after reboot they reset.

Is this possible to fix or not much with my current nvidia gpu?

Thanks in advance.

How do you configure your Nvidia Settings?
Tried to switch your cables?

I was using windows 10 with these DP cables just fine. So I assume its not that and because of 165Hz DP is needed (no HDMI).

I ran:
sudo mhwd -a pci nonfree 0300
this said I already had driver and its skipping GPU

launched nvidia-settings with elevated rights:

sudo nvidia-settings

Changed resolution and refresh rate in ā€˜X Server Display Configurationā€™ tab.

Clicked Save to X Configuration Fileā€™ button and saved it to /etc/X11/mhwd.d/nvidia.conf

enter the below command to apply it:
sudo mhwd-gpu --setmod nvidia --setxorg /etc/X11/mhwd.d/nvidia.conf

after this I normally launched nvidia-settings

Clicked on ā€˜nvidia-settings configurationā€™ tab and clicked on the ā€˜Save Current Configurationā€™ button.

Saved the .nvidia-settings-rc to the default location specified (/home/[your account name])

edited : gedit ~/.xinitrc

added this line just before exec $(get_session)
nvidia-settings --load-config-only

this was all I have done and sorry for the terms used as I cannot link here I tried to copy the steps from the official wiki and rephrased it a bit

also tried modifying nvidia-settings GUI and play with the monitors but no luck

would enabling Xinerama in the nvidia-settings help? for multi monitor support
EDIT: forget this as it is spanning a single ā€œscreenā€ over multiple displays which I donā€™t need

Do you have the 390 driver available in Manjaro Settings ā†’ Hardware?
If yes, then right click the video-nvidia driver, then uninstall it, and after it successfully finishes, right click the video-nvidia-390 driver and click install (and reboot of course).

It is just for a test (as you just installed it is not really a problem if you break the system while troubleshooting, just reinstall in the worst case) to see if the issue may be with the 470 drivers provided by video-nvidia (but the 390 driver is really old and not optimal for gaming or resources heavy tasks).

Also Iā€™m not familiar with GNOME, if you have time can you try if you have the same issue with KDE version? I know GNOME has some Wayland features enabled by default recently, maybe it is related?

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}"