Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add documentation for enabling Native Wayland support and troubleshooting XWayland issues #103

Merged
merged 2 commits into from
Dec 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/source_build/launcher.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ if you didn't install the MSA daemon (e.g. if you ran the previous
command in `/home/paul/`, you'd have to use
`/home/paul/msa/build/msa-daemon` as the path).

### Adding Wayland support

By default, compiling the game launcher will not come with native Wayland support, as SDL3 is not enabled. The game will run under Xwayland, but if you are running into issues (e.g. flickering, mouse not locked), it's best to run the game natively through Wayland. To compile the launcher using SDL3, add the following cmake flag:
`-DGAMEWINDOW_SYSTEM=SDL3`

## Installation

You can now optionally install the launcher system-wise. If you don't,
Expand Down
26 changes: 26 additions & 0 deletions src/troubleshooting/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ your hardware.
You may need to reinstall the proprietary drivers if you had installed
them manually before.

Performance can also degrade by [running under Xwayland](#i-am-running-into-glitches-with-xwayland).

### Black screen with Mesa 23.1+

Try adding `MESA_EXTENSION_OVERRIDE=-GL_EXT_instanced_arrays` to
Expand Down Expand Up @@ -189,6 +191,30 @@ Mac OS X:
- `./mcpelauncher-client -dg ~/Library/Application\ Support/mcpelauncher/versions/1.2.3.4` -
Replace 1.2.3.4 with the version of Minecraft you want to run.

### I am running into glitches with Xwayland

Xwayland does a fairly good job of running X applications on Wayland, but it
is not perfect. Depending on your graphics drivers and your desktop environment/
window manager, you will run into issues that will affect your experience.
These issues are beyond the scope of this project and should be reported
upstream. There are two solutions: Fallback to an X11 session, or run the game
natively under Wayland.

#### Run natively under Wayland

By default, the binary does not come with native Wayland support.
You will need to [build the game launcher from source](../source_build/index.md)
with SDL3 to enable native wayland support.

Once you have the game launcher built with Wayland support, you will need to
force the client to run under Wayland, as it will still default to running
under Xwayland. This is done by unsetting the `DISPLAY` environment variable.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This point is about this statement, which implies sdl3 prefers x over wayland if both are available


Through the Qt Launcher, edit your profile and open up the
advanced options. Under "Environment Variables", add a variable called
`DISPLAY` (case-matching), and leave the value blank. Doing so will have the
client running under native Wayland.

## Qt launcher UI

### Running the troubleshooter
Expand Down
Loading