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

Default to Wayland display server on Linux #11583

Open
TCROC opened this issue Jan 16, 2025 · 3 comments
Open

Default to Wayland display server on Linux #11583

TCROC opened this issue Jan 16, 2025 · 3 comments

Comments

@TCROC
Copy link

TCROC commented Jan 16, 2025

Describe the project you are working on

Here's a cool GIF of our game Blocky Ball. This game is released on Steam and made with Unity. We are porting it to Godot as a sequel Blocky Ball OT:

Blocky Ball

Describe the problem or limitation you are having in your project

We want to support as many platforms as possible including Linux! With Wayland being the new and cool kid on the block, it is important to support this compositor so everyone can be an awesome Blocky Baller! In testing the different platforms we tend to support, I found Blocky Ball ran great on X11 and Wayland, but horrible on XWayland. Going into fullscreen on XWayland would slash the framerate from 60 to 40 for no perceivable reason. It even performed better in windowed mode but stretched out across multiple monitors (ie significantly higher resolution).

Describe the feature / enhancement and how it helps to overcome the problem or limitation

The solution is simple! Default the linux display driver to Wayland! I tested on an X11 compositor and the exported build successfully fell back to X11 when it couldn't find Wayland. Although it did log an error message which I think we should replace with an info message and only error if it failed to find all fallbacks.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

Super simple. Make "default" for Driver.linuxbsd point to Wayland:

Image

If this enhancement will not be used often, can it be worked around with a few lines of script?

It can easily be worked around by setting the dropdown to Wayland manually. However, by defaulting to Wayland, we will have more video games created by Godot devs that out of the box support Wayland and X11 resulting in a cohesive and natural experience for end users!

It will also have the side effect of pretty much resolving all XWayland issue as we will no longer need to worry about XWayland! :) See here: godotengine/godot#78581

Is there a reason why this should be core and not an add-on in the asset library?

See explanation above.

@bruvzg
Copy link
Member

bruvzg commented Jan 16, 2025

Current Wayland display server implementation is missing multi-window support and some other features. Setting it as default will limit editor usability, so it's unlikely to happen until Wayland feature support is on par with X11.

@Calinou
Copy link
Member

Calinou commented Jan 16, 2025

We could make native Wayland support the default for exported projects (which use embedded subwindows by default already), but not for the editor. However, this would introduce difficult-to-debug issues as exported projects would use a different display driver by default.

@TCROC
Copy link
Author

TCROC commented Jan 16, 2025

@bruvzg

Current Wayland display server implementation is missing multi-window support and some other features. Setting it as default will limit editor usability, so it's unlikely to happen until Wayland feature support is on par with X11.

Ah I see. Do we have a tracker for features that will get Wayland on par with X11? Then we could revisit once that is the case.

We could make native Wayland support the default for exported projects (which use embedded subwindows by default already), but not for the editor. However, this would introduce difficult-to-debug issues as exported projects would use a different display driver by default.

I like this idea! Would we run into any potential feature parity issues as @bruvzg pointed out?

@Calinou Calinou changed the title Default to wayland display server on linux Default to Wayland display server on Linux Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants