-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Enable Wayland by default #10792
base: main
Are you sure you want to change the base?
Enable Wayland by default #10792
Conversation
Welcome, new contributor! Please make sure you've read our contributing guide and we look forward to reviewing your pull request shortly ✨ |
i was told not having one was valid toml after passing it through https://www.toml-lint.com/, but github actions hates me
You added a new feature but didn't update the readme. Please run |
1 similar comment
You added a new feature but didn't update the readme. Please run |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on user feedback on Linux (and my own experiments), I think this is the right default now. Thanks!
Wayland is currently broken for me. It renders one frame and then the window becomes unresponsive or segfaults outright. Winit 0.29's own examples run just fine for me on Wayland, though interestingly enough on 0.27 and 0.28 no window appears at all (no crash). |
Do wgpu's examples show the same behavior?
This, at least, is just because in order for a wayland window to appear, the application needs to have rendered anything, which winit's examples prior to 0.29 did not do. |
Yes, no segfault's though.
Aha. |
Seems like it's a problem between |
I think it's worth discussing going one step further, and remove both |
perhaps but the Customization directly from Bevy features sure is nice indeed truly |
gfx-rs/wgpu#4967 has been merged, which should fix the NVIDIA issue. Unfortunately, it couldn't make it into wgpu 0.19.1 because of breaking API changes: gfx-rs/wgpu#5114 (comment) |
I support keeping the cargo features on the Bevy crate to allow for customizability. Do not remove them in favor of unconditionally enabling both on the I fully support adding Wayland to default features. I have had this position for years. It is no longer the case that Wayland users are a small minority or early-adopters of new tech. Most Linux distros nowadays default to Wayland. Wayland should be enabled by default to provide the best experience for users. Also it is no longer the case that XWayland is just fine for everyone and any Wayland users can be assumed to have a reasonably good experience with XWayland anyway. A few years ago, Wayland was mostly being adopted by users on systems that already had great support for X11. Nowadays, there are many platforms and environments where X11 support is neglected (usually available but works poorly) and only Wayland is well-supported. I personally have quite a few "unusual" systems where I have had to build Bevy with Wayland support for it to be usable and not run into weird issues; to name a few: Asahi Linux, WSLg in WSL2, Chromebooks, ... Modern Linux distros and desktop development focus on Wayland. X11 is bitrotting. |
fixed merge conflicts |
The latest number I could find was 33.68% of linux users on wayland: https://www.gamingonlinux.com/users/statistics/#SessionType-top, so still a minority Is there an equivalent to xvfb for wayland? |
Take a look at the xwayland-run project.
Even though Nvidia has also fixed this issue on their side with a newer driver, I think we should wait until we have updated to wgpu 0.20 to merge this, to be on the safe side. After that, I don't think there's any big blocker left. |
You added a new feature but didn't update the readme. Please run |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that #13186 was merged, this can be looked at again.
@@ -78,6 +78,8 @@ default = [ | |||
"tonemapping_luts", | |||
"default_font", | |||
"webgl2", | |||
"wayland", | |||
"bevy_debug_stepping", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think you meant to enable the bevy_debug_stepping
feature here? @amytimed
To fix CI, this PR should also add |
I want to draw attention to this issue: gfx-rs/wgpu#5505 Defaulting to Wayland will break Bevy for Wayland users with no access to Vulkan drivers. I already have a fix cooking for this, but haven't had the time to finish it yet. |
Removing the |
I think "this is blocked on higher quality" is a more accurate read than "this is controversial". |
Objective
Solution
Just one commit to add
wayland
to the default features indeedWhy should it be merged?
The discussion in #4106 seems to be overwhelmingly positive toward adding
wayland
to the default features, as it can greatly improve user experience for Linux users who use Wayland.Many of the most popular Linux Desktop Environments (DE) like KDE Plasma Desktop and GNOME have Wayland support. With the release of Plasma 6, Wayland is now used by default, and in GNOME, Wayland has been the default for quite a while now.
With Plasma and GNOME, the most popular Linux DEs, now defaulting to Wayland, it seems like enabling Wayland support would truly indeed positively affect quite a lot of Linux users indeed.