So Minecraft recently added lwjgl 3.4.1 support, that means using the new -DMC_DEBUG_ENABLED -DMC_DEBUG_PREFER_WAYLAND flags, which when launching the game makes it run native on Wayland. When launching it using Xwayland (Minecraft on X11, running with a translation layer, default on Minecraft currently) doesn’t give that FPS issue with OpenGL, the performance is a little better actually, so we know its not Wayland issue but its with the new Vulkan option, but running it native on Wayland gives a much much smoother experience genuinely and for me and a lot of people i suppose its kinda of a must have, that's why we have been using 3rd party custom patches to do that the whole time, plus considering all major Linux Distro’s Desktop Environments are switching to Wayland now, and the Gnome DE which is pretty popular, is Wayland only now, this must be fixed. On OpenGL the Performance between X11 and Wayland is the same (~5fps), on Vulkan tho, I am loosing a lot of FPS when switching from Xwayland to Wayland. For OpenGL there are no issues with Wayland (except the cursor center reset problem which i did made a bug report MC-307253 note, this issue also happens with Vulkan, its a glfw issue, you can fix it with custom patches which a lot of people have done over the community)
Steps to reproduce:
Requirements: A Linux installation running a Wayland compositor. (Desktop environments like Gnome, Kde etc.)
Launch the game using
-DMC_DEBUG_ENABLED -DMC_DEBUG_PREFER_WAYLAND.Monitor performance, toggle between Vulkan and OpenGL using the in-game new Graphics API option; Also launch the game with Xwayland (remove the jvm flags) and monitor again.
The First image (435 FPS) is OpenGL Native Wayland.
The Second image (430FPS) is OpenGL Xwayland.
The Third image (378FPS) is Vulkan Native Wayland.
The Fourth image (682FPS is Vulkan Xwayland.
(Note, Please rely on the FPS numbers shown in each image to identify them correctly, maybe their order gets mixed)
I hope you do something about that, and the cursor problem which i mentioned, and it fits with your current plan of modernizing the game’s code, :)
Environment
Linux (Wayland)
Thank you for helping us improve Minecraft! We saved your files: