Makie datashader color corruption

Hello,

I am running into a bizarre coloration issue with Makie (GLMakie) with the datashader – this leads to a bright blue color on-screen, while the saved figure is red (as it is in the example).

Additionally, the on-screen color has these unusual tiles in a consistent but not obviously meaningful arrangement where the color is red.

Below is a screenshot from the Taxi data datashader example run in a new temporary session:

While this is the saved output (kindly forgive the sizing issues) with the expected color:

Configuration details below:

julia> versioninfo()
Julia Version 1.11.5
Commit 760b2e5b739 (2025-04-14 06:53 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 32 × AMD Ryzen 9 7950X 16-Core Processor
  WORD_SIZE: 64
  LLVM: libLLVM-16.0.6 (ORCJIT, znver4)
Threads: 32 default, 0 interactive, 16 GC (on 32 virtual cores)

and

▶ nvidia-smi
Fri May 30 10:02:35 2025
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 570.133.07             Driver Version: 570.133.07     CUDA Version: 12.8     |
|-----------------------------------------+------------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id          Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |           Memory-Usage | GPU-Util  Compute M. |
|                                         |                        |               MIG M. |
|=========================================+========================+======================|
|   0  NVIDIA GeForce RTX 3050        Off |   00000000:01:00.0  On |                  N/A |
|  0%   47C    P8            N/A  /  115W |     547MiB /   8192MiB |      1%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+

+-----------------------------------------------------------------------------------------+
| Processes:                                                                              |
|  GPU   GI   CI              PID   Type   Process name                        GPU Memory |
|        ID   ID                                                               Usage      |
|=========================================================================================|
|    0   N/A  N/A            3508      G   /usr/bin/gnome-shell                    468MiB |
|    0   N/A  N/A          177797    C+G   missioncenter                            31MiB |
+-----------------------------------------------------------------------------------------+

My question is if this is an issue with the shader in the datashader, an issue with (GL)Makie, or an issue somewhere deeper in the stack (e.g. driver, OS, hardware) and what information should I gather to try and identify it?

Is this via x forwarding? We’ve seen reports of some weird color problems looking a lot like what you see when using x-forwarding.
We still haven’t found the root for that, but saving the output fixing the issue is kind of interesting!
Did you try passing async=false ? That may fix the sizing issue when saving.

There’s no x-forwarding, and I am using Wayland on Ubuntu. I don’t understand the systems well enough to identify the source of the issue in there but I am happy to run things to help.

Indeed, passing async=false to the datashader(...) does fix the saving size.
To be clear, the saved output is correctly colored, but the window remains with this tiled color issue.

Ok, interesting.. Can you make sure you’re using hardware accelerated OpenGL and not llvmpipe?
Try:

using GLMakie
using GLMakie.ModernGL
display(scatter(1:4))
# the below needs an open GLMakie window
renderer = unsafe_string(glGetString(GL_RENDERER))

Looks like it is, indeed, LLVMpipe:

julia> renderer = unsafe_string(glGetString(GL_RENDERER))
"llvmpipe (LLVM 19.1.1, 256 bits)"

Is this a fallback when there’s a misconfigured OpenGL on the machine?

Yup! That’s it then… I guess you’ll need to find out how to get your nvidia gpu to take over for your linux distro.
There should be quite a few tips online on how to fix this.

A timeless lesson reaffirmed: it’s nvidia’s fault. Thank you for your help @sdanisch and thanks to the Makie team for making figures fun.