<1b684d5e5ea9343d7c4d2c8f4f227cb4@disroot.org>
I'm using greetd 0.10.3 on nixos-unstable. For a few weeks, my wayland window managers crash when i run them like this (NixOS [1]): services.greetd = { enable = true; settings = { initial_session = { # command = "${pkgs.bashInteractive}/bin/bash -c 'sleep 3 && hyprland'"; command = "${pkgs.hyprland}/bin/hyprland"; user = "sperber"; }; default_session = { command = ''${pkgs.greetd.tuigreet}/bin/tuigreet --user-menu''; }; }; }; The hyprland log [2] mentions that no GPU is available during the initial launch. With the configuration above, tuigreet comes up as a fallback and it works from then on. The same happens with niri window manager. I figured out that it works if i delay the launch of hyprland/niri by about 3 seconds (the commented out line in my config). I found this thread [3] about making lightdm wait for the GPU but didn't find a similar option for agreety. Can i make agreety wait for the GPU to be available? [1] https://discourse.nixos.org/t/greetd-agreety-seems-to-launch-before-igpu-is-ready/52118 [2] https://github.com/hyprwm/Hyprland/issues/7547 [3] https://discourse.nixos.org/t/x-attempts-to-start-before-graphics-are-detected/20470/2
<86969526-76d5-4317-9a84-9d6df7da6beb@kl.wtf>
<1b684d5e5ea9343d7c4d2c8f4f227cb4@disroot.org>
(view parent)
Your configuration is not using agreety, it's using greetd and tuigreet. Neither of these know about displa ydevices. However, you can use a udev rule and a service dependency to make the greetd service itself wait for a particular device to start. The udev rule would look something like this: ACTION=="add", SUBSYSTEM=="drm", KERNEL=="card2", TAG+="systemd" The greetd service dependency looks like this: After=systemd-user-sessions.service plymouth-quit-wait.service dev-dri-card2.device This will have to match the display device you're waiting for, which depends on your system - you're often not waiting for *any* display device, as SimpleDRM is likely already available, but rather a specific one. Alternatively, a hyprland wrapper script or hyprland itself can wait for a suitable GPU.