How do I configure Xorg to use multiple xorg screens across multiple GPUs?
by Sol33t303 from LinuxQuestions.org on (#6CRV6)
The distro is Arch Linux, and I currently have 2 GPUs in my system, one GTX 1080 ti as my main GPU, running the official nvidia drivers, and a GTX 690 that has nouveau since the old (which btw, is one of those weird SLI cards with 2 GPUs on the one board nvidia used to make, so lspci actually shows 3 GPUs, but for the sake of my sanity I'm going to ignore the third ones existence and only focus on the GTX 690 that has output ports available, as far as the system is concerned I have a third GPU that's headless attached).
I have 2 monitors, one of these monitors has 2 inputs available (and it keeps both connections active no matter which it is actually displaying), HDMI and displayport. The full-size displayport on the monitor is connected to the full sized displayport on my 1080 ti. The HDMI port on my monitor is connected to the mini-displayport on my gtx 690 through a HDMI adapter (which xrandr lists as DP-1-1, the DP port on my 1080 ti is listed as DP-4, for my second 1280x1024 monitor there is also an adapter to my 1080 ti listed as DP-2, try not to get them confused).
Now, heres the goal for my setup. Me setting xorg up this way is sort of a pilot test of sorts which if it works well I'll buy some more adapters to get the whole thing setup.
I want to use both GPUs for independent tasks, I want to move my main desktop activities over to my gtx 690, for things such as VAAPI and VDPAU support, and potentially better wayland support down the line if/when I switch. If this initial setup works and xorg proves to me it can cope with this setup, I will then buy another adapter for my gtx 690 so both my main monitor (via it's HDMI connection) and my side monitor (the 1280x1024 monitor) will sit on my GTX 690, which will leave my GTX 1080 ti with it's own monitor on it's single xorg screen, which will allow me to use gsync on it for applications that require more GPU power then my 690 can provide, this leads to me to get the best out of both GPUs, better support from my nouveau 690, and gsync from my 1080 ti. I don't really care that I won't be able to drag applications between the two GPUs.
And now, onto the problem.
I have been trying my best to bang my head against my xorg config, but so far have been unsuccessful. I have been unable to get xorg to create the second xscreen that will be on my 690, or more accurately, it seems to create it according to it's logs, but xrandr can't seem to find it, DISPLAY=:0.1 leads to a can't connect to xorg error for everything, and if I change over to the HDMI input on my monitor, theres no signal. Xorg seems to acknowledge the existance of the GTX 690, it seems to do *something* with it, it knows a monitor is connected to that GPU, xrandr lists it as a provider. Yet absolutely no signs of life from the second second xorg screen. It's dumbfounded me, theres no obvious errors in my xorg log so I must be misconfiguring it somehow despite xorg supposedly creating the second xscreen.
And this will be the section where I put command output and config files:
xorg.conf (which I have tried to make as clear as I can, and is based on nvidia-xsettings):
Code:# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings: version 535.54.03
Section "ServerLayout"
Identifier "Layout0"
Screen 0 "Screen-gtx1080" 0 0
Screen 1 "Screen-gtx690" RightOf "Screen-gtx1080"
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 "Monitor1-gtx1080"
VendorName "Unknown"
ModelName "Acer AL1716"
HorizSync 30.0 - 81.0
VertRefresh 55.0 - 75.0
Option "DPMS"
EndSection
Section "Monitor"
# HorizSync source: edid, VertRefresh source: edid
Identifier "Monitor0-gtx1080"
VendorName "Unknown"
ModelName "Acer Z35"
HorizSync 30.0 - 140.0
VertRefresh 24.0 - 60.0
Option "DPMS"
EndSection
Section "Monitor"
# HorizSync source: edid, VertRefresh source: edid
Identifier "Monitor0-gtx690"
VendorName "Unknown"
ModelName "Acer Z35"
HorizSync 50.0 - 60.0
VertRefresh 24.0 - 60.0
Option "DPMS"
EndSection
Section "Device"
Identifier "gtx1080"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BoardName "NVIDIA GeForce GTX 1080 Ti"
BusID "PCI:9:0:0"
Screen 0
EndSection
Section "Device"
Identifier "gtx690"
Driver "nouveau"
VendorName "NVIDIA Corporation"
BoardName "NVIDIA GeForce GTX 690-VGA"
BusID "PCI:c:0:0"
Screen 1
EndSection
Section "Screen"
Identifier "Screen-gtx1080"
Device "gtx1080"
Monitor "Monitor0-gtx1080"
DefaultDepth 24
Option "Stereo" "0"
Option "nvidiaXineramaInfoOrder" "DFP-7"
Option "metamodes" "DP-2: 1280x1024_60_0 +0+56, DP-4: 2560x1080_144 +1280+0"
Option "SLI" "Off"
Option "MultiGPU" "Off"
Option "BaseMosaic" "off"
SubSection "Display"
Depth 24
EndSubSection
EndSection
Section "Screen"
Identifier "Screen-gtx690"
Device "gtx690"
Monitor "Monitor0-gtx690"
DefaultDepth 24
Option "Stereo" "0"
Option "metamodes" "DP-1-1: 2560x1080_60"
SubSection "Display"
Depth 24
EndSubSection
EndSectionFor the rest I'll use pastebin since the forum complains otherwise.
Xorg.0.log: https://pastebin.com/AJEc1YC7
xrandr: https://pastebin.com/VXbVP2V2
lspci -k: https://pastebin.com/MrKtGULZ
Thank you to anybody willing to help, let me know if anybody wants more details.
I have 2 monitors, one of these monitors has 2 inputs available (and it keeps both connections active no matter which it is actually displaying), HDMI and displayport. The full-size displayport on the monitor is connected to the full sized displayport on my 1080 ti. The HDMI port on my monitor is connected to the mini-displayport on my gtx 690 through a HDMI adapter (which xrandr lists as DP-1-1, the DP port on my 1080 ti is listed as DP-4, for my second 1280x1024 monitor there is also an adapter to my 1080 ti listed as DP-2, try not to get them confused).
Now, heres the goal for my setup. Me setting xorg up this way is sort of a pilot test of sorts which if it works well I'll buy some more adapters to get the whole thing setup.
I want to use both GPUs for independent tasks, I want to move my main desktop activities over to my gtx 690, for things such as VAAPI and VDPAU support, and potentially better wayland support down the line if/when I switch. If this initial setup works and xorg proves to me it can cope with this setup, I will then buy another adapter for my gtx 690 so both my main monitor (via it's HDMI connection) and my side monitor (the 1280x1024 monitor) will sit on my GTX 690, which will leave my GTX 1080 ti with it's own monitor on it's single xorg screen, which will allow me to use gsync on it for applications that require more GPU power then my 690 can provide, this leads to me to get the best out of both GPUs, better support from my nouveau 690, and gsync from my 1080 ti. I don't really care that I won't be able to drag applications between the two GPUs.
And now, onto the problem.
I have been trying my best to bang my head against my xorg config, but so far have been unsuccessful. I have been unable to get xorg to create the second xscreen that will be on my 690, or more accurately, it seems to create it according to it's logs, but xrandr can't seem to find it, DISPLAY=:0.1 leads to a can't connect to xorg error for everything, and if I change over to the HDMI input on my monitor, theres no signal. Xorg seems to acknowledge the existance of the GTX 690, it seems to do *something* with it, it knows a monitor is connected to that GPU, xrandr lists it as a provider. Yet absolutely no signs of life from the second second xorg screen. It's dumbfounded me, theres no obvious errors in my xorg log so I must be misconfiguring it somehow despite xorg supposedly creating the second xscreen.
And this will be the section where I put command output and config files:
xorg.conf (which I have tried to make as clear as I can, and is based on nvidia-xsettings):
Code:# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings: version 535.54.03
Section "ServerLayout"
Identifier "Layout0"
Screen 0 "Screen-gtx1080" 0 0
Screen 1 "Screen-gtx690" RightOf "Screen-gtx1080"
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 "Monitor1-gtx1080"
VendorName "Unknown"
ModelName "Acer AL1716"
HorizSync 30.0 - 81.0
VertRefresh 55.0 - 75.0
Option "DPMS"
EndSection
Section "Monitor"
# HorizSync source: edid, VertRefresh source: edid
Identifier "Monitor0-gtx1080"
VendorName "Unknown"
ModelName "Acer Z35"
HorizSync 30.0 - 140.0
VertRefresh 24.0 - 60.0
Option "DPMS"
EndSection
Section "Monitor"
# HorizSync source: edid, VertRefresh source: edid
Identifier "Monitor0-gtx690"
VendorName "Unknown"
ModelName "Acer Z35"
HorizSync 50.0 - 60.0
VertRefresh 24.0 - 60.0
Option "DPMS"
EndSection
Section "Device"
Identifier "gtx1080"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BoardName "NVIDIA GeForce GTX 1080 Ti"
BusID "PCI:9:0:0"
Screen 0
EndSection
Section "Device"
Identifier "gtx690"
Driver "nouveau"
VendorName "NVIDIA Corporation"
BoardName "NVIDIA GeForce GTX 690-VGA"
BusID "PCI:c:0:0"
Screen 1
EndSection
Section "Screen"
Identifier "Screen-gtx1080"
Device "gtx1080"
Monitor "Monitor0-gtx1080"
DefaultDepth 24
Option "Stereo" "0"
Option "nvidiaXineramaInfoOrder" "DFP-7"
Option "metamodes" "DP-2: 1280x1024_60_0 +0+56, DP-4: 2560x1080_144 +1280+0"
Option "SLI" "Off"
Option "MultiGPU" "Off"
Option "BaseMosaic" "off"
SubSection "Display"
Depth 24
EndSubSection
EndSection
Section "Screen"
Identifier "Screen-gtx690"
Device "gtx690"
Monitor "Monitor0-gtx690"
DefaultDepth 24
Option "Stereo" "0"
Option "metamodes" "DP-1-1: 2560x1080_60"
SubSection "Display"
Depth 24
EndSubSection
EndSectionFor the rest I'll use pastebin since the forum complains otherwise.
Xorg.0.log: https://pastebin.com/AJEc1YC7
xrandr: https://pastebin.com/VXbVP2V2
lspci -k: https://pastebin.com/MrKtGULZ
Thank you to anybody willing to help, let me know if anybody wants more details.