bevyengine / bevyengine/bevy

Unable to run on Wayland with NixOS!

Open
#9,203 5 comments 0 reactions 0 assignees View on GitHub
C-Bug I-Crash O-Linux
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 16h
Merged PRs (30d)
171

Description

## Bevy version

0.11

## \[Optional\] Relevant system information

If you cannot get Bevy to build or run on your machine, please include:

- cargo 1.70.0
- NixOS + Hyprland

You should also consider testing the examples of our upstream dependencies to help isolate any setup-specific issue:

- [`wgpu`](https://github.com/gfx-rs/wgpu) for rendering problems
- [`winit`](https://github.com/rust-windowing/winit) for input and window management
- [`gilrs`](https://docs.rs/gilrs/latest/gilrs/) for gamepad inputs

## What you did

I tried running Bevy on Wayland on NixOS, but it crashes!

```
thread 'main' panicked at 'Failed to initialize any backend! Wayland status: "backend disabled" X11 status: LibraryOpenError(OpenError { kind: Library, detail: "opening library failed (libXcursor.so.1: cannot open shared object file: No such file or directory); opening library failed (libXcursor.so: cannot open shared object file: No such file or directory)" })', /home/jackson/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.28.6/src/platform_impl/linux/mod.rs:757:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
```

It works on every other distro, and I did make sure to install all the needed dependencies!

## Additional information

I have a shell.nix file in my project that contains this:
```
{ pkgs ? import {} }:

pkgs.mkShell {
buildInputs = [
pkgs.alsaLib
pkgs.udev
pkgs.pkgconfig
pkgs.rustc
pkgs.cargo
pkgs.xorg.libX11
pkgs.xorg.libXcursor
];
}
```

Contributor guide

Open the contributing guide

Research direction

Start with the reported Bevy 0.11 setup and shell.nix, then run the upstream wgpu and winit examples to determine whether the failure is specific to Bevy or the NixOS Wayland environment. Done means identifying the failing dependency or integration and confirming that Bevy launches successfully on Wayland, or documenting the required setup if the issue is environmental.

Written by the indexing model from the issue text.

Assessment

Tech stack
nixos, rust
Domain
game-dev, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.