Using Creator/Design Studio under WSL2?
-
Hi all -
I'm attempting to run Creator and/or DS2 from WSL2. I get these error messages:
libGL error: No matching fbConfigs or visuals found libGL error: failed to load driver: swrastthese errors show when I start Creator or DS2, or when I attempt to run a graphics-based app from Creator. (The app I try to start also crashes.) The error also shows up when I run glxgears (though not xeyes).
Anyone with WSL2 experience know what might be going on? I've read some posts about this, and it seems to have to do with my installation of OpenGL, but it's really not clear what the fix is.
Thanks...
-
Hi
There was alot of talk about openGl but not sure what current status isdid you try a
glxinfo
and see what openGL that is available ?
If not even glxgears runs it cant be very good support.https://stackoverflow.com/questions/66497147/cant-run-opengl-on-wsl2
-
Hi
There was alot of talk about openGl but not sure what current status isdid you try a
glxinfo
and see what openGL that is available ?
If not even glxgears runs it cant be very good support.https://stackoverflow.com/questions/66497147/cant-run-opengl-on-wsl2
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:~$ -
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:~$Hi
I think the Gl.so (the lib) misses some dependencies or don't find it where expected.- libGL error: No matching fbConfigs or visuals found
try the sudo ldconfig -p | grep -i gl.so
and see.- libGL error: failed to load driver: swrast
might be fixable by
apt-get intall -y mesa-utils and libgl1-mesa-glx
-
Hi
I think the Gl.so (the lib) misses some dependencies or don't find it where expected.- libGL error: No matching fbConfigs or visuals found
try the sudo ldconfig -p | grep -i gl.so
and see.- libGL error: failed to load driver: swrast
might be fixable by
apt-get intall -y mesa-utils and libgl1-mesa-glx
@mrjj thanks for the suggestions. Here's the output of the ldconfig:
mzimmers@mzimmers-home:~$ sudo ldconfig -p | grep -i gl.so libwayland-egl.so.1 (libc6,x86-64) => /lib/x86_64-linux-gnu/libwayland-egl.so.1 libcogl.so.20 (libc6,x86-64) => /lib/x86_64-linux-gnu/libcogl.so.20 libOpenGL.so.0 (libc6,x86-64) => /lib/x86_64-linux-gnu/libOpenGL.so.0 libOpenGL.so (libc6,x86-64) => /lib/x86_64-linux-gnu/libOpenGL.so libGL.so.1 (libc6,x86-64) => /lib/x86_64-linux-gnu/libGL.so.1 libGL.so (libc6,x86-64) => /lib/x86_64-linux-gnu/libGL.so libEGL.so.1 (libc6,x86-64) => /lib/x86_64-linux-gnu/libEGL.so.1 libEGL.so (libc6,x86-64) => /lib/x86_64-linux-gnu/libEGL.so mzimmers@mzimmers-home:~$According to the link you posted, the stated problem should be fixed in my version of Ubuntu (20.04).
I'm really in the dark here...
-
@mrjj thanks for the suggestions. Here's the output of the ldconfig:
mzimmers@mzimmers-home:~$ sudo ldconfig -p | grep -i gl.so libwayland-egl.so.1 (libc6,x86-64) => /lib/x86_64-linux-gnu/libwayland-egl.so.1 libcogl.so.20 (libc6,x86-64) => /lib/x86_64-linux-gnu/libcogl.so.20 libOpenGL.so.0 (libc6,x86-64) => /lib/x86_64-linux-gnu/libOpenGL.so.0 libOpenGL.so (libc6,x86-64) => /lib/x86_64-linux-gnu/libOpenGL.so libGL.so.1 (libc6,x86-64) => /lib/x86_64-linux-gnu/libGL.so.1 libGL.so (libc6,x86-64) => /lib/x86_64-linux-gnu/libGL.so libEGL.so.1 (libc6,x86-64) => /lib/x86_64-linux-gnu/libEGL.so.1 libEGL.so (libc6,x86-64) => /lib/x86_64-linux-gnu/libEGL.so mzimmers@mzimmers-home:~$According to the link you posted, the stated problem should be fixed in my version of Ubuntu (20.04).
I'm really in the dark here...
-
@mzimmers
Hi
It looks ok. Noting is missing.Btw. Creator does start, correct?
(im asking as it had some issues at some point with 20.04) -
@mrjj yes it starts, though it does throw those errors I mentioned earlier. But many of the example apps fail (after throwing the same errors).
@mzimmers
Ok Creator it self run but anything needed openGL fails. it sounds like.You followed something like
https://www.programmersought.com/article/40497291197/
to get creator running ?It lists Intel(R) UHD Graphics 630 .
This is correct yes ?
and openGL works in your win 10 ? -
@mzimmers
Ok Creator it self run but anything needed openGL fails. it sounds like.You followed something like
https://www.programmersought.com/article/40497291197/
to get creator running ?It lists Intel(R) UHD Graphics 630 .
This is correct yes ?
and openGL works in your win 10 ?@mrjj I installed Qt from the online installer, and I'm using vcxsrv. I installed Ubuntu via WSL2.
The graphics processor is indeed the Intel UHD 630.
I ran the heartrate-game example (which I think uses OpenGL) on Windows and it worked; didn't work under WSL2.(no, it doesn't use OpenGL). -
@mrjj I installed Qt from the online installer, and I'm using vcxsrv. I installed Ubuntu via WSL2.
The graphics processor is indeed the Intel UHD 630.
I ran the heartrate-game example (which I think uses OpenGL) on Windows and it worked; didn't work under WSL2.(no, it doesn't use OpenGL).Hi
Ok.
Try to run some QML via Creator (if possible)in the linux , can you do
lsmod | grep videoit should list something like
i915 -
Hi
Ok.
Try to run some QML via Creator (if possible)in the linux , can you do
lsmod | grep videoit should list something like
i915@mrjj well, the heartrate-game is definitely QML, and it runs on Windows.
mzimmers@mzimmers-home:/$ lsmod | grep video mzimmers@mzimmers-home:/$ lsmod Module Size Used by mzimmers@mzimmers-home:/$I tried building the boxes example, and got this error:
:-1: error: Project ERROR: This example requires Qt to be configured with -opengl desktopwhich confuses me even further -- does that message mean "configure" as in configure before building Qt?
EDIT:
The error that the boxes project gave was a bit of a red herring; in the .pro file, there's this line:
qtConfig(opengles.|angle|dynamicgl): error("This example requires Qt to be configured with -opengl desktop")I opened the cube example (which claims to use OpenGL) and that runs under Windows, but not under WSL2.
-
@mrjj well, the heartrate-game is definitely QML, and it runs on Windows.
mzimmers@mzimmers-home:/$ lsmod | grep video mzimmers@mzimmers-home:/$ lsmod Module Size Used by mzimmers@mzimmers-home:/$I tried building the boxes example, and got this error:
:-1: error: Project ERROR: This example requires Qt to be configured with -opengl desktopwhich confuses me even further -- does that message mean "configure" as in configure before building Qt?
EDIT:
The error that the boxes project gave was a bit of a red herring; in the .pro file, there's this line:
qtConfig(opengles.|angle|dynamicgl): error("This example requires Qt to be configured with -opengl desktop")I opened the cube example (which claims to use OpenGL) and that runs under Windows, but not under WSL2.
Hmm that what not what i expceted. o.O
It should have the driver as far as i can seehttps://github.com/microsoft/WSL2-Linux-Kernel/tree/master/Documentation/gpu
Its listed.But maybe its not modules like normally but compiled as lsmod lsits nothing.
- which confuses me even further -- does that message mean "configure" as in configure before building Qt?
Yes that normally means that but since you used the online installer it should already be fine.
-
Hmm that what not what i expceted. o.O
It should have the driver as far as i can seehttps://github.com/microsoft/WSL2-Linux-Kernel/tree/master/Documentation/gpu
Its listed.But maybe its not modules like normally but compiled as lsmod lsits nothing.
- which confuses me even further -- does that message mean "configure" as in configure before building Qt?
Yes that normally means that but since you used the online installer it should already be fine.
-
@mrjj I may kick this topic to brainstorming, since it's clear that the problem isn't isolated to Qt. Someone on an OpenGL forum said that it looks like I have the correct drivers, but something is preventing them from being used.
@mzimmers said in Using Creator/Design Studio under WSL2?:
I may kick this topic to brainstorming, since it's clear that the problem isn't isolated to Qt. Someone on an OpenGL forum said that it looks like I have the correct drivers, but something is preventing them from being used.
They may be blacklisted in the kernel, so you should check that (can't give you reference offhand, but google should be able to help).
-
Well, I got it working...Windows kept fooling me because it likes to hide startup files in about a million different places, but it ultimately came down to a mis-configured startup file for VcXsrv.
The details:
mzimmers@mzimmers-home:~$ glxinfo -B name of display: 172.27.32.1:0.0 display: 172.27.32.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) OpenGL core profile version string: 4.5 (Core Profile) Mesa 21.0.3 - kisak-mesa PPA OpenGL core profile shading language version string: 4.50 OpenGL core profile context flags: (none) OpenGL core profile profile mask: core profile OpenGL version string: 3.1 Mesa 21.0.3 - kisak-mesa PPA OpenGL shading language version string: 1.40 OpenGL context flags: (none) OpenGL ES profile version string: OpenGL ES 3.2 Mesa 21.0.3 - kisak-mesa PPA OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20Of note from a forum I asked on:
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.
It appears that he's right about needing llvmpipe, since that appears in my info dump above.
So, anyway, glxgears runs right now, and so does cube. Thanks for all the suggestions; hopefully someone else will find this useful.