Cursor spawns in wrong positions in Minecraft guis

This question was already asked in the Matrix, but noone responded.

Hey, I upgraded to Fedora Linux 41 a few days ago but I am facing a new problem that never happened to me before. I don’t know whether it is a gnome problem, fedora or even java so I’m asking here: Whenever I play Minecraft and enter a gui, the mouse cursor does not “spawn” in the middle of the screen, but in the position it was the last time I was in a gui. I have tried Forge 1.8.9 with mods and Vanilla 1.8.9 (both with prismlauncher from copr), Vanilla 1.21.3 (from the Minecraft launcher from the tarball from their website).

My conclusions: Not caused by mods, not caused by mod loader, not caused by launcher, not caused by java version (1.21.3 requires java 21 and 1.8.9 requires java 8).

Any other tips on how to debug more?

Images:


Added cursor, gaming, wayland, xwayland

Hm strange. That mechanism is called “cursor lock” I think, where games can prevent the cursor from moving. In minecraft until you press I or Esc etc.

You did some nice testing.

I would assume this is either because of GNOME, Wayland or XWayland then.

Minecraft always runs under X11, which means an embedded X11 Session on a Wayland system using XWayland.

I assume some things happen there.

You could try to file a bug under mutter, the GNOME compositor. bugz.fedoraproject.org

Also try to use the Flatpak for PrismLauncher or whatever launcher else. Here you can easily change environment variables etc.

Found the solution, thanks!
https://bodhi.fedoraproject.org/updates/FEDORA-2024-9c2fc14447

1 Like

Added bug-fixed, mutter