Can wsl2 support a higher version of OpenGL? #6154
-
Hello, I have the following problem. Can wsl2 support a higher version of OpenGL(At least, 4.1 but current version is 1.4)? |
Beta Was this translation helpful? Give feedback.
Replies: 12 comments 45 replies
-
From the link you are using You can use mesa's llvmpipe which very recently began to support OpenGL 4.x in mesa 20.2. Ubuntu 20.04 (focal) currently ships mesa 20.0.8, but you can install bleeding edge versions using kiask's PPA. Or compile it yourself. First-party support for GUI apps on WSL is #938. |
Beta Was this translation helpful? Give feedback.
-
@therealkenc Thanks for your reply. I solved the problem! Thank you. |
Beta Was this translation helpful? Give feedback.
-
I had to disable wgl in VcXsrv to make it work. |
Beta Was this translation helpful? Give feedback.
-
Hah! Thank you, @Trass3r - adding the repo from the link you'd pasted (https://launchpad.net/~oibaf/+archive/ubuntu/graphics-drivers/), doing the update / upgrade command upped those OpenGL to 4.5. Excellent, thank you! |
Beta Was this translation helpful? Give feedback.
-
I've added the oibaf's PPA repo and ran
|
Beta Was this translation helpful? Give feedback.
-
Does this not work with the native WSL2 gui? I've tried updating using the PPA listed here but I'm still stuck at 3.3
|
Beta Was this translation helpful? Give feedback.
-
Hi. Good day! I am having similar problems with my NVIDIA GeForce GTX 1080 Ti. I am running Windows 11 and updated my WSL2 (Ubuntu 18.04) repository to the kisak-mesa PPA. After performing an update, my
The output indicates the device is D3D12, which based on the previous conversation does not support OpenGL 4. I need to use open3d, which requires OpenGL 4.4, so this is a show stopper for me using WSL2. If anyone can offer any workarounds, I would greatly appreciate it. Also, is there a site/page that is tracking the D3D12 developments to support OpenGL 4. Thanks so much! |
Beta Was this translation helpful? Give feedback.
-
Does anyone have performance numbers on the d3d12 driver?
|
Beta Was this translation helpful? Give feedback.
-
They finished GLES 3.1 features: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14624/diffs#1823e74a273d9960a3cb249f3201d8e4007c59d8 |
Beta Was this translation helpful? Give feedback.
-
There is another way to do this. build your own system distro(Using the wslg repo) look at the contributing section in WSLG repo to find out how to build. Note: inside the wslg Dockerfile, remove all mentions of libdrm installation, while also making sure the container image is the latest version of cbl mariner's image at the time. Note it needs the latest build of libdrm, so if you create a libdrm.wrap file in the mesa subprojects directory(after cloning steps) then point it to here. after that edit the libdrm section of mesa's meson.build to include the higlighted portion after this run the docker build command wslg asks you to and it should build with no errors, and follow the rest of the instruction on there, and you should be ready to go. after restarting wsl, make sure your updated to mesa 22.0+ (using https://launchpad.net/~oibaf/+archive/ubuntu/graphics-drivers if needed) you should then see the following when you run glxinfo -B NOTE: this is very likely to NOT be supported by microsoft at this time. |
Beta Was this translation helpful? Give feedback.
-
Is this the place to be notified when OpenGL 4.3 Core (with Compute Shaders) is ready? My Host is Windows 10 with AMD Radeon RX 6600 and it supports up to OpenGL 4.6. In WSL 2 (Ubuntu 22.04) with the provided PPA by oibaf im getting 4.2 (Device: D3D12, Direct rendering: Yes) |
Beta Was this translation helpful? Give feedback.
-
Somehow I'm now getting only OpenGL 4.1 on Intel iGPU with latest driver 31.0.101.2127. Even the standard mesa version 23.2.1 on mantic ubuntu is definitely new enough for 4.2+: https://www.phoronix.com/news/OpenGL-4.2-Mesa-D3D12 |
Beta Was this translation helpful? Give feedback.
From the link you are using
LIBGL_ALWAYS_INDIRECT=1
. The person (if any) who directed you to do that was proffering dubious guidance. GLX supports OpenGL 1.4. Later incarnations of OpenGL introduced memory mapped buffers and are not supported by the GLX wire protocol.You can use mesa's llvmpipe which very recently began to support OpenGL 4.x in mesa 20.2. Ubuntu 20.04 (focal) currently ships mesa 20.0.8, but you can install bleeding edge versions using kiask's PPA. Or compile it yourself.
First-party support for GUI apps on WSL is #938.