Using GLFW with wayland

I’ve been struggling with this for the past few days, hopefully this is the right place to put it. I have a simple piece of code using a library (Sunny) that depends on GLMakie. However, when I run this code, I just get no text or visual output. I’m currently on nixos using wayland with xwayland in accordance with my compositor (niri). I’m struggling because I can’t seem to pop up an interactive window in some code I am trying to use. The code is

using Sunny, GLMakie

units = Units(:meV, :angstrom);

a = 8.5031 # (Å)
latvecs = lattice_vectors(a, a, a, 90, 90, 90)
positions = [[0, 0, 0]]
cryst = Crystal(latvecs, positions, 227; types=["Co"], setting="1")

view_crystal(cryst)

I am getting absolutely no errors, the window just doesn’t pop up in my Xwayland window. I feel I am misunderstanding something crucial, but I can’t figure out what it is. Essentially, I want to know if anyone else has experience using nixos and wayland with GLFW in julia.

Hi @rightleftspin, I’m not familiar with this problem. As a temporary workaround (for Sunny usage), maybe can you try using WGLMakie instead of GLMakie? In the past there were a lot of bugs in the WGLMakie backend, but Makie developers have been making great strides and they’re mostly addressed now.

This worked perfectly for Sunny, thank you very much! I’ll leave it up as a problem for now, since I do want to figure out why wayland is having an issue with GLFW in the first place, since I’m pretty sure they should be compatible.