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..