Hi, I have setup NixOS with sway and now trying to setup greetd and ReGreet as a login manager for sway. But when greetd launches ReGreet using sway and the minimal configuration that NixOS provides, it displays a white screen with a cursor and invisible boxes.
Looking at the logs, ReGreet failed to initialize GTK:
2025-06-10T12:58:46.661890742-04:00 ERROR regreet: panicked at /build/regreet-0.2.0-vendor/relm4-0.9.1/src/lib.rs:117:17:
called `Result::unwrap()` on an `Err` value: BoolError { message: "Failed to initialize GTK", filename: "/build/regreet-0.2.0-vendor/gtk4-0.9.5/src/rt.rs", function: "gtk4::rt::init", line: 159 }
However when using gtkgreet with sway, it works just fine completely.
I tried to use solutions from this post but it does not work, so does anybody else encountering this problem
Yes, I see the same thing on the nixos-25.05 branch since about a week and a half ago. I also tried nixos-unstable and still seeing the same thing. I switched to gtkgreet in the meantime, but here’s my configuration with regreet in case anything jumps out to anyone: configuration.nix · GitHub (fwiw, this is on a Thinkpad T540p, with an Intel Haswell CPU and corresponding integrated graphics.)
i dont know about sway but my regreet works on niri
try adding below value in your minimal config as environment GTK_USE_PORTAL "0" and GDK_DEBUG "no-portals"
I have done some testing with what GTK applications does not load correctly and found out that GTK 3 applications does work (gnome-tetravex, gnome-disks) but GTK 4 does not (nautilus, gnome-calculator)
So its most likely GTK 4 being the culprit
This did not work for GTK 4 applications, so it likely does not work for regreet
Hey, can you run a GTK 4 application, I’m running NixOS on a system with an Ivy Bridge which is one generation behind your CPU and would like to check if GTK 4 does not work on your machine
Works for me. I suppose I could just have GSK_RENDERER set in the greeter user’s config, but if anything linked to GTK4 is going to have this problem, might as well apply the fix globally. I haven’t run into any other things I use with this issue, but it’s probably just a matter of time.
Looks like it’s a regression in Mesa because OpenSUSE is a rolling distribution and this does not happen in Fedora 42 with its live cd. Haven’t checked Arch tho.