Skip to content

Add Standalone Wayland Support#14652

Open
BeezBumba wants to merge 10 commits into
dolphin-emu:masterfrom
BeezBumba:merge-wayland
Open

Add Standalone Wayland Support#14652
BeezBumba wants to merge 10 commits into
dolphin-emu:masterfrom
BeezBumba:merge-wayland

Conversation

@BeezBumba
Copy link
Copy Markdown

@BeezBumba BeezBumba commented May 14, 2026

What problem does this Pull Request solve?

Some graphics stacks (including mine) only provide Wayland for display. Since Dolphin currently relies on Xwayland, these systems end up without hardware acceleration, and in some cases certain drivers won’t even start. This PR adds native Wayland support to address that issue.

Why this change is needed

Without Wayland support, Dolphin cannot create an accelerated GL context on Wayland‑only systems. This results in poor performance or complete failure to launch games. Adding a Wayland backend allows Dolphin to run properly on modern Linux setups that no longer ship X11.

What this Pull Request does

I found an old fork that implemented Wayland support, but it was very outdated. I updated it, fixed the merge conflicts, and brought it up to date so it can be considered for inclusion in mainline Dolphin.

Notes for reviewers

Please double‑check the changes. I want to make sure nothing breaks in the existing graphics paths. My goal is to contribute this feature safely without affecting other platforms or backends.

@autofire372
Copy link
Copy Markdown
Contributor

This has all the hallmarks of, at least, an AI-written summary. Was this vibe coded?

@BeezBumba
Copy link
Copy Markdown
Author

the code was not vibe coded. and yes I did modify summary with ai to make it cleaner and more concise.

@cobalt2727
Copy link
Copy Markdown
Contributor

Would you mind at least linking to where the code originally came from?

@teapotonmars
Copy link
Copy Markdown

Would you mind at least linking to where the code originally came from?

The code originally came from https://github.com/TellowKrinkle/dolphin/tree/Wayland

Copy link
Copy Markdown
Contributor

@TellowKrinkle TellowKrinkle left a comment

Choose a reason for hiding this comment

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

For reference, when I developed this branch, it didn't properly detect hidpi displays and assumed dpr was 1 due to an issue where Qt would initially report that for the window and didn't send any events we recognize when it did eventually change to 2. That may be fixed by now, or maybe it's considered good enough to merge even with that bug, but someone should at least test and see if it still happens.

Also, please rebase instead of merging (and fix issues on the commits where they happen, so each commit in the chain builds and works).

else if (platform_name == QStringLiteral("xcb"))
return WindowSystemType::X11;
else if (platform_name == QStringLiteral("wayland"))
else if (platform_name.startsWith(QStringLiteral("wayland")))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why?

@TellowKrinkle
Copy link
Copy Markdown
Contributor

TellowKrinkle commented May 15, 2026

Also

Without Wayland support, Dolphin cannot create an accelerated GL context on Wayland‑only systems.

It can in fact create an accelerated GL context using XWayland

Comment thread CMakeLists.txt
endif()

if(ENABLE_WAYLAND)
find_package(Wayland REQUIRED)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The REQUIRED keyword here for ENABLE_WAYLAND doesn't match the behavior of ENABLE_X11, which just gives a warning if X11 cannot be found. Could you please make the behavior consistent between the two?

@linkmauve
Copy link
Copy Markdown
Member

You probably want to add the needed libraries to the Linux CI as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

7 participants