You are not logged in.
I have been having a problem for some time, whenever I'm playing Minecraft and move the mouse around a bit, after alt tabbing out to do something else, the mouse position isn't centered, and instead it's on a side of my screen, which I feel like is annoying, furthermore, whenever I'm using shaders (primarily with Iris) any Minecraft GUI that I open has the same problem whenever I tab out, the cursor is on a side of the screen.
I tried the following to mitigate the issue:
I set GDK_BACKEND = x11 as an environment variable in Prism Launcher's global config, this managed to get Minecraft under XWayland, see here:
~> xwininfo
xwininfo: Please select the window about which you
would like information by clicking the
mouse in that window.
xwininfo: Window id: 0x4800007 "Minecraft NeoForge* 1.21.1"
Absolute upper-left X: 0
Absolute upper-left Y: 0
Relative upper-left X: 0
Relative upper-left Y: 0
Width: 1920
Height: 1080
Depth: 24
Visual: 0x40
Visual Class: TrueColor
Border width: 0
Class: InputOutput
Colormap: 0x4800006 (not installed)
Bit Gravity State: ForgetGravity
Window Gravity State: NorthWestGravity
Backing Store State: NotUseful
Save Under State: no
Map State: IsViewable
Override Redirect State: no
Corners: +0+0 -0+0 -0-0 +0-0
-geometry 1920x1080+0+0Yet this did not fix the issue.
I haven't tried much else but I saw people having the same problem as me whenever running shaders in Minecraft, is there a potential fix without resorting to using X11?
Last edited by ItsFireStorm (2025-08-02 18:53:36)
Offline
Solved it!
The reason why the cursor isn't fixed is that depending on your LWJGL and Java version the cursor behaves weird on Wayland (hence why the cursor isn't centered). To fix that, I installed a custom GFWL library to replace the LWJGL library named gfwl-wayland-minecraft-cursorfix (in the AUR).
Though another problem soon arised, NVIDIA's drivers being propietary have some issues with EGL under Wayland, you can fix this by setting the following environment variable inside your PrismLauncher instance Environment variables tab:
__GL_THREADED_OPTIMIZATIONS 0This managed to fix the issue, at the cost of my Minecraft icon, but at least it works.
Offline