I'm running Ubuntu 19.04 (Disco) on a machine with two video cards and three monitors, an NVidia 1080ti in the top slot and a Vega 64 in the bottom slot. Two of the monitors are plugged into the display ports of the Vega 64, one HDMI in the NVidia 1080ti.
When I let Ubuntu autodetect the graphics setup (with no xorg.conf file), then Gnome extends across all three monitors and both video cards just fine, but it only renders on one of them (in other words, anything run on the display ports is using the nvidia or nouveau driver - like the rendering is being passed through).
So I came up with an xorg.conf file (below) that does close to what I need but has a few problems. The biggest one is that when I start an xterm on one of the other screens DISPLAY=:0.1 xterm, the mouse works just fine, but the keyboard doesn't work. This file is very similar to what Xorg -configure generates. What am I doing wrong? How do I get the keyboard to work in windows on Screen1 or Screen2?
Section "InputDevice"
Identifier "keyboard0"
Option "Device" "/dev/input/event10"
Option "Xinerama" "On"
Driver "evdev"
EndSection
Section "InputDevice"
Identifier "mouse0"
Option "Device" "/dev/input/event4"
Driver "evdev"
EndSection
Section "Monitor"
Identifier "HDMI-1"
EndSection
Section "Monitor"
Identifier "DisplayPort-3"
EndSection
Section "Monitor"
Identifier "DisplayPort-4"
EndSection
Section "Device"
Identifier "Device1"
Driver "amdgpu"
BusID "PCI:41:00"
EndSection
Section "Device"
Identifier "Device0"
Driver "nouveau"
BusID "PCI:38:00"
EndSection
Section "Screen"
Identifier "Screen0"
Device "Device0"
Monitor "HDMI-1"
EndSection
Section "Screen"
Identifier "Screen1"
Device "Device1"
Monitor "DisplayPort-3"
EndSection
Section "Screen"
Identifier "Screen2"
Device "Device1"
Monitor "DisplayPort-4"
EndSection
Section "ServerLayout"
Identifier "seatx"
Screen 0 "Screen0"
Screen 1 "Screen1" LeftOf "Screen0"
Screen 2 "Screen2" RightOf "Screen0"
InputDevice "Mouse0" "CorePointer"
InputDevice "Keyboard0" "CoreKeyboard"
EndSection
Section "ServerFlags"
Option "AutoAddGPU" "off"
Option "AutoAddDevices" "false"
EndSection
/var/log/Xorg.*.logto see what the X server is actually doing.