xorg.conf example for Intel + nVidia + libglvnd

I’ve spent the better part of a week trying to get libglvnd working with my system. It is an Optimus laptop with an Intel Whiskey Lake integrated graphics system with a discrete nVidia GPU. Previously I used bumblebee, bbswitch, and optirun to get the nVidia working. Now I am using Mesa 8.3.0, Xorg server 1.20.5, and libglvnd 1.1.1. I can’t seem to get a configuration that works. nVidia driver is 430.26.

Is there an example xorg.config for this?

Here’s my system without a an xorg.conf at all


Here’s a two screen config that I can’t believe would work but at least does show two vendors even though xrandr only shows a single provider


If you’re talking of render offloading, you need a specifically patched Xserver (don’t know if available for your unknown distro)
of course, you have to adjust the BusID to match your hw.

So this is a combination of GLVND and Prime offloading. SO currently the libglvnd doesn’t actually allow my to have one application use the dGPU and another use the iGPU such as optirun or primus with bumblebee or xrun-nvidia?

This makes it sound like we need Xorg 1.21 to be able to do that. Is that correct? So glvnd is really just an easier way to switch the WHOLE Xserver to a different card but not a per-application basis right now. So it really isn’t much better than Offloading using xrandr sources and sinks (PRIME).

And so the Linux Optimus struggle continues. Well at least we have patches. Patches are easy on a build your own distro.

Thanks for the answer! Greatly appreciated even if it is bad news. Looks like I have so more work to do. Wow this has been going on for ten years. So wish my laptop had an AMD discrete GPU.

The linked docs contain a link to an Ubuntu ppa with a patched xserver
For Arch, here’s a PKGBUILD: https://gitlab.freedesktop.org/aplattner/arch-xorg-server
Fedora includes the patches in the standard packages.