Wgpu + winit surface error on Wayland

So I want to work with wgpu + winit for a project and I kept getting a weird Error Message, so I've tried the learn-wgpu examples and encountered the same error
wp_linux_drm_syncobj_manager_v1#55: error 0: Surface already has a syncobj attached

The compositor I'm using is Hyprland, but that is not the cause, since Gnome Wayland showed the same problem, but when I tried xorg, it worked, but I want to use Wayland, but haven't really found any solution for that

if you want the code of one example:

But the problem seems to be a general thing with wayland / wgpu
please, if anyone can help.
Any advice appreciated.

Ok, Edit: I tracked it down to the VULKAN Backend
The Backend was set to Primary and seemingly defaulted to vulkan.
When selecting GL as backend it actually works

So I still would like help with fixing the Vulkan problem, but if anyone comes across this with a similar problem
Stopgap solution
change the instance backend from Vulkan to GL or try the others, depending on your system

This appears to be a known issue: Vulkan surface creation fails on wayland · Issue #6320 · gfx-rs/wgpu · GitHub

And this issue was closed as a duplicate, but has what looks like exactly the same error message: Program not running and just crashing. · Issue #6355 · gfx-rs/wgpu · GitHub

Looks like the same problem as Vulkan backend in renderdoc with wayland · Issue #3889 · gfx-rs/wgpu · GitHub from back in June 2023. That's still open. Did WGPU ever work on Wayland other than in old OpenGL mode?

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.