ReGreet shows up with a white screen after booting

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

1 Like

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.)

Probably should post my configuration:

And the nixos system metadata if I need to report to downstream (nixpkgs):

- system: `"x86_64-linux"`
 - host os: `Linux 6.12.32, NixOS, 25.05 (Warbler), 25.05.20250609.88331c1`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Lix, like Nix) 2.93.0
System type: x86_64-linux
Additional system types: i686-linux, x86_64-v1-linux, x86_64-v2-linux
Features: gc, signed-caches
System configuration file: /etc/nix/nix.conf
User configuration files: /home/samgo/.config/nix/nix.conf:/etc/xdg/nix/nix.conf:/home/samgo/.nix-profile/etc/xdg/nix/nix.conf:/nix/profile/etc/xdg/nix/nix.conf:/home/samgo/.local/state/nix/profile/etc/xdg/nix/nix.conf:/etc/profiles/per-user/samgo/etc/xdg/nix/nix.conf:/nix/var/nix/profiles/default/etc/xdg/nix/nix.conf:/run/current-system/sw/etc/xdg/nix/nix.conf
Store directory: /nix/store
State directory: /nix/var/nix
Data directory: /nix/store/7wv7x01fjp05n40yb263wlrm0hvhzbyn-lix-2.93.0/share`
 - nixpkgs: `/nix/store/1148rpggkwng15isy82ikww5kbxk8dl6-source`

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

I think you’ve found the culprit.

I tried gnome-calculator on your suggestion, and got a blank window. No calculator display, controls, etc. Then I tried again with GSK_RENDERER=ngl in the environment (as suggested at GNOME applications are not displayed correctly - #2 by OrsoBruno - Applications - openSUSE Forums) and it worked. So I added to environment.variables and can finally see the regreet UI:

{
  environment = {
    variables = {
      GSK_RENDERER = "ngl";
    };
  };
  # ...
  programs = {
    regreet = {
      enable = true;
    };
  };
  # ...
  services = {
    displayManager = {
      sessionPackages = [ pkgs.sway ];
    };
  };
}

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.

Thanks for hunting this down!

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.