Inside nvidia-settings
(running with sudo
elevated privileges), I am unable to get a second X Screen to work. Here is a step-by-step description of one thing I have tried:
- On the left, select "X Server Display Configuration"
- Select the secondary display (the one that goes to receiver)
- In the "Configuration" drop-down select "New X screen (requires X restart)"
- Select "Apply"
- When the "Cannot Apply" dialog box pops up explaining that the configuration must be saved to the X config file, select "Apply What Is Possible" (may then need to select "OK" within 15 seconds to keep changes)
- Select "Save to X Configuration File" and "Save"
To restart the X Server for changes to take effect, I have tried several things such as restarting the computer and restarting the X Server process via:
sudo systemctl restart display-manager
Still after many trials, only one X Screen exists. I checked the contents of the systemd
journal via journalctl -e _COMM=gdm-x-session
. Here is an interesting excerpt:
(II) NVIDIA(0): Validated MetaModes:
(II) NVIDIA(0): "DP-0:nvidia-auto-select+0+0"
(II) NVIDIA(0): Virtual screen size determined to be 2560 x 1440
(--) NVIDIA(0): DPI set to (108, 107); computed from "UseEdidDpi" X config
(--) NVIDIA(0): option
(EE) NVIDIA(G0): GeForce GTX 960 (GPU-0) already has an X screen assigned;
(EE) NVIDIA(G0): skipping this GPU screen
(EE) NVIDIA(G0): Failing initialization of X screen
Here is a somewhat interesting excerpt:
(II) Loading sub module "glxserver_nvidia"
(II) LoadModule: "glxserver_nvidia"
(II) Loading /usr/lib64/xorg/modules/extensions/libglxserver_nvidia.so
(II) Module glxserver_nvidia: vendor="NVIDIA Corporation"
compiled for 1.6.99.901, module version = 1.0.0
Module class: X.Org Server Extension
(II) NVIDIA GLX Module 440.82 Wed Apr 1 19:47:36 UTC 2020
(II) NVIDIA: The X server supports PRIME Render Offload.
(WW) NVIDIA(0): Failed to initialize Base Mosaic! Reason: Only one GPU
(WW) NVIDIA(0): detected. Only one GPU will be used for this X screen.
Here is a less interesting excerpt:
(II) Initializing extension GLX
(II) Indirect GLX disabled.
(II) GLX: Another vendor is already registered for screen 0
Regarding the message GeForce GTX 960 (GPU-0) already has an X screen assigned; skipping this GPU screen
Failing initialization of X screen
, if this is indeed the root cause, I do not understand why this was not an issue before I performed a fresh re-installation of Fedora 31. I checked /etc/X11/xorg.conf
and verified that two GPU devices are currently defined - one for each X Screen in the file (albeit they point to the same physical device). Here is the entirety of /etc/X11/xorg.conf
:
# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings: version 440.82
Section "ServerLayout"
Identifier "Layout0"
Screen 0 "Screen0" 0 2160
Screen 1 "Screen1" Above "Screen0"
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/input/mice"
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 S2716DG"
HorizSync 34.0 - 209.0
VertRefresh 30.0 - 144.0
Option "DPMS"
EndSection
Section "Monitor"
# HorizSync source: edid, VertRefresh source: edid
Identifier "Monitor1"
VendorName "Unknown"
ModelName "DENON, Ltd. DENON-AVR"
HorizSync 30.0 - 136.0
VertRefresh 58.0 - 121.0
Option "DPMS"
EndSection
Section "Device"
Identifier "Device0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BoardName "GeForce GTX 960"
BusID "PCI:1:0:0"
Screen 0
EndSection
Section "Device"
Identifier "Device1"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BoardName "GeForce GTX 960"
BusID "PCI:1:0:0"
Screen 1
EndSection
Section "Screen"
Identifier "Screen0"
Device "Device0"
Monitor "Monitor0"
DefaultDepth 24
Option "Stereo" "0"
Option "nvidiaXineramaInfoOrder" "DFP-1"
Option "metamodes" "DP-0: nvidia-auto-select +0+0"
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" "HDMI-0: nvidia-auto-select +0+0 {AllowGSYNC=Off}"
Option "SLI" "Off"
Option "MultiGPU" "Off"
Option "BaseMosaic" "off"
SubSection "Display"
Depth 24
EndSubSection
EndSection
System Information
- Fresh installation of Fedora 31
- One graphics card (GeForce GTX 960) with proprietary Nvidia drivers installed via Software Center from "RPM Fusion for Fedora 31 - Nonfree - NVIDIA Driver" repository
- Two monitors connected to the graphics card
- Main computer display via DisplayPort (goes to a Dell computer monitor)
- Secondary display + sound output via HDMI (goes to a DENON receiver)
Question
Does anyone know how to get multiple X Screens working again? Please let me know if there is more useful technical information I can provide (relevant shell commands would be greatly appreciated).
Additional Background: Motivation for Having Two X Screens
The computer insists that any display connected to HDMI is "primary" for certain activities, regardless of which monitor is selected as the "primary display" in nvidia-settings
or how things are ordered in xorg.conf
. I believe this is a feature of the graphics card firmware because POST messages, the GRUB2 menu, and other low-level software always display over HDMI if connected. This is not configurable.
While running the operating system, this "default to HDMI" phenomenon causes significant issues with new windows opening on the secondary display. The new windows are not visible because the TV connected to the receiver is almost always off while the receiver itself remains on to provide sound. I learned that I could use the shift
+ window btn
+ arrow btn
shortcut to bring the active window to the display of my choosing without having to turn on the TV to drag it over via the GUI; this helped slightly. Besides being annoying, sometimes a newly opened window would go unnoticed, and even worse: Some full screen applications (e.g. games) could not be moved to the correct display, or could only span both displays. This has been a major usability issue.
At some point, I was able to come up with the following solution: Create a new X Screen and assign each monitor its own X Screen. This of course only fixed the issues I was having within the operating system, but was quite a satisfactory solution. Games worked, windows would never go to the wrong display, etc.
The problem now is that after freshly installing Fedora, I have been unable to get the X Server to run two X Screens again.
ServerLayout
section in your xorg.conf. Take a look here x.org/releases/X11R7.0/doc/html/DESIGN2.html.xorg.conf
to try to reduce the amount of text. It does indeed have a ServerLayout section, which you could not have seen. I am updating the question now to include my entire xorg.conf file instead of just an excerpt. Please take another look.