Skip to content

thread 'main' panicked at 'Unable to find a GPU! Make sure you have installed required drivers!' #807

Closed

Description

@robinmoussu

Bevy version

Current master (f547885).

Operating system & version

Archlinux, with Xorg

What you did

I tried to run cargo run --example $EXAMPLE. All but ecs_guide, headless, headless_wasm, hello_word, and startup_system failed with the following error:

thread 'main' panicked at 'Unable to find a GPU! Make sure you have installed required drivers!', crates/bevy_wgpu/src/wgpu_renderer.rs:37:14
``

**Additional information**

As far as I can tell, my GPU drivers should work but I don't know how to check it! I'm using a R9 280X as reported by `lspci`:

``` shell
$ lspci
00:00.0 Host bridge: Intel Corporation 2nd Generation Core Processor Family DRAM Controller (rev 09)
00:01.0 PCI bridge: Intel Corporation Xeon E3-1200/2nd Generation Core Processor Family PCI Express Root Port (rev 09)
00:16.0 Communication controller: Intel Corporation 6 Series/C200 Series Chipset Family MEI Controller #1 (rev 04)
00:19.0 Ethernet controller: Intel Corporation 82579V Gigabit Network Connection (rev 05)
00:1a.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #2 (rev 05)
00:1b.0 Audio device: Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller (rev 05)
00:1c.0 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 1 (rev b5)
00:1c.1 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 2 (rev b5)
00:1c.2 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 3 (rev b5)
00:1c.3 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 4 (rev b5)
00:1c.4 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 5 (rev b5)
00:1c.6 PCI bridge: Intel Corporation 82801 PCI Bridge (rev b5)
00:1d.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #1 (rev 05)
00:1f.0 ISA bridge: Intel Corporation P67 Express Chipset LPC Controller (rev 05)
00:1f.2 SATA controller: Intel Corporation 6 Series/C200 Series Chipset Family 6 port Desktop SATA AHCI Controller (rev 05)
00:1f.3 SMBus: Intel Corporation 6 Series/C200 Series Chipset Family SMBus Controller (rev 05)
01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Tahiti XT [Radeon HD 7970/8970 OEM / R9 280X]
01:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Tahiti HDMI Audio [Radeon HD 7870 XT / 7950/7970]
03:00.0 USB controller: NEC Corporation uPD720200 USB 3.0 Host Controller (rev 03)
05:00.0 SATA controller: JMicron Technology Corp. JMB362 SATA Controller (rev 10)
06:00.0 USB controller: NEC Corporation uPD720200 USB 3.0 Host Controller (rev 03)
07:00.0 PCI bridge: ASMedia Technology Inc. ASM1083/1085 PCIe to PCI Bridge (rev 01)
08:01.0 FireWire (IEEE 1394): VIA Technologies, Inc. VT6306/7/8 [Fire II(M)] IEEE 1394 OHCI Controller (rev c0)

And I have the xf86-video-ati driver installed:

$ pacman -Ss xf86-video
extra/xf86-video-amdgpu 19.1.0-2 (xorg-drivers)
    X.org amdgpu video driver
extra/xf86-video-ati 1:19.1.0-2 (xorg-drivers) [installed]
    X.org ati video driver
extra/xf86-video-dummy 0.3.8-4 (xorg-drivers)
    X.org dummy video driver
extra/xf86-video-fbdev 0.5.0-2 (xorg-drivers)
    X.org framebuffer video driver
extra/xf86-video-intel 1:2.99.917+908+g7181c5a4-1 (xorg-drivers)
    X.org Intel i810/i830/i915/945G/G965+ video drivers
extra/xf86-video-nouveau 1.0.16-2 (xorg-drivers)
    Open Source 3D acceleration driver for nVidia cards
extra/xf86-video-openchrome 0.6.0-4 (xorg-drivers)
    X.Org Openchrome drivers
extra/xf86-video-sisusb 0.9.7-3
    X.org SiS USB video driver
extra/xf86-video-vesa 2.5.0-1 (xorg-drivers xorg)
    X.org vesa video driver
extra/xf86-video-vmware 13.3.0-2 (xorg-drivers)
    X.org vmware video driver
extra/xf86-video-voodoo 1.2.5-11 (xorg-drivers)
    X.org 3dfx Voodoo1/Voodoo2 2D video driver
community/xf86-video-qxl 0.1.5-8 (xorg-drivers)
    Xorg X11 qxl video driver

Activity

  1. karroffel commented on Nov 7, 2020

    @karroffel
    Contributor

    The message is not super clear, but to use the default bevy_wgpu your system needs to have Vulkan drivers installed which doesn't seem to be the case for your system. After installing drivers it should work.

    Duplicate of #96

  2. rj00a commented on Nov 8, 2020

    @rj00a
    Contributor

    I'm running into this issue despite being able to execute vkcube successfully. As far as I can tell, my vulkan drivers should be set up correctly. I'm using NixOS unstable with Xorg.

  3. robinmoussu commented on Nov 8, 2020

    @robinmoussu
    Author

    I’m surprised. I followed the arch wiki, and I have both amdvlk and vulkan-radeon installed, and as you can see, it should be working.

    $ ls /usr/share/vulkan/icd.d/
    amd_icd32.json  amd_icd64.json  radeon_icd.x86_64.json
  4. razaamir commented on Nov 8, 2020

    @razaamir
  5. robinmoussu commented on Nov 8, 2020

    @robinmoussu
    Author

    vkcube lead me to the right tracks

    $ ./vkcube
    failed to initialize wayland, falling back to xcb
    amdgpu_device_initialize: DRM version is 2.50.0 but this driver is only compatible with 3.x.x.
    No Vulkan devices found.

    I don't have time right know to look at it, but I will do in the next days.

  6. razaamir commented on Nov 8, 2020

    @razaamir
  7. loewenheim commented on Nov 8, 2020

    @loewenheim

    I get the same result. I'm on a ThinkPad with integrated Intel graphics. vkcube happily spins along without any output.

    ❯ lspci | rg VGA
    00:02.0 VGA compatible controller: Intel Corporation Skylake GT2 [HD Graphics 520] (rev 07)
    
    ❯ vulkaninfo | rg GPU
    		GPU id 	: 0 (Intel(R) HD Graphics 520 (SKL GT2))
    		GPU id 	: 0 (Intel(R) HD Graphics 520 (SKL GT2))
    		GPU id 	: 0 (Intel(R) HD Graphics 520 (SKL GT2))
    		GPU id 	: 0 (Intel(R) HD Graphics 520 (SKL GT2))
    		GPU id 	: 0 (Intel(R) HD Graphics 520 (SKL GT2))
    GPU id : 0 (Intel(R) HD Graphics 520 (SKL GT2)):
    GPU0:
    	deviceType     = PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU
    
  8. rkanati commented on Nov 11, 2020

    @rkanati

    @robinmoussu IIRC, vulkan will only work on driver/hardware combinations that support DRI 3. I'm sure there's some technical reason why.

  9. robinmoussu commented on Nov 11, 2020

    @robinmoussu
    Author

    I admit that I assumed that my GPU would be able to run vulkan. If it doesn't this just give me one more reason to upgrade ;)

  10. basile-henry commented on Nov 27, 2020

    @basile-henry

    @rj00a I'm also on NixOS and was hitting this issue. I managed to make the examples work by following https://github.com/bevyengine/bevy/blob/master/docs/linux_dependencies.md#nixos 😄

  11. loewenheim commented on Nov 27, 2020

    @loewenheim

    Thank you, that fixed the problem for me. Although I only had to add the build.rs file; I think the part about patching glslang_validator might be obsolete?

  12. basile-henry commented on Nov 27, 2020

    @basile-henry

    Yeah I didn't have to do the glslang_validator patching either. I just assumed that it's only needed for some examples (probably the ones with shaders).

  13. polendri commented on Feb 7, 2021

    @polendri

    For me (on NixOS), this was resolved by adding the build.rs file as described in the docs for NixOS. My issue was that I had put it in src, not at the root, which meant it wasn't being found.

  14. 1 remaining item

  15. Calamari commented on Dec 30, 2021

    @Calamari

    Just to understand it correctly, is a vulkan supporting GPU mandatory for using bevy? (So it does not work on a thingpad with onboard intel GPU chip?)

  16. revdeluxe commented on Apr 28, 2022

    @revdeluxe

    I guess i'm falling back to pygame since Intel HD is not supported by bevy.

  17. revdeluxe commented on Apr 28, 2022

    @revdeluxe

    Just to understand it correctly, is a vulkan supporting GPU mandatory for using bevy? (So it does not work on a thingpad with onboard intel GPU chip?)

    Yes, atleast in alpha.
    image
    Here's my Attempt in a iGPU.
    SPECS:
    CPU: Intel Celeron N3060 2.4GHZ x2
    iGPU: Intel HD BSW/400 (For some reason it has vulkan but it's unsable)
    RAM: 4GB LPDDR4, 6GB SWAP
    ROM: 500GB GPT Toshiba BRFS
    DESKTOP: XORG,XFCE
    OS: ARCH Linux, 'ArchCraft'

    Hypothetically bevy should run fine on Intel Iris iGPU. or on RDNA based iGPU.

  18. alice-i-cecile commented on Apr 28, 2022

    @alice-i-cecile
    Member

    Reopening this due to a new reproduction.

  19. Metadorius commented on Jul 26, 2022

    @Metadorius

    I have the same issue. I was surprised all examples loaded my CPU to the max, seems it's using software renderer:

         Running `target\debug\examples\alien_cake_addict.exe`
    2022-07-26T16:00:28.019473Z  INFO bevy_render::renderer: AdapterInfo { name: "Microsoft Basic Render Driver", vendor: 5140, device: 140, device_type: Cpu, backend: Dx12 }
    

    when I tried to change the backend to something non-DX12 the renderer panicked with the error below:

         Running `target\debug\examples\3d_scene.exe`
    thread 'main' panicked at 'Unable to find a GPU! Make sure you have installed required drivers!', crates\bevy_render\src\renderer\mod.rs:95:10
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
    error: process didn't exit successfully: `target\debug\examples\3d_scene.exe` (exit code: 101)
    

    That's on i5-3320M / HD Graphics 4000.

  20. greenlink commented on Dec 29, 2022

    @greenlink

    Hi guys, I'm with the same problem. The xrandr command says that I have 3 xWayland monitors (indeed I have 3 physical screens), I've installed all the mesa drivers and gdm package, and enabled gdm.service, I tried to install vulkan-intel package, but when I do that, the xrandr command shows only 1 monitor with a max resolution of 640x640, so I removed that package.

    SPECS:
    CPU: 11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz 1.80 GHz
    iGPU: Intel Iris XE
    RAM: 16GB DDR4
    OS: ARCH Linux (running inside WSL2)

    ❯ cargo run
    Finished dev [optimized + debuginfo] target(s) in 0.09s
    Running target/debug/bevy-tutorial
    2022-12-29T12:15:34.282090Z WARN winit::platform_impl::platform::x11::util::randr: XRandR reported that the display's 0mm in size, which is certifiably insane
    2022-12-29T12:15:34.282416Z INFO winit::platform_impl::platform::x11::window: Guessed window scale factor: 1
    thread 'main' panicked at 'Unable to find a GPU! Make sure you have installed required drivers! For extra information, see: https://github.com/bevyengine/bevy/blob/latest/docs/linux_dependencies.md', /home/lennon/.cargo/registry/src/githubproxy.fjygbaifeng.eu.org-1ecc6299db9ec823/bevy_render-0.9.1/src/renderer/mod.rs:121:10
    note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

  21. greenlink commented on Dec 29, 2022

    @greenlink

    The same error, but with RUST_BACKTRACE=1.

    ❯ cargo run
    Finished dev [optimized + debuginfo] target(s) in 0.09s
    Running target/debug/bevy-tutorial
    2022-12-29T12:32:46.308548Z WARN winit::platform_impl::platform::x11::util::randr: XRandR reported that the display's 0mm in size, which is certifiably insane
    2022-12-29T12:32:46.308985Z INFO winit::platform_impl::platform::x11::window: Guessed window scale factor: 1
    thread 'main' panicked at 'Unable to find a GPU! Make sure you have installed required drivers! For extra information, see: https://github.com/bevyengine/bevy/blob/latest/docs/linux_dependencies.md', /home/lennon/.cargo/registry/src/githubproxy.fjygbaifeng.eu.org-1ecc6299db9ec823/bevy_render-0.9.1/src/renderer/mod.rs:121:10
    stack backtrace:
    0: rust_begin_unwind
    at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/std/src/panicking.rs:575:5
    1: core::panicking::panic_fmt
    at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/core/src/panicking.rs:65:14
    2: core::panicking::panic_display
    at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/core/src/panicking.rs:139:5
    3: core::panicking::panic_str
    at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/core/src/panicking.rs:123:5
    4: core::option::expect_failed
    at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/core/src/option.rs:1879:5
    5: core::option::Option::expect
    at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/core/src/option.rs:741:21
    6: bevy_render::renderer::initialize_renderer::{{closure}}
    at /home/lennon/.cargo/registry/src/githubproxy.fjygbaifeng.eu.org-1ecc6299db9ec823/bevy_render-0.9.1/src/renderer/mod.rs:118:19
    7: <core::future::from_generator::GenFuture as core::future::future::Future>::poll
    at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/core/src/future/mod.rs:91:19
    8: futures_lite::future::block_on::{{closure}}
    at /home/lennon/.cargo/registry/src/githubproxy.fjygbaifeng.eu.org-1ecc6299db9ec823/futures-lite-1.12.0/src/future.rs:89:27
    9: std::thread::local::LocalKey::try_with
    at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/std/src/thread/local.rs:446:16
    10: std::thread::local::LocalKey::with
    at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/std/src/thread/local.rs:422:9
    11: futures_lite::future::block_on
    at /home/lennon/.cargo/registry/src/githubproxy.fjygbaifeng.eu.org-1ecc6299db9ec823/futures-lite-1.12.0/src/future.rs:79:5
    12: <bevy_render::RenderPlugin as bevy_app::plugin::Plugin>::build
    at /home/lennon/.cargo/registry/src/githubproxy.fjygbaifeng.eu.org-1ecc6299db9ec823/bevy_render-0.9.1/src/lib.rs:157:65
    13: bevy_app::app::App::add_boxed_plugin
    at /home/lennon/.cargo/registry/src/githubproxy.fjygbaifeng.eu.org-1ecc6299db9ec823/bevy_app-0.9.1/src/app.rs:859:9
    14: bevy_app::plugin_group::PluginGroupBuilder::finish
    at /home/lennon/.cargo/registry/src/githubproxy.fjygbaifeng.eu.org-1ecc6299db9ec823/bevy_app-0.9.1/src/plugin_group.rs:181:25
    15: bevy_app::app::App::add_plugins
    at /home/lennon/.cargo/registry/src/githubproxy.fjygbaifeng.eu.org-1ecc6299db9ec823/bevy_app-0.9.1/src/app.rs:930:9
    16: bevy_tutorial::main
    at ./src/main.rs:4:5
    17: core::ops::function::FnOnce::call_once
    at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/core/src/ops/function.rs:251:5
    note: Some details are omitted, run with RUST_BACKTRACE=full for a verbose backtrace.

  22. greenlink commented on Dec 29, 2022

    @greenlink

    Also, my gdm is working correctly, as show in this image.
    image

  23. revdeluxe commented on Dec 30, 2022

    @revdeluxe

    Make Bevy self-contained i guess it's far from happening. Atleast add SDL2 support or OpenGL Vulkan is still experimental.

  24. bengiudice commented on Jan 14, 2023

    @bengiudice

    If it helps anyone, on Alpine explicitly installing vulkan-loader resolved this.

  25. mockersf commented on Jan 30, 2023

    @mockersf
    Member

    closing to centralise in #3191

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-RenderingDrawing game state to the screenC-BugAn unexpected or incorrect behaviorS-DuplicateThis issue or PR already exists

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions