When I try to run Minecraft version >= 26.1 with native Wayland via Settings → Minecraft → Tweaks → Native Libraries → Use system installation of GLFW, I get one of the following errors: Vanilla 26.1.2: GLFW error collected during initialization: [GLFW 0x10003] Invalid window hint 0x00020010 Fabulously Optimized 13.4.0 for 26.1.2: com.mojang.blaze3d.platform.Window$WindowInitFailed: GLFW error 65539: Invalid window hint 0x00020010 Vanilla 26.2 no obvious error. Fabulously Optimized 14.0.0-beta.7 for 26.2: com.mojang.blaze3d.platform.Window$WindowInitFailed: GLFW error 65539: Invalid window hint 0x00020010
Without this tweek, Minecraft runs via xwayland-satellite 0.8.2 on my Niri 26.04:
I think the problem is in glfw-minecraft in nixpkgs unstable, which only has version 3.4 from February 23, 2024, although the latest version is 3.5.1 from July 31, 2026.
Regarding __GL_THREADED_OPTIMIZATIONS=0 and NVIDIA, yes, this environment variable really should be set to avoid GLFW error 65544: EGL: Failed to clear current context: An EGLDisplay argument does not name a valid EGL display connection, as stated in the NixOS Wiki. But this error appears after my 65539 and only if my new error isn’t present initially.
I forgot to add that I also use noctalia-shell 4.7.7, in case that affects anything.
Here is the output of niri msg windows, if it is related to window positioning, then it is the same for successful 1.21.11 with native Wayland or 26.1.2 / 26.2 via Xwayland.
Window ID 37:
Title: "Minecraft 1.21.11"
App ID: (unset)
Is floating: no
PID: 17520
Workspace ID: 6
Layout:
Tile size: 1256 x 1378
Scrolling position: column 2, tile 1
Window size: 1256 x 1378
Window offset in tile: 0 x 0
Window ID 42:
Title: "Minecraft 26.2"
App ID: "Minecraft 26.2"
Is floating: no
PID: 1928
Workspace ID: 6
Layout:
Tile size: 1256 x 1378
Scrolling position: column 2, tile 1
Window size: 1256 x 1378
Window offset in tile: 0 x 0