Admicos / minecraft-wayland

A better way of running Minecraft Without XWayland. Because I REALLY had nothing better to do with my life.
258 stars 14 forks source link

1.19, 1.20, 1.20.1 startup crash on one-nineteen branch #55

Closed trevnels closed 9 months ago

trevnels commented 1 year ago

I'm trying to use this repo to get MC 1.20.1 running under Wayland through Prism launcher 7.2, but I'm getting the following crash when starting the game:

[15:41:01] [Render thread/WARN]: Failed to create window: 
ehn$a: GLFW error 65544: EGL: Failed to clear current context: An EGLDisplay argument does not name a valid EGL display connection
    at ehn.b(SourceFile:196) ~[minecraft-1.20.1-client.jar:?]
    at org.lwjgl.glfw.GLFWErrorCallbackI.callback(GLFWErrorCallbackI.java:43) ~[lwjgl-glfw-3.3.1.jar:build 7]
    at org.lwjgl.system.JNI.invokePPPP(Native Method) ~[lwjgl-3.3.1.jar:build 7]
    at org.lwjgl.glfw.GLFW.nglfwCreateWindow(GLFW.java:2024) ~[lwjgl-glfw-3.3.1.jar:build 7]
    at org.lwjgl.glfw.GLFW.glfwCreateWindow(GLFW.java:2197) ~[lwjgl-glfw-3.3.1.jar:build 7]
    at ehn.<init>(SourceFile:94) ~[minecraft-1.20.1-client.jar:?]
    at fkm.a(SourceFile:21) ~[minecraft-1.20.1-client.jar:?]
    at enn.<init>(SourceFile:486) ~[minecraft-1.20.1-client.jar:?]
    at net.minecraft.client.main.Main.main(SourceFile:211) ~[minecraft-1.20.1-client.jar:?]
    at org.prismlauncher.launcher.impl.StandardLauncher.launch(StandardLauncher.java:88) ~[NewLaunch.jar:?]
    at org.prismlauncher.EntryPoint.listen(EntryPoint.java:126) ~[NewLaunch.jar:?]
    at org.prismlauncher.EntryPoint.main(EntryPoint.java:71) ~[NewLaunch.jar:?]
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007fbefa6ae2ce, pid=27, tid=125
#
# JRE version: OpenJDK Runtime Environment 21.9 (17.0.7+7) (build 17.0.7+7)
# Java VM: OpenJDK 64-Bit Server VM 21.9 (17.0.7+7, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# C  [libEGL_nvidia.so.0+0xae2ce]
#
...

The same error occurs in 1.19, vanilla or modded. The only reproduction of this I can find is from @Lassebq in #31. No clue what the root cause is or why some people don't see this error (maybe something related to NVIDIA driver 535?)

I'm passing -Dorg.lwjgl.glfw.libname=/run/host/lib64/libglfw.so.3 to directly set the path to the patched glfw library (/run/host because this is inside the flatpak sandbox, though a non-flatpak install of Prism using the same patched glfw results in the same error.)

BoyOrigin commented 1 year ago

Yes, everything is broken in NVIDIA driver 535, you should use 530 version instead or just wait the newer one to fix that.

ExistingExpert commented 10 months ago

This crash occurring for me on nvidia 545 in both main and one nineteen branch. (Minecraft 1.18 forge)

Lassebq commented 10 months ago

Got it to work on GNOME wayland, nvidia 545. I will retest on wlroots Not sure which branch it packaged on AUR, but I got it from there.

Lassebq commented 10 months ago

Not sure if this is a known issue already but libdecor version has serious glitches with multiple borders and inability to toggle fullscreen, also resizing is weird. And it doesn't look like it's gtk styled

Lassebq commented 10 months ago

Got it to work on GNOME wayland, nvidia 545. I will retest on wlroots Not sure which branch it packaged on AUR, but I got it from there.

Works on wlroots, only libdecor version though. But I assume it's the package to blame, since it probably packages an older version?

gravit0 commented 9 months ago

I had the same problem everywhere except Sodium

export __GL_THREADED_OPTIMIZATIONS=0

Solve this problem! This is a workaround used by Sodium for NVIDIA video cards.

trevnels commented 9 months ago

I had the same problem everywhere except Sodium


export __GL_THREADED_OPTIMIZATIONS=0

Solve this problem!

This is a workaround used by Sodium for NVIDIA video cards.

Can confirm that this works.

thecoder08 commented 6 months ago

Thank you so much for this. It now works on Pop!_OS 22.04 COSMIC with Nvidia drivers 550.54.14