Big problems with Wayland in Minecraft

I am using an Nvidia RTX3080 on Ubuntu 24.04.03 with Nvidia driver version 580.95.05. On Wayland, I experience significant FPS drops in Minecraft. Instead of ≈900 FPS (X11), I only get ≈10 FPS on Wayland. I used the official launcher from Mojang (10GB RAM allocated).

With driver version 580.82.09, I once had ≈500 FPS on Wayland, but that is no longer the case with 580.95.05.

The Prism launcher is also unusable due to this problem.

Try Prism Launcher with the option to use system GLFW enabled.

What kind of library is it exactly?
I tried with /usr/lib/x86_64-linux-gnu/libglfw.so.3.3. However, libglfw.so.3.4 does not exist in the official repositories.

This is the complete error message:

[22:38:24] [Render thread/WARN]: Detected unexpected shutdown during last game startup: resetting fullscreen mode

Exception caught from launcher

java.lang.NoClassDefFoundError: Could not initialize class org.lwjgl.glfw.GLFW$Functions

at org.lwjgl.glfw.GLFW.glfwGetPlatform(GLFW.java:1340)

at ftb.a(SourceFile:135)

at ae.a(SourceFile:77)

at fzz.a(SourceFile:2482)

at fzz.a(SourceFile:2454)

at net.minecraft.client.main.Main.main(SourceFile:243)

at org.prismlauncher.launcher.impl.StandardLauncher.launch(StandardLauncher.java:105)

at org.prismlauncher.EntryPoint.listen(EntryPoint.java:129)

at org.prismlauncher.EntryPoint.main(EntryPoint.java:70)

Caused by: java.lang.ExceptionInInitializerError: Exception java.lang.NullPointerException: A required function is missing: glfwInitAllocator [in thread “Render thread”]

at org.lwjgl.system.APIUtil.requiredFunctionMissing(APIUtil.java:145)

at org.lwjgl.system.APIUtil.apiGetFunctionAddress(APIUtil.java:139)

at org.lwjgl.glfw.GLFW$Functions.(GLFW.java:42)

at org.lwjgl.glfw.GLFW.nglfwGetError(GLFW.java:1251)

at org.lwjgl.glfw.GLFW.glfwGetError(GLFW.java:1280)

at ftb.a(SourceFile:160)

at com.mojang.blaze3d.platform.GLX._initGlfw(SourceFile:44)

at com.mojang.blaze3d.systems.RenderSystem.initBackendSystem(SourceFile:227)

at fzz.(SourceFile:509)

at net.minecraft.client.main.Main.main(SourceFile:234)

… 3 more

Exiting with ERROR

You probably need glfw 3.4. Not sure how you get that on ubuntu. Maybe a PPA or something.

However, you could also try the prebuild .so from here and see if it helps: Releases · BoyOrigin/glfw-wayland · GitHub

Thanks, that helped. Now I have at least 140 FPS. I did the following:

1. I simply downloaded libglfw.so.3.5 as a file from GitHub and saved it in any directory.

2. I adjusted the configurations (see images).

Full screen mode also works