Whenever I restart my display manager or reboot, my right display's output is black except for my cursor

Last weekend (just over a week ago now), I switched from Windows to Manjaro.

I am using Manjaro XFCE running on X11 with an Intel i7-6700K and an Nvidia GTX 1080 Ti. I can see that my display manager is LightDM. I have 2 monitors, with my primary monitor (where my XFCE panel is) being my right monitor.

Because my computer has an Intel CPU that has an integrated GPU and I’d read about people being able to switch between them, I figured I’d try installing optimus-manager and optimus-manager-qt. That turned out be a mistake, as I think that’s when the problem started.

After the first boot when I couldn’t see either display, I moved my right monitor’s connection from my GTX 1080 Ti’s DisplayPort output to my motherboard’s DisplayPort output, which let me switch optimus-manager-qt’s startup setting from “Intel” to “Nvidia”. That fixed my ability to see on subsequent startups with both monitors connected to my Nvidia card.

Then, considering that I actually shouldn’t have installed optimus-manager or optimus-manager-qt in the first place, I removed them in Pamac. After doing that, I now only see output from my left monitor after startup, except that I can see my cursor if I move it over to the other display, so the monitor is technically able to display something. It’s just otherwise blank and clicking where I know there should be panel launchers does nothing.

To work around this, I can right-click the desktop on my left monitor to open the XFCE menu, run nvidia-settings from there, disable “Force Composition Pipeline”, press “Apply”, and re-enable “Force Composition Pipeline”, then press “Apply” again to fix my output. Doing that makes both monitors work perfectly for the rest of the session.

Now, I want that setup to work on booting. What I’ve done to try to accomplish this:

  • I’ve run sudo mhwd-gpu --setxorg /etc/X11/xorg.conf to try to make X11 use the right xorg.conf file.
  • I’ve run sudo mhwd-gpu --status and confirmed that it’s pointing to /etc/X11/xorg.conf.
  • I’ve used nvidia-settings to save the correct settings in /etc/X11/xorg.conf.
  • I’ve tried overwriting /etc/X11/xorg.conf with the working Nvidia settings by unchecking “Merge with existing file.” when saving /etc/X11/xorg.conf.
  • I’ve ensured there’s only 00-keyboard.conf and 90-mhwd.conf (which is a symlink to /etc/X11/xorg.conf) in /etc/X11/xorg.conf.d/.
  • I’ve verified that there’s only the default short keyboard-related stuff in 00-keyboard.conf.
  • I’ve read much of Nvidia’s documentation about their Linux driver here; especially parts that explain xorg.conf settings: http://us.download.nvidia.com/XFree86/Linux-x86_64/435.21/README/installationandconfiguration.html
  • Between tests, I’ve used sudo systemctl restart display-manager which reproduces the issue without having to fully reboot. It seems to do exactly the same as rebooting.
  • After reproducing the issue, I’ve browsed the end of the systemd journal with journalctl to read everything that happened, but couldn’t find it saying anything wrong happening. I was able to see where it started LightDM, which I think starts X11 using my /etc/X11/xorg.conf file, but it doesn’t make it clear.
  • I’ve reinstalled optimus-manager so that I could run optimus-manager --cleanup, then uninstall it again. That changed nothing.
  • I’ve read the output of inxi -CGxx and glxinfo | grep OpenGL but those look the same before and after my nvidia-settings workaround.

Output of various commands:

sudo mhwd-gpu --status

:: status
  xorg configuration file: '/etc/X11/xorg.conf'

inxi -CGxx

CPU:       Topology: Quad Core model: Intel Core i7-6700K bits: 64 type: MT MCP 
           arch: Skylake-S rev: 3 L2 cache: 8192 KiB 
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 64026 
           Speed: 1888 MHz min/max: 800/4200 MHz Core speeds (MHz): 1: 1888 2: 1850 
           3: 2089 4: 1776 5: 1524 6: 2487 7: 2817 8: 2113 
Graphics:  Device-1: Intel HD Graphics 530 vendor: Dell driver: i915 v: kernel 
           bus ID: 00:02.0 chip ID: 8086:1912 
           Device-2: NVIDIA GP102 [GeForce GTX 1080 Ti] vendor: eVga.com. driver: nvidia 
           v: 450.66 bus ID: 01:00.0 chip ID: 10de:1b06 
           Display: x11 server: X.Org 1.20.8 driver: nvidia resolution: 1: 1920x1200~60Hz 
           2: 1920x1080~60Hz s-dpi: 93 
           OpenGL: renderer: GeForce GTX 1080 Ti/PCIe/SSE2 v: 4.6.0 NVIDIA 450.66 
           direct render: Yes

glxinfo | grep OpenGL

OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: GeForce GTX 1080 Ti/PCIe/SSE2
OpenGL core profile version string: 4.6.0 NVIDIA 450.66
OpenGL core profile shading language version string: 4.60 NVIDIA
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 4.6.0 NVIDIA 450.66
OpenGL shading language version string: 4.60 NVIDIA
OpenGL context flags: (none)
OpenGL profile mask: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.2 NVIDIA 450.66
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
OpenGL ES profile extensions:

cat /etc/X11/xorg.conf

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

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

Section "ServerLayout"

# Removed Option "Xinerama" "1"
    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: option
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Acer G24"
    HorizSync       30.0 - 94.0
    VertRefresh     60.0
    Option         "DPMS"
EndSection

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

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "VertRefresh" "DVI-D-0: 59.95; DP-5: 60.0"
    Option         "TripleBuffer" "on"
    Option         "Stereo" "0"
    Option         "nvidiaXineramaInfoOrder" "DFP-0"
    Option         "metamodes" "DVI-D-0: nvidia-auto-select +1920+0 {ForceCompositionPipeline=On}, DP-5: nvidia-auto-select +0+0"
    Option         "SLI" "Off"
    Option         "MultiGPU" "Off"
    Option         "BaseMosaic" "off"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

I’m not sure what to try next. Any help would be appreciated immensely. I will try commands you ask me to try and paste the output. Thank you very much!

Hello and welcome to the Manjaro Community!

First a Question:

  1. If you don’t use the proprietary nvidia driver (but nouveau), you can use the intel and nvida gpu as output seemless.
  2. If you use the proprietary nvidia driver, then you can only use the nvidia card outputs for your screens.
  3. You can use the iGPU (intel) and the dGPU (nvidia) also in hybrid mode with the proprietary nvidia driver, what means that you need to use the Intel iGPU to display your desktop and you can offload GPU intensive applications like Games to the dGPU (like on laptops), but you can’t use the nvidia card for screen output then.

So by explaining this. What exactly would you like to do?

Thanks for the information.

I would like to ignore my Intel integrated GPU and use my Nvidia GeForce GTX 1080 Ti with the same settings it has when I click “Apply” as a workaround for the issue after booting, but without having to use that workaround. I’d like it to have those settings on boot.

You need to disable the intel gpu in your UEFI or at least set the PCIE GPU as primary.

“Apply” means it is set just temporary for this session. If you want to set the settings permanently then you need to overwrite the xorg.conf.

Auswahl_231

Yes, I have done so. I’ve saved that file there using nvidia-settings and verified that the contents of that file look sane and match my intended setup. The contents of that file are present in my first post, in the cat /etc/X11/xorg.conf output.

Could you post this output?

ls /etc/X11/xorg.conf.d/

Hello,

Just passed by to say, if you want to keep the iGPU working on that Desktop PC, remove your /etc/X11/xorg.conf
That is not the way to do it, nor the place to save it.
You can also remove 90-mhwd.conf symlink.

Desktops do not have switchable graphics. All is done at the BIOS. Both GPUs (the iGPU and dGPU) be active, or just one be active.
You either create a proper server layout for multihead inside /etc/X11/mhwd.d/nvidia.conf (where Manjaro saves the config file), or you remove them and let the system boot in modesetting, so both GPUs are active.

ls /etc/X11/xorg.conf.d/

00-keyboard.conf  90-mhwd.conf

I guess you need to delete this file:

sudo rm /etc/X11/xorg.conf.d/90-mhwd.conf

Maybe it has a higher priority as your /etc/X11/xorg.conf when loading.

I’m not interested in using the iGPU. I was only trying optimus-manager as a quick experiment, expecting that I could turn it off if it didn’t do anything helpful. I’m done with that experiment and I now want to restore my previous configuration.

OK, I’ll do that. If I need it again, I can run sudo mhwd-gpu --setxorg /etc/X11/xorg.conf again. It did seem weird that I’d have a symlink to that there.

If you have installed the driver with mhwd or the gui, then there is created a symlink from /etc/X11/mhwd.d/nvidia.conf which is the config.

OK, I deleted /etc/X11/xorg.conf.d/90-mhwd.conf and tried sudo systemctl restart display-manager again after. The same issue manifested, unfortunately.

Here are some current command outputs:

ls /etc/X11/xorg.conf.d/

00-keyboard.conf

cat /etc/X11/xorg.conf.d/00-keyboard.conf

# Read and parsed by systemd-localed. It's probably wise not to edit this file
# manually too freely.
Section "InputClass"
        Identifier "system-keyboard"
        MatchIsKeyboard "on"
        Option "XkbLayout" "us"
        Option "XkbModel" "pc105"
        Option "XkbVariant" "dvorak"
EndSection

Why didn’t you set ForceCompositionPipeline=On for the second screen?

I wish to prioritize the synchronization of my primary display, and don’t care if my secondary display tears or stutters, since I use it only for chat outputs or terminal things, and not animations, videos, or gaming.

Also, when experimenting, I noticed that if ForceCompositionPipeline=On is set for both displays, my primary display stutters since it’s 59.95Hz and my other display is 60Hz, so the composition rate doesn’t match. Disabling it for my secondary display fixed stutters on my primary display.

You didn’t understand me then.
Disable the iGPU from BIOS, and keep the proper MHWD configuration file and symlink to it as is provided, then if you want a fixed layout to change it from Nvidia X Server Settings.
/etc/X11/mhwd.d/nvidia.conf and /etc/X11/xorg.conf.d/90-mhwd.conf as a symlink to it.

  • This should be the default one for your case:
Section "ServerLayout"

# Removed Option "Xinerama" "1"
    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: option
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Acer G24"
    HorizSync       30.0 - 94.0
    VertRefresh     60.0
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce GTX 1080 Ti"
	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

  • But you want some changes hence this would be a tweaked one for your case:
Section "ServerLayout"

# Removed Option "Xinerama" "1"
    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: option
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Acer G24"
    HorizSync       30.0 - 94.0
    VertRefresh     60.0
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce GTX 1080 Ti"
    Option         "TripleBuffer"  "On"
    Option  "ConnectToAcpid"    "Off"
    Option "metamodes" "nvidia-auto-select +0+0 {ForceCompositionPipeline = On}
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

But in that case, if you use the Option "TripleBuffer" "On" you need to use the file kwin.sh to use the triplebuffer too, from terminal run:
echo "export KWIN_TRIPLE_BUFFER=1" | sudo tee /etc/profile.d/kwin.sh

Sometimes the for the kwin.sh is actually required to use:

export KWIN_TRIPLE_BUFFER=1
export __GL_YIELD=USLEEP
export __GL_MaxFramesAllowed=1

  • An example of fixed layout for multiple monitors would be like this (this is my config, please don’t use it except as example):
# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings:  version 440.64

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"
    # generated from default
    Identifier     "Keyboard0"
    Driver         "kbd"
EndSection

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "LG Electronics"
    ModelName      "LG Electronics W2253"
    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 960"
    Option         "TripleBuffer"  "On"
    Option  "ConnectToAcpid"    "Off"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "Stereo" "0"
    Option         "nvidiaXineramaInfoOrder" "DFP-0"
    Option         "metamodes" "DVI-I-1: 1920x1080_60 +0+0 {ForceCompositionPipeline=On}, DVI-D-0: 1920x1080_60 +1920+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
 

Once you modified make sure you run this:
sudo mhwd-gpu --setmod nvidia --setxorg /etc/X11/mhwd.d/nvidia.conf

Please read carefully. Also, not always is required to use ForceCompositionPipeline=On

Isn’t that a KDE issue? @Buju is using XFCE.

1 Like

Yes, that can be disregarded. Since i’m using KDE Plasma, the only way to make it have sense when giving my example of config was to keep it that way. :slight_smile:

1 Like

Just a thought: Could be problem with the displayport. There have been problems with the nvidia driver on that screen output.

My working configuration from before this issue did not have the iGPU disabled in the BIOS. I’d prefer to not require that, in case I want to use QuickSync, use it for something in a virtual machine in the future, or even as an extra output in a pinch in case there’s a hardware issue with my dGPU. I will try to find the setting for the internal GPU in my BIOS momentarily anyway though. I’m not sure if it will be present, because I have a Dell XPS 8900 motherboard (transplanted to a bigger case with better power supply so I could use the GTX 1080 Ti), but I’ll check anyway.

I’d prefer to fully understand the order of operations of what happens when booting, and control the exact initialization process, especially to eliminate the issue directly, rather than guessing. Is there a way I can see exactly what LightDM and/or X11 is doing when it loads, to see why my right monitor is blank except that I can move my cursor around on it? I’d like to figure it out directly, if possible, not only to fix it in a way that is satisfying, but also for my own education.

I realize forcing composition via nvidia-settings is not necessary for non-black display output to function. I only mentioned toggling it as a way to enable the “Apply”’ button for my workaround.

I have copied /etc/X11/xorg.conf to /etc/X11/mhwd.d/nvidia.conf and run sudo mhwd-gpu --setmod nvidia --setxorg /etc/X11/mhwd.d/nvidia.conf. I’ll try that for now, and go fishing for the iGPU toggle setting in the BIOS, then report the result.

Always keep backups of config files that work.
From BIOS post to GRUB the dGPU aka PEG aka PCIE will have a order to activate the ports like this
VGA>DVI-I>DVI-D>HDMI>Displayport
You can’t change that from BIOS.
When you have a iGPU too, the Xorg must have knowledge about it to initialize it, from config, or you go the modesetting route.