tpwrules / nixos-apple-silicon

Resources to install NixOS bare metal on Apple Silicon Macs
MIT License
757 stars 76 forks source link

Gpu not working on Wayland + Sway + NixOS #44

Closed shaunsingh closed 1 year ago

shaunsingh commented 1 year ago

Hello! thank you for the amazing project

I've been trying to get Asahi working with nix on my M1 machine, everything boots and runs just fine but graphical acceleration doesn't seem to be working

I've added nixos-m1 as a flake input https://github.com/shaunsingh/nix-darwin-dotfiles/blob/2c6eb06679dfbbe87d96f11f7546c2c42923df8a/flake.nix#L19-L22

and I import it from the flake here, as well as enable GPU support and the edge kernel https://github.com/shaunsingh/nix-darwin-dotfiles/blob/2c6eb06679dfbbe87d96f11f7546c2c42923df8a/modules/linux.nix#L9-L17

However, when I launch any application (Firefox, etc.) it gives a message that no GPU was found, and glxinfo fails to run as well. Any ideas?

Sway is built from source from git, and the firmware is from today itself

Link to full dotfiles: https://github.com/shaunsingh/nix-darwin-dotfiles/blob/main/flake.nix

luxus commented 1 year ago

you should try hyprland instead of sway @shaunsingh, its much better by now. btw.. you are everywhere :D But I didn't tried it on m1 yet. https://github.com/luxus/nix-config/blob/new/home/luxus/features/desktop/hyprland/default.nix

shaunsingh commented 1 year ago

Hyperland requires openGL 3 for graphics acceleration sadly, the Asahi driver only supports 2.1 so far