-
Notifications
You must be signed in to change notification settings - Fork 1k
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
No appropiate adapter found with WGPU_BACKEND=vulkan
on Linux
#3033
Comments
Random idea: try without the compatible surface |
@cwfitzgerald I've tried with |
I've encountered some issues with using wgpu, multiple GPUs and Vulkan on Linux. I think the easiest solution to set |
@expenses Thanks for the suggestion. It didn't work, but I've managed to succesfully run the app by just not using Nix. I'm not sure what the issue with the Nix environment was (I'm not too experienced with Nix, probably I should have set up more things in |
Ran into this same issue with NixOS + iced (which uses wgpu). My findings are that NixOS distributes suffixed libraries (e.g. |
@jonringer I'm running into the same issue on nixos. Were you able to fix it? |
@SeanOMik pkgs.mkShell {
...
shellHook = ''
LD_LIBRARY_PATH="''${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}${
with pkgs;
lib.makeLibraryPath [
vulkan-loader
xorg.libX11
xorg.libXcursor
xorg.libXi
xorg.libXrandr
]
}"
export LD_LIBRARY_PATH
'';
}; |
Previous comment worked for me but I had to add libxkbcommon to the packages as per this blog post. So my shell.nix file ended up being: { pkgs ? import <nixpkgs> {} }:
pkgs.mkShell {
shellHook = ''
LD_LIBRARY_PATH="''${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}${
with pkgs;
lib.makeLibraryPath [
vulkan-loader
xorg.libX11
xorg.libXcursor
xorg.libXi
xorg.libXrandr
libxkbcommon
]
}"
export LD_LIBRARY_PATH
'';
} |
I'm using Nix to create an environment where I have vulkan available (I can run
vkcube
andvulkaninfo
shows me the 2 devices that I have - the Intel integrated GPU and the AMD dedicated GPU). I'm trying to render a simple triangle (the code is based on the "Learn WGPU" tutorial, so I'm also using winit). When I run:The app fails at:
I'm not sure whether I should enable a certain feature in
Cargo.toml
forwgpu
(I'm using version0.13.1
), or if the problem is somewhere else (for example in my Nix environment). I couldn't find info on how to build with the vulkan backend on Linux, sorry if I've missed the corresponding docs.The full backtrace
Source code
My flake.nix
The text was updated successfully, but these errors were encountered: