-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Pipelined: 3D examples crash with AMDVLK on Wayland #3288
Comments
Hello, have you tried using Vulkan backend for Sway? (requires master branch afaik) I'm able to run anything in bevy with my compositor which uses Vulkan for rendering. The thing is, Vulkan program on Wayland requires some additional (client-side) extensions like To run Sway (master) with Vulkan backend you should run EDIT: Added instructions for Vulkan backend in Sway. |
Removing from the 0.6 milestone. This is important to investigate and fix, but it is also niche enough that I don't think it should block the 0.6 release. |
I'm actually getting this error on many of examples in main branch. For example I'm also using amd-gpu on linux, however I'm using xorg instead of Wayland. I think this problem is not specific to Wayland but to only AMDVK. 0.5 runs just fine for me so this seems to be regression in 0.6 rewrite. My full setup is Linux 5.10.88, nixos-unstable (SMP Wed Dec 22 08:31:00 UTC 2021),
|
I think, it's all related to AMDVLK, someone on one discord server observed really low FPS in games with AMDVLK (around 30-40), but when switched to regular drivers (mesa or amd-gpu), jumped up to 120+ with RX6600. |
In my setup I'm making both |
Removing AMDVK doesn't fix this.
I can try to switch amdgpu to amdgpu-pro (proprietary driver) but it will require some work - I would need to fix that package in nixos - we don't support it much especially on unstable branch which is what I'm using since it has little to no advantage over open source driver. |
I can confirm that switching to is there anything else I could do to help to debug this one? |
@cart I think you should rename this issue. Or if you want me to create another one just let me know. I'm also able to test all combinations of these things in my setup in case you'll need some help testing this. |
Using the Edit: looks like this was a false negative, as comments below mine might suggest. Issue persists on the amdgpu-pro driver, using the X backend, as well - although its rarity has increased in my tests. |
I'm seeing this exact issue on X11, both using amdgpu, and amdgpu-pro (ran through progl). The application opens a window, runs a single frame, and panicks.
|
Looks like all those issues are caused by AMD drovers directly or bugs in wgpu's Vulkan backend because on Nvidia (RTX 3060) works fine but when I swap it with AMD (RX570) then panics on both Wayland and X11, doesn't matter if I use amdgpu-pro or amdvlk. |
In 6 days of of using amdgpu-pro 21.30 I didn't get a single crash. Which version did you use? Are you sure you've managed to replace amdgpu with amdgpu-pro? Did you reboot system after switching driver (it's required)? |
Yep, I did everything also checked everything and using amdgpu-pro 21.30 as well |
Hmm then I have no idea what is different. Anyway I agree this is most likely bug in a driver or (perhaps more likely) in wgpu/gfx. For full disclosure I have RX 5700 XT and run 5.10.88 kernel.
Just be aware that amdgpu-pro and amdvlk are two different things. Amdvlk is vulkan driver. You can use either that or mesa RADV. This choice doesn't matter for this issue. Amdgpu vs amdgpu-pro (hardware drivers) seems to matter from my testing. They both share same kernel level component so I don't think kernel version matters in this case. This is what I use to confirm what kernel space and user space driver I run at the moment:
|
I appear to be able to run the renderer if I tax it heavily enough. By spawning in 10_000 cubes, the renderer starts running. Once it gets sufficiently low load however (through a system that randomly deletes cubes), it immediately crashes again. Edit: After actually using my mind after the previous comment, I disabled vsync on the window, and tried it again, this time with no crashes. |
I can no longer reproduce the issue with open source driver on current main branch. |
i had this problem too but only on vulkan, when i switched WGPU_BACKEND to Gl it was fixed, i still dont know what could cause the problem on amdvk, this happened on the 0.6.1 |
Pretty sure GL backend defaults to LLVMpipe which is CPU based implementation of OpenGL. (At least for now) |
YES, I can confirm that this issue still occurs with AMD's official drivers, with the newest bevy main. Tested with AMDGPU-PRO proprietary driver (version 21.50.2.1384496) now, which is mostly the same driver as the official open source AMDVLK ... I don't have access to AMDVLK anymore from my current distro. I still get the issue as described originally. Panic: "Failed to acquire next swapchain texture". The unofficial open-source RADV works. |
Can confirm this occurs on Bevy 0.8 [07d576] Using the following command: I don't know what is useful, or what is not, so I'll keep including everything: With Vulkan backend
Vulkan backend `RUST_BACKTRACE=1`
With OpenGL backend through `WGPU_BACKEND=gl`
I also tested it by running GNOME on Xorg, but the same crash occurred
|
This should probably be closed, AMD makes horrible quality proprietary drivers for Linux. |
Bevy version
Current
main
(commitcf48132e
).Operating system & version
Linux 5.15.4 / Sway Wayland Compositor / AMDVLK 2021.Q3.7
Mesa RADV driver works with both wayland and x11.
AMDVLK driver works with x11, but not wayland.
What you did
cargo run --example 3d_scene_pipelined --features bevy/wayland --release
(or any other pipelined 3D example)
2D seems to work.
bevymark_pipelined
works correctly.Old renderer works. The old
3d_scene
works correctly.What you expected to happen
The new 3d examples to not crash in wayland mode with the amdvlk driver. :)
What actually happened
Bevy manages to render at least 1 frame (don't know how to tell if it can do more than 1 before crashing). I can tell, because the window flashes briefly.
The window opens, a frame is rendered and displayed, and then almost immediately crashes with a panic (and sometimes segfault, but i think that's irrelevant).
Additional information
Seems like this happens in the window presentation code and its swapchain management.
I know that @cart is reworking all of this stuff with the upcoming "actual pipelining" implementation. When that code lands, we should check if this bug still persists. It might turn out to just be fixed. :)
The text was updated successfully, but these errors were encountered: