Skip to content
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 Rendering] "Unable to find a GPU" on ChromeOS w/ Crostini/Pengin/Linux (maybe GL related) #3023

Open
RobDavenport opened this issue Oct 25, 2021 · 5 comments
Labels
A-Rendering Drawing game state to the screen C-Startup A crash that occurs when first attempting to run a Bevy app O-Linux Specific to the Linux desktop operating system P-Crash A sudden unexpected crash S-Needs-Investigation This issue requires detective work to figure out what's going wrong

Comments

@RobDavenport
Copy link
Contributor

RobDavenport commented Oct 25, 2021

Bevy version

Pipelined Rendering branch - 432ce72 and also main - 6a8a8c9

Operating system & version

ChromeOS w/ Penguin: Version 94.0.4606.97 (Official Build) beta (64-bit)
ASUS Chromebook C425

What you did

  1. Tried running any of the 0.5 examples - failed on "Unable to find a GPU"
  2. Tried running any of the main branch examples - also failed on "Unable to find a GPU"
  3. Read through this issue Opengl backend not recognized (Nvidia Quadro 2000) Unable to find a GPU #3016 and tried the Pipelined Rendering branch w/ the suggested example, as well as other normal examples - failed on "Unable to find a GPU"
  4. Set env variable for wgpu WGPU_BACKEND to gl, and tried running the pipelined examples, got different errors.

What you expected to happen

The examples would run correctly, if the renderer was forced to use GL backend.

What actually happened

Bevy examples paniced due to GPU issues, regardless of graphics backend.

Additional information

Currently Vulkan support is really shoddy on ChromeOS due to running Linux inside of a VM. OpenGL seems to be work much better. I am able to run the current main branch of wgpu examples with no problem (other than some warning about keyboard and caps lock... lol). I'm also able to run other things using OpenGL such as macroquad examples.

This machine does not support Vulkan, as vulkaninfo returns nothing.

Failed to find GPU errors on pipelined_texture_atlas example

thread 'main' panicked at 'Unable to find a GPU! Make sure you have installed required drivers!', pipelined/bevy_render2/src/renderer/mod.rs:54:10
stack backtrace:
   0: rust_begin_unwind
             at /rustc/09c42c45858d5f3aedfa670698275303a3d19afa/library/std/src/panicking.rs:517:5
   1: core::panicking::panic_fmt
             at /rustc/09c42c45858d5f3aedfa670698275303a3d19afa/library/core/src/panicking.rs:101:14
   2: core::option::expect_failed
             at /rustc/09c42c45858d5f3aedfa670698275303a3d19afa/library/core/src/option.rs:1615:5
   3: core::option::Option<T>::expect
             at /rustc/09c42c45858d5f3aedfa670698275303a3d19afa/library/core/src/option.rs:698:21
   4: bevy_render2::renderer::initialize_renderer::{{closure}}
             at ./pipelined/bevy_render2/src/renderer/mod.rs:51:19
   5: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
             at /rustc/09c42c45858d5f3aedfa670698275303a3d19afa/library/core/src/future/mod.rs:80:19
   6: futures_lite::future::block_on::{{closure}}
             at /home/zerve/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-lite-1.12.0/src/future.rs:89:27
   7: std::thread::local::LocalKey<T>::try_with
             at /rustc/09c42c45858d5f3aedfa670698275303a3d19afa/library/std/src/thread/local.rs:399:16
   8: std::thread::local::LocalKey<T>::with
             at /rustc/09c42c45858d5f3aedfa670698275303a3d19afa/library/std/src/thread/local.rs:375:9
   9: futures_lite::future::block_on
             at /home/zerve/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-lite-1.12.0/src/future.rs:79:5
  10: <bevy_render2::RenderPlugin as bevy_app::plugin::Plugin>::build
             at ./pipelined/bevy_render2/src/lib.rs:88:13
  11: bevy_app::plugin_group::PluginGroupBuilder::finish
             at ./crates/bevy_app/src/plugin_group.rs:104:21
  12: bevy_app::app::App::add_plugins
             at ./crates/bevy_app/src/app.rs:526:9
  13: pipelined_texture_atlas::main
             at ./examples/2d/pipelined_texture_atlas.rs:19:5
  14: core::ops::function::FnOnce::call_once
             at /rustc/09c42c45858d5f3aedfa670698275303a3d19afa/library/core/src/ops/function.rs:227:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

