Installation of OpenGL libraries for WSL2

Hi all -

Absolute novice here, so I hope I’m asking this in the right forum.

I’ve installed WSL2 and vcxsrv on my Windows 10 system. The goal is to get Qt and its apps running under WSL2. When I try to start most apps, I get these messages:

libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast

I’ve read various topics regarding these errors, and most seem to point to a problem with how OpenGL is installed, but I can’t find anything definitive.

A few more data points:

glxgears launches, but is very very slow. Here’s a little of the output:

mzimmers@mzimmers-home:/$ glxgears
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
Running synchronized to the vertical refresh. The framerate should be
approximately the same as the monitor refresh rate.
34371 frames in 9.2 seconds = 3747.099 FPS
16697 frames in 9.1 seconds = 1835.926 FPS
16696 frames in 9.1 seconds = 1831.534 FPS
16991 frames in 9.2 seconds = 1852.845 FPS

And this:

mzimmers@mzimmers-home:/ glxinfo | grep OpenGL libGL error: No matching fbConfigs or visuals found libGL error: failed to load driver: swrast OpenGL vendor string: Intel OpenGL renderer string: Intel(R) UHD Graphics 630 OpenGL version string: 1.4 (4.6.0 - Build 27.20.100.8681) OpenGL extensions: mzimmers@mzimmers-home:/

So…I really don’t know what’s going on, but perhaps someone in this forum can give me an idea.

Thanks…

I googled

and got
this

So, that person seemed to have the same symptoms I do, but he solved it with a combination of Nvidia drivers (which I don’t imagine will work on my non-Nvidia system), and bypassing the X server with that EGL Eye.

It’s not clear to me how this will work for me – seems like my X server is working OK (otherwise, I couldn’t see things like Qt Creator and xeyes) – the problem appears to be in the correct installation of the OpenGL libraries.

mzimmers
I have no basis for looking through your particular problem but, not having updated the graphics-card is an easy to solve problem for newbees. The
OpenGL version string: ...
seems to suggest that, for some reason, the drivers are updated (to 4.6) but something prevents the use of a version higher than 1.4. In turn, WSL2 may demand a higher version to run.

`

1 Like

Thanks for the interesting idea…so, what kind of things would prevent WSL2 (or anything else for that matter) from using the updated drivers?

The hardware (including the GPU) is virtualised. So the Linux video drivers can’t access the GPU directly as in a standard Linux installation; they have to use the virtual GPU provided by WSL, and I don’t think that supports OpenGL at present. In which case, you’re limited to the llvmpipe driver, which uses the CPU for rendering. There is some work being done on providing OpenGL support atop DirectX for WSL, but I believe that’s still work in progress.

1 Like

Well, I don’t know what exactly I did to fix it, but it’s working now. I uninstalled and reinstalled VcXsrv, and deleted all instances of its launch file, and rebooted. Here’s my status now:

glxinfo -B

name of display: 172.30.96.1:0.0
display: 172.30.96.1:0 screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
Vendor: Mesa/X.org (0xffffffff)
Device: llvmpipe (LLVM 12.0.0, 256 bits) (0xffffffff)
Version: 21.0.3
Accelerated: no
Video memory: 25543MB
Unified memory: no
Preferred profile: core (0x1)
Max core profile version: 4.5
Max compat profile version: 3.1
Max GLES1 profile version: 1.1
Max GLES[23] profile version: 3.2
OpenGL vendor string: Mesa/X.org
OpenGL renderer string: llvmpipe (LLVM 12.0.0, 256 bits)

So now, gears works, and so does an OpenGL app started from Creator.

Thanks to everyone who looked at this…

EDIT:

Aaaaaaaaaaand…as soon as I reboot, it’s back to the old (non-working) way.

Aargh…I don’t suppose there are any mind readers out there who can tell me (from my information above) what I did to make this work (once)?

Thanks…

EDIT again:

Disregard last edit – whatever the problem is, it’s clearly not with the OpenGL drivers, so it’s a waste of people’s time here. Thanks again…

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.