GLMakie displays false colours in WSL2

Hello everyone,

In WSL2 ubuntu, GLMakie gives me weird colours for some reason.
For example,

using GLMakie 
lines(rand(10))

results in:

If I save the plot, the colours in the .png image are fine, its just the display window that’s acting funny.

The following info might help:

cmd> wsl --version
WSL version: 2.5.7.0
Kernel version: 6.6.87.1-1
WSLg version: 1.0.66
MSRDC version: 1.2.6074
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.26100.1-240331-1435.ge-release
Windows version: 10.0.19045.5854
$ glxinfo | grep "OpenGL"

OpenGL vendor string: Mesa
OpenGL renderer string: llvmpipe (LLVM 19.1.1, 256 bits)
OpenGL core profile version string: 4.5 (Core Profile) Mesa 24.2.8-1ubuntu1~24.04.1
OpenGL core profile shading language version string: 4.50
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 4.5 (Compatibility Profile) Mesa 24.2.8-1ubuntu1~24.04.1
OpenGL shading language version string: 4.50
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 24.2.8-1ubuntu1~24.04.1
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
OpenGL ES profile extensions:

This is a know issue with Mesa falling back to software rasterization via llvmpipe:

The issue contains some pointers on how to get hardware acceleration going on WSL.

Thanks for the reply Simon.

I tried following the advice in the link you provided but it doesnt seem to work.

glxinfo | grep renderer

    GLX_MESA_copy_sub_buffer, GLX_MESA_gl_interop, GLX_MESA_query_renderer,
    GLX_MESA_copy_sub_buffer, GLX_MESA_query_renderer, GLX_SGIS_multisample,
Extended renderer info (GLX_MESA_query_renderer):
OpenGL renderer string: llvmpipe (LLVM 19.1.1, 256 bits)

Could it perhaps be because I am running it on Intel integrated graphics instead of an actual gpu?

1 Like

got this, too. I’m also using an Intel integrated graphics:

(base) ➜  dev glxinfo | grep renderer
    GLX_MESA_copy_sub_buffer, GLX_MESA_query_renderer, GLX_MESA_swap_control, 
    GLX_MESA_copy_sub_buffer, GLX_MESA_query_renderer, GLX_OML_swap_method, 
Extended renderer info (GLX_MESA_query_renderer):
OpenGL renderer string: llvmpipe (LLVM 15.0.7, 256 bits)

Integrated gpus are actual GPUs :wink:
From my experience intel has the worst drivers of all vendors…
You’ll need to google/chat to see if there’s a solution.

It can always be a little bit of an adventure to get GPU hardware acceleration fully working on linux/wsl.
I recently had success with OpenSuse tumbleweed for WSL, which seems to have fixes earlier, but not sure if i was just lucky :wink:

1 Like

Got it, I’ll have a go at it once I find some time.

After some rounds with Gemini, there might be incompatiblity of my current GPU from Ubuntu system, which needs a lot of work to figure out I think..

EDITED: irrelevant. See the systemd issue below.

I think there’s an issue that WSL doesn’t default to use systemd, after adding this line into my /etc/wsl.conf

[boot]
systemd = true

and restart WSL.

The glxinfo | grep renderer

gives a non-llvmpipe result

currently got a segfault adding GLMakie, not sure if there’s a compatible problem that CompatHelper: bump compat for Makie to 0.23 for package GLMakie, (keep existing compat) by github-actions[bot] · Pull Request #5060 · MakieOrg/Makie.jl · GitHub wasn’t merged. Will try out later.

WSL ubuntu defaults to that.
Which distro are you using?

1 Like

Don’t know why this issue came to me. I’m using Win11 + WSL2 + Ubuntu 22.04.

Interesting, maybe its different for me since I’m on some corporate version of windows 10.

My windows driver model version is WDDM 2.7, which shall be lower than the WSLg required version (told by Gemini). A little bit surprised that WSLg don’t even support hardware from 2021?
If so, the problem is done from my side.