-
-
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
Examples are panicking when running in virtualbox #413
Comments
Seems related to #402. Doesn't work on x86_64 Manjaro XFCE 20.0.3 nor on Raspberry Pi 4B+ with 8GB RAM either. Although it compiles without any problems. |
Are you sure the virtual machine "gpu" and its driver support Vulkan? I doubt that's the case, because IIRC vulkan support in virtual machines is still very experimental if at all existent. Your error seems to indicate that this is the case ("cannot find gpu!"); your system does not provide the needed GPU APIs. Bevy does not support an OpenGL or GLES backend yet, or any sort of software rendering, so you cannot run it if you don't have a GPU and driver that support Vulkan (or dx12 on windows, or metal on mac). I wouldn't expect bevy to work in a virtual machine at all, at least not yet. |
I do have vulkan-intel driver installed on my Laptop. Currently checking out if it can be or is already loaded. On Raspberry Pi 4B+ it's certainly not available and thus understandable that it doesn't work. But anyway @jamadazi thank you for the hint. EDIT |
Is is possible to install mesa-vulkan-drivers? That's what it's called in Debian. Performance will be bad but at least it does run. |
@mkesper I've got |
Sorry, I've no idea then, that was just what helped me on baremetal. |
TL;DRIt's not bevy's fault, this is due to the SVGA driver does not support vulkan right now. Methods to avoid this issue(currently):
Although this is a thread from September, but it is still open, and I've ran into the same issue, tried to figure it out with some workaround. The env I've tried:
And here are several ways about how to make bevy(or more generically, vulkan backend) running under a VM-like environment without hacking the source code of bevy: 1. Try to get a external gpu and passthrough it to you guest machine.This is the most efficient and painless way to avoid the none gpu issue. You will fell like you are getting the power of the computed units -- everything even cuda works fine.
And do make sure you installed the proper driver, check if the dkms module is loaded, But the problem is, GPU is really expensive right now and you need a external GPU with a second PCIE slot to do that, which may only in full-sized boards, no luck for ITX builds and low-end products. 2. Configuring a software Vulkan rasterizerSo we are here, we do not own any other GPUs, or we can't do that, or you just don't want to, whatever the reason is, we need to fix it and get bevy, and other Vulkan applications working on a VM guest. If you are in Ubuntu/WSL/WSL2, you could try compile the mesa source yourself and install it, or you could just use this PPA: https://launchpad.net/~kisak/+archive/ubuntu/kisak-mesa If you are in Arch, just install The FPS is about half of the hardware solution, you can fell you are back to the 80s while running the *edited 2022/02/28since gfx-rs/wgpu#1551 was closed maybe this problem can be fixed by updating to the latest wgpu |
Bevy has a few examples running in CI using Lines 216 to 259 in 073f381
|
Virtualbox 6.1.12
Guest OS: Arch Linux, Kernel 5.8.5
GPU: VMware SVGA II Adapter (VMSVGA)
Steps to reproduce:
cargo run --example breakout
Expected behavior:
Running the bevy breakout example
Actual behavior:
Cargo / Rust crashes with following errormessage: (with
RUST_BACKTRACE=1
)The text was updated successfully, but these errors were encountered: