-
Notifications
You must be signed in to change notification settings - Fork 931
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
Minimal example does not work on NixOS #4792
Comments
I'm not really sure how to debug this, I know NixOS is generally pretty hard to get graphical stuff working. Make sure you have the EGL available, the appropriate mesa drivers, etc. This is probably EGL looking for something it can't find. |
I managed to make a shell that expose the libs used by WGPU, it woks so far. { pkgs ? import <nixpkgs> {} }:
pkgs.mkShell {
nativeBuildInputs = with pkgs; [
libxkbcommon
libGL
# WINIT_UNIX_BACKEND=wayland
wayland
];
LD_LIBRARY_PATH = "${pkgs.libxkbcommon}/lib:${pkgs.libGL}/lib:${pkgs.wayland}/lib";
RUST_BACKTRACE=1;
} I'll keep learning WGPU, and I'll update it if there are other needs. Cheers! |
It would be worth documenting this in the wiki or on the readme. @cwfitzgerald thoughts? |
This works on my current setup, but I thing I'll need to try it again on a plain NixOS install to check it is a sound solution. I can't do it right now, but I can take the time to do proper testing and creating the minimal nix shell for this. However, I'm still learning NixOS, so I'm trying my best but I'm unsure I am the best person to do this. |
Yeah this would be good to document in the wiki once we figure it out! |
Struggling with NixOS + wgpu as well. Do you have a good understanding as to why LD_LIBRARY_PATH needs manual intervention? Also, were you able to get a larger |
Can you try forcing X11? There are still plenty of issues with NVIDIA and Wayland, e.g., #4775. |
Tangentially related but on an Intel Integrated GPU on NixOS, my problem was not having I tried each of the files in that folder to find the one I needed |
Description
I tried running a minimal WGPU example, as well as the hello_triangle example under NixOS. both fails.
I have an Nvidia gtx 3050 (driver version 535.113.01) as well as an integrated intel GPU.
I tried on my own NixOS setup, as well as on a NixOS fresh install using the gnome / wayland ISO.
Repro steps
Expected vs observed behavior
Expected was the hello_triangle (or my minimal app setup), observed is the following error
Extra materials
The error is the following :
Platform
I'm running NixOS unstable, but the same have been experienced on NixOS 23.05 wayland / gnome ditribution. This was done with the latest version of wgpu.
The text was updated successfully, but these errors were encountered: