-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Description
Bevy version
Current main, commit d6d25d8
Relevant system information
Hardware: Apple M1 Pro, 14in MacBook Pro
OS: Asahi Linux
Drivers: mesa-asahi-edge-23.2.0_pre20230606-1
Kernel: linux-asahi-edge-6.3.asahi7-1
AdapterInfo { name: "Apple M1 Pro (G13S C0)", vendor: 65541, device: 0, device_type: IntegratedGpu, driver: "", driver_info: "", backend: Gl }
SystemInfo { os: "Linux Arch Linux ARM", kernel: "6.3.0-asahi-7-1-edge-ARCH", cpu: "Icestorm-M1-Pro", core_count: "10", memory: "31.0 GiB" }
What you did
Try to run any bevy example.
What went wrong
Panic on wgpu error:
2023-06-08T09:12:26.516875Z ERROR wgpu_core::device: surface configuration failed: incompatible window kind
thread 'main' panicked at 'Error in Surface::configure: Validation Error
Caused by:
Invalid surface
', /home/ida/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.16.1/src/backend/direct.rs:734:18
Relevant part of backtrace:
2: wgpu::backend::direct::Context::handle_error_fatal
at /home/ida/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.16.1/src/backend/direct.rs:308:9
3: <wgpu::backend::direct::Context as wgpu::context::Context>::surface_configure
at /home/ida/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.16.1/src/backend/direct.rs:734:13
4: <T as wgpu::context::DynContext>::surface_configure
at /home/ida/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.16.1/src/context.rs:2056:9
5: wgpu::Surface::configure
at /home/ida/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.16.1/src/lib.rs:4150:9
6: bevy_render::renderer::render_device::RenderDevice::configure_surface
at ./crates/bevy_render/src/renderer/render_device.rs:170:9
7: bevy_render::view::window::prepare_windows
at ./crates/bevy_render/src/view/window.rs:338:13
Additional information
Native Wayland support works (compiling with --features wayland). This is a XWayland-related issue.
The question is whether this is something that we should investigate in Bevy or wgpu, or an upstream issue we should forward to Asahi.
The stance of the Asahi Linux project is that they are not interested in supporting Xorg, they are focusing their efforts entirely on Wayland and providing a good Wayland experience to their users. However, they are interested in supporting XWayland for legacy compatibility, so perhaps they would be interested in fixing this (if it is an issue on their end).
I would also like to take the opportunity to urge Bevy to add wayland to the default cargo features. More and more distros are becoming Wayland first, and as we can see with Asahi, the main development focus is on Wayland. Wayland-native builds will offer the best user experience on such distros.
The last time I brought this up, @cart shut it down with the argument: XWayland "should be able to run everywhere", Wayland adds a few extra transitive dependencies to Bevy and a (small) extra compile time cost, and so it should be optional.
I disagree. I think providing the best user experience for users of modern Linux distros by default is important, and justifies the minor cost of the few extra deps and small increase in compile time.
That said, we should still investigate this issue and try to fix it. :)