Different error with wgpu_backend set to gl

Oct 26 00:31:14.950  INFO bevy_render2::renderer: AdapterInfo { name: "virgl", vendor: 0, device: 0, device_type: DiscreteGpu, backend: Gl }
Oct 26 00:31:15.006 ERROR wgpu::backend::direct: Handling wgpu errors as fatal by default    
thread 'main' panicked at 'wgpu error: Validation Error

Caused by:
    In Device::create_render_pipeline
      note: label = `pbr_pipeline`
    Internal error in FRAGMENT shader: gsamplerCubeArrayShadow isn't supported in textureGrad, textureLod or texture with bias

', /home/zerve/.cargo/registry/src/github.com-1ecc6299db9ec823/wgpu-0.11.0/src/backend/direct.rs:2195:5
stack backtrace:
   0: rust_begin_unwind
             at /rustc/09c42c45858d5f3aedfa670698275303a3d19afa/library/std/src/panicking.rs:517:5
   1: std::panicking::begin_panic_fmt
             at /rustc/09c42c45858d5f3aedfa670698275303a3d19afa/library/std/src/panicking.rs:460:5
   2: wgpu::backend::direct::default_error_handler
             at /home/zerve/.cargo/registry/src/github.com-1ecc6299db9ec823/wgpu-0.11.0/src/backend/direct.rs:2195:5
   3: core::ops::function::Fn::call
             at /rustc/09c42c45858d5f3aedfa670698275303a3d19afa/library/core/src/ops/function.rs:70:5
   4: <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call
             at /rustc/09c42c45858d5f3aedfa670698275303a3d19afa/library/alloc/src/boxed.rs:1650:9
   5: wgpu::backend::direct::ErrorSinkRaw::handle_error
             at /home/zerve/.cargo/registry/src/github.com-1ecc6299db9ec823/wgpu-0.11.0/src/backend/direct.rs:2183:9
   6: wgpu::backend::direct::Context::handle_error
             at /home/zerve/.cargo/registry/src/github.com-1ecc6299db9ec823/wgpu-0.11.0/src/backend/direct.rs:184:9
   7: <wgpu::backend::direct::Context as wgpu::Context>::device_create_render_pipeline
             at /home/zerve/.cargo/registry/src/github.com-1ecc6299db9ec823/wgpu-0.11.0/src/backend/direct.rs:1276:13
   8: wgpu::Device::create_render_pipeline
             at /home/zerve/.cargo/registry/src/github.com-1ecc6299db9ec823/wgpu-0.11.0/src/lib.rs:1770:17
   9: bevy_render2::renderer::render_device::RenderDevice::create_render_pipeline
             at ./pipelined/bevy_render2/src/renderer/render_device.rs:100:36
  10: <bevy_pbr2::render::PbrShaders as bevy_ecs::world::FromWorld>::from_world
             at ./pipelined/bevy_pbr2/src/render/mod.rs:332:24
  11: bevy_app::app::App::init_resource
             at ./crates/bevy_app/src/app.rs:437:28
  12: <bevy_pbr2::PbrPlugin as bevy_app::plugin::Plugin>::build
             at ./pipelined/bevy_pbr2/src/lib.rs:42:9
  13: bevy_app::plugin_group::PluginGroupBuilder::finish
             at ./crates/bevy_app/src/plugin_group.rs:104:21
  14: bevy_app::app::App::add_plugins
             at ./crates/bevy_app/src/app.rs:526:9
  15: pipelined_texture_atlas::main
             at ./examples/2d/pipelined_texture_atlas.rs:19:5
  16: core::ops::function::FnOnce::call_once
             at /rustc/09c42c45858d5f3aedfa670698275303a3d19afa/library/core/src/ops/function.rs:227:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

Clearly the wgpu_backend env var is doing something, but not enough to get the examples to run.

@RobDavenport RobDavenport added C-Bug An unexpected or incorrect behavior S-Needs-Triage This issue needs to be labelled labels Oct 25, 2021
@NiklasEi NiklasEi added A-Rendering Drawing game state to the screen P-Crash A sudden unexpected crash S-Needs-Investigation This issue requires detective work to figure out what's going wrong O-Linux Specific to the Linux desktop operating system and removed C-Bug An unexpected or incorrect behavior S-Needs-Triage This issue needs to be labelled labels Oct 25, 2021
@RobDavenport
Copy link
Contributor Author

RobDavenport commented Oct 30, 2021

Minor updates. Have since pulled the latest pipelined rendering branch. Am now getting segfautls when trying to run the examples:

cargo run --example texture_pipelined
Oct 30 19:47:30.407  INFO winit::platform_impl::platform::x11::window: Guessed window scale factor: 1.25    
Oct 30 19:47:31.541  INFO bevy_render2::renderer: AdapterInfo { name: "virgl", vendor: 0, device: 0, device_type: DiscreteGpu, backend: Gl }
Segmentation fault (core dumped)

cargo run --example 3d_scene_pipelined
Oct 30 19:48:42.123  INFO winit::platform_impl::platform::x11::window: Guessed window scale factor: 1.25    
Oct 30 19:48:42.944  INFO bevy_render2::renderer: AdapterInfo { name: "virgl", vendor: 0, device: 0, device_type: DiscreteGpu, backend: Gl }
Segmentation fault (core dumped)

This is on this commit: c5af133

@bjorn3
Copy link
Contributor

bjorn3 commented Oct 30, 2021

Can you attach a debugger and get a backtrace where it crashes?

@RobDavenport
Copy link
Contributor Author

Update: Tried again on 09706cd

Still segfaults. I'll look and see how to attach a debugger.

@alice-i-cecile alice-i-cecile added the C-Startup A crash that occurs when first attempting to run a Bevy app label Dec 21, 2021
@Morgawr
Copy link

Morgawr commented Jan 20, 2022

Can confirm that I'm also having this issue, running on a chromebook, I wanted to try some development using bevy but the examples won't work in crostini (Linux on Chromebooks) because of lack of Vulkan support. Not sure if having an OpenGL fallback would be possible but it'd be nice.

@bugQ
Copy link

bugQ commented Nov 11, 2022

I get a different kind of error on Crostini.

2022-11-10T03:26:49.941661Z  INFO bevy_render::renderer: AdapterInfo { name: "llvmpipe (LLVM 11.0.1, 256 bits)", vendor: 65541, device: 0, device_type: Cpu, backend: Vulkan }
WARNING: lavapipe is not a conformant vulkan implementation, testing use only.
Segmentation fault (core dumped)

No stack trace, even with RUST_BACKTRACE=1, and debugging points to a nameless blob of llvm code. It would be nice to know what exactly is breaking llvmpipe, but as it says, it's not a conformant Vulkan implementation.

Also, note this is very clearly due to lack of a proper Vulkan driver, which so far, there is not an official one for most Chromebooks. It sounds like others are having similar issues, but these issues are not necessarily bevy's fault (aside from lack of OpenGL support, which is already tracked as #841).

Perhaps error handling could be improved, but other than that, I'm not sure what bevy could do about this. The responsibility is primarily on ChromeOS to supply a working copy of the Venus driver for Crostini, or on us as users to try adding it DIY style.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Rendering Drawing game state to the screen C-Startup A crash that occurs when first attempting to run a Bevy app O-Linux Specific to the Linux desktop operating system P-Crash A sudden unexpected crash S-Needs-Investigation This issue requires detective work to figure out what's going wrong
Projects
None yet
Development

No branches or pull requests

6 participants