Xorg with multiple gpu devices from different vendors - wrong module loaded, despite explicit Serverlayout, Screen, and Device sections in xorg.conf
X.Org X Server 1.21.1.3
one radeon card and one nvidia card
Run Xorg with "-layout server0" command line switch
Explicitly, Serverlayout server0 -> screen0 -> device0 - 'Driver "radeon", BusID "PCI:2"' and Serverlayout server1 -> screen1 -> device1 - 'Driver "nvidia", BusID "PCI:3"'.
In the log, both radeon and nvidia drivers are loaded, which does not seem to be a problem in itself. But then, nonetheless:
...
[ 214.260] (II) systemd-logind: took control of session /org/freedesktop/login1/session/_33
[ 214.262] (II) xfree86: Adding drm device (/dev/dri/card0)
[ 214.262] (II) Platform probe for /sys/devices/pci0000:00/0000:00:03.0/0000:02:00.0/drm/card0
[ 214.263] (II) systemd-logind: got fd for /dev/dri/card0 226:0 fd 11 paused 0
[ 214.263] (II) xfree86: Adding drm device (/dev/dri/card1)
[ 214.263] (II) Platform probe for /sys/devices/pci0000:00/0000:00:07.0/0000:03:00.0/drm/card1
[ 214.264] (II) systemd-logind: got fd for /dev/dri/card1 226:1 fd 12 paused 0
[ 214.270] (**) OutputClass "nvidia" ModulePath extended to "/usr/lib/nvidia/xorg,/usr/lib/xorg/modules,/usr/lib/xorg/modules"
[ 214.275] (--) PCI:*(2@0:0:0) 1002:68d9:103c:6872 rev 0, Mem @ 0xc0000000/268435456, 0xf9fc0000/131072, I/O @ 0x00009000/256, BIOS @ 0x????????/131072
[ 214.275] (--) PCI: (3@0:0:0) 10de:0df8:10de:0835 rev 161, Mem @ 0xfa000000/16777216, 0xd8000000/134217728, 0xd6000000/33554432, I/O @ 0x0000ac00/128, BIOS @ 0x????????/524288
[ 214.276] (II) Open ACPI successful (/var/run/acpid.socket)
[ 214.276] (II) LoadModule: "glx"
- then, the wrong glx module is loaded -
[ 214.276] (II) Loading /usr/lib/nvidia/xorg/libglx.so
[ 214.282] (II) Module glx: vendor="NVIDIA Corporation"
...
Xorg has loaded the nvidia glx module, not the glx module for the radeon driver, despite the command line layout switch and xorg.conf explicit configuration, referencing only the radeon driver for this layout. Later in the log, there is:
[ 214.671] (II) Initializing extension GLX
[ 214.671] (EE) Failed to initialize GLX extension (Compatible NVIDIA X driver not found)
But it is too late. The wrong glx module has already been loaded.
Note the Marker, "(**) from config file", for the log entry 'OutputClass "nvidia" ModulePath extended to ...', but "man 5 xorg.conf" simply references OutputClass as "automatically added". Since only the radeon gpu is referenced in this layout, this incorporation of 'OutputClass "nvidia"' here seems to be a bug.
It is possible to force the correct behavior by adding an explicit "-modulepath /usr/lib/xorg/modules" command line switch to this instance of Xorg - but, this seems like a workaround for a bug.
Setting Serverflags Options "NoAutoAddGPU" and "NoAutoBindGPU" makes no difference here.
And consequently, glx fails:
$ glxinfo
name of display: :0
Error: couldn't find RGB GLX visual or fbconfig
Incidentally, with two instances of Xorg, one on the radeon driver and one on the nvidia driver, running xrandr on the radeon display lists only the connectors for the radeon card, but running xrandr on the nvidia display lists the connectors for both cards, again, despite the explicit configuration, and the radeon display being completely separate and distinct.
Is all this "intended" behavior for the Xorg server? Or, are these bugs?