bevyengine / bevyengine/bevy

Panic when runing bevy with RenderDoc if wayland enabled: Vulkan driver does not support VK_KHR_wayland_surface

Open
#21,292 2 comments 1 reaction 0 assignees View on GitHub
A-Rendering C-Bug C-Machine-Specific I-Crash O-Linux S-Blocked
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 16h
Merged PRs (30d)
171

Description

## Bevy version and features

- 0.17.rc2
- default features + wayland

## Relevant system information

```
2025-09-30T04:32:32.111371Z INFO bevy_diagnostic::system_information_diagnostics_plugin::internal: SystemInfo { os: "Linux (EndeavourOS rolling)", kernel: "6.16.8-arch3-1", cpu: "AMD Ryzen 7 4800U with Radeon Graphics", core_count: "8", memory: "15.0 GiB" }
2025-09-30T04:32:32.156152Z INFO bevy_render::renderer: AdapterInfo { name: "AMD Radeon Graphics (RADV RENOIR)", vendor: 4098, device: 5686, device_type: IntegratedGpu, driver: "radv", driver_info: "Mesa 25.2.3-arch1.2", backend: Vulkan }
2025-09-30T04:32:32.226761Z INFO bevy_render::batching::gpu_preprocessing: GPU preprocessing is fully supported on this device.
```

## What you did

Enable bevy wayland feature and run `renderdoccmd capture target/debug/xxxgame`

## What went wrong

```
2025-09-30T04:38:30.251007Z INFO bevy_render::batching::gpu_preprocessing: GPU preprocessing is fully supported on this device.
2025-09-30T04:38:30.257075Z INFO bevy_winit::system: Creating new window Bevy game (0v0)
thread 'Compute Task Pool (5)' (461713) panicked at /home/luo/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/bevy_render-0.17.0-rc.2/src/view/window/mod.rs:324:26:
Failed to create wgpu surface: CreateSurfaceError { inner: Hal(FailedToCreateSurfaceForAnyBackend({Vulkan: InstanceError { message: "Vulkan driver does not support VK_KHR_wayland_surface", source: None }})) }
stack backtrace:
0: __rustc::rust_begin_unwind
at /rustc/0be8e16088894483a7012c5026c3247c14a0c3c2/library/std/src/panicking.rs:698:5
1: core::panicking::panic_fmt
at /rustc/0be8e16088894483a7012c5026c3247c14a0c3c2/library/core/src/panicking.rs:75:14
2: core::result::unwrap_failed
at /rustc/0be8e16088894483a7012c5026c3247c14a0c3c2/library/core/src/result.rs:1855:5
3: core::result::Result::expect
at /home/luo/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/result.rs:1178:23
4: bevy_render::view::window::create_surfaces::{{closure}}
at /home/luo/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/bevy_render-0.17.0-rc.2/src/view/window/mod.rs:324:26
5: hashbrown::map::Entry::or_insert_with
at /home/luo/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/hashbrown-0.16.0/src/map.rs:3584:50
6: bevy_render::view::window::create_surfaces
at /home/luo/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/bevy_render-0.17.0-rc.2/src/view/window/mod.rs:313:14
7: core::ops::function::FnMut::call_mut
at /home/luo/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:166:5
8: core::ops::function::impls:: for &mut F>::call_mut
at /home/luo/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:298:21
9: Out>>::run::call_inner
at /home/luo/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/bevy_ecs-0.17.0-rc.2/src/system/function_system.rs:926:21
10: Out>>::run
at /home/luo/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/bevy_ecs-0.17.0-rc.2/src/system/function_system.rs:929:17
11: as bevy_ecs::system::system::System>::run_unsafe
at /home/luo/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/bevy_ecs-0.17.0-rc.2/src/system/function_system.rs:711:29
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
Encountered a panic in system `bevy_render::view::window::create_surfaces`!
```

## Additional information

The issue doesn't happend if I run RenderDoc with `bevy/wayland` disabled, or run bevy with wayland enabled(not using RenderDoc).

Contributor guide

Open the contributing guide

Research direction

Start in bevy_render/src/view/window/mod.rs at create_surfaces, especially the surface creation failure reported at line 324. Reproduce with `renderdoccmd capture target/debug/xxxgame` using the Wayland feature, then compare it with runs with Wayland disabled and without RenderDoc; done means RenderDoc no longer causes a panic when the Wayland Vulkan surface is unsupported.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
computer-graphics
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.