minecraft-linux / mcpelauncher-manifest

The main repository for the Linux and Mac OS Bedrock edition Minecraft launcher.
https://mcpelauncher.readthedocs.io/en/latest/
GNU General Public License v3.0
863 stars 100 forks source link

Minecraft refuses to launch without Xwayland #942

Open REmerald opened 5 months ago

REmerald commented 5 months ago

Describe the bug Minecraft always runs under Xwayland. If I disable it, it refuses to launch.

To Reproduce Steps to reproduce the behavior:

  1. Launch Minecraft.
  2. swaymsg -t get_tree
  3. #11: con "Minecraft" (xwayland, pid: 13210, instance: "mcpelauncher-client", class: "mcpelauncher-client", X11 window: 0x800002)
  4. Uncomment xwayland disable in the sway config.
  5. See crash.

Expected behavior Minecraft should launch through wayland.

Screenshots Game Log

15:31:55 Info  [Launcher] Version: client 4733750 / manifest 556dbe8
15:31:55 Info  [Launcher] CPU: GenuineIntel Intel(R) Celeron(R) N5100 @ 1.10GHz
15:31:55 Info  [Launcher] CPU supports SSSE3: YES
15:31:55 Trace [Launcher] Loading hybris libraries
15:31:55 Trace [Launcher] linker loaded
EGLUT: failed to initialize native display

Process exited with unexpected exit code: 1

Desktop (please complete the following information):

Additional context

mcpelauncher-client 4733750 / manifest 556dbe8
CPU: GenuineIntel Intel(R) Celeron(R) N5100 @ 1.10GHz
SSSE3 support: YES
GL Vendor: Intel
GL Renderer: Mesa Intel(R) UHD Graphics (JSL)
GL Version: OpenGL ES 3.2 Mesa 23.3.4-arch1.2
MSA daemon path:

The launcher itself runs on wayland. #14: con "Linux Minecraft Launcher" (xdg_shell, pid: 13946, app_id: "io.mrarm.mcpelauncher-ui-qt")

sway version 1.8.1

Name            : glfw-wayland
Version         : 3.3.9-1
Provides        : glfw=3.3.9
Depends On      : wayland  libxkbcommon  libgl
Name            : libglvnd
Version         : 1.7.0-1
Provides        : libgl  libegl  libgles  libEGL.so=1-64  libGL.so=1-64  libGLESv2.so=2-64  libGLX.so=0-64
                  libGLdispatch.so=0-64  libOpenGL.so=0-64
Depends On      : libxext  mesa  opengl-driver
Name            : freeglut
Version         : 3.4.0-1
Provides        : glut
Depends On      : libxi  libxrandr  libgl
Optional Deps   : None
Required By     : jasper  lib32-freeglut  libcaca  mesa-demos
Optional For    : libtiff
REmerald commented 5 months ago

Turns out, this is the freeglut issue.

Is glut library required? (Can't find it in the dependency chains.) Maybe it's possible to use something else as another backend?

ChristopherHX commented 5 months ago

Is glut library required?

Yes for a lot of prebuilt packages it is compiled in without opt out.

eglut has been required for touch support, because GLFW don't implement touch.

However I plan to do eglut ===> SDL3 (https://github.com/minecraft-linux/mcpelauncher-manifest/pull/935#issue-2092116930).

flatpak uses GLFW and runs in wayland only mode, but doesn't support touch.

ChristopherHX commented 5 months ago

Uncomment xwayland disable in the sway config.

Why would you do that?

ChristopherHX commented 5 months ago

I'm not doing fast migration to SDL3, because of potential bugs in the backend.

FreeFull commented 1 month ago

Maybe this issue has been fixed now? Using the mpcelauncher flatpak, it runs and works fine for me without Xwayland

ChristopherHX commented 1 month ago

mcpelauncher flatpak is a pure wayland app via glfw even before this issue has been even opened

ChristopherHX commented 1 month ago

The xenial, bionic and buster AppImages will require XWayland for ever.

I will close this issue once bookworm AppImages use sdl3 by default that can take a while.