Undefined VBlank interval on Ubuntu 20.04 with second display, Radeon 5100 card

And yet another thing to try would be:

echo $MESA_LOADER_DRIVER_OVERRIDE

MESA_LOADER_DRIVER_OVERRIDE=radeonsi LIBGL_DEBUG=verbose glxgears -display :0.1 -info

I digged through the source code a bit and the reason why software rendering is used on X-Screen 1 for the AMD is that the AMD radeonsi OpenGL driver does not get loaded, but instead the i965 driver for Intel graphics chips, which can’t drive the AMD gpu, so it falls back to the software llvmpipe renderer. The above override would try to enforce use of the radeonsi driver, instead of the auto-(mis)detected i965 driver.

What is completely mysterious is why the wrong driver got chosen by OpenGL clients like glxgears or PTB, when the X-Server itself correctly detected that it should use radeonsi for Screen 1.

It is almost as if something or someone else already set MESA_LOADER_DRIVER_OVERRIDE to the utterly wrong value i965 somewhere and that is screwing things up. But that doesn’t happen on any default Ubuntu installation.

Thing is, my MBP 2017 has an almost identical hardware setup, and almost identical software setup, and dual-gpu works fine, so something must be really weirdly misconfigured in some strange way.

-mario