diff options
author | Anders Kaseorg <andersk@mit.edu> | 2020-10-15 01:56:59 -0700 |
---|---|---|
committer | Anders Kaseorg <andersk@mit.edu> | 2020-10-15 02:04:00 -0700 |
commit | da5401e02203b83a20d016b5d873c7bf54e7e84b (patch) | |
tree | 7487d28c8e1b77437130ea78dfb344c9556a4190 /nixos/modules/services/x11/display-managers | |
parent | 24c9b05ac53e422f1af81a156f1fd58499eb27fb (diff) | |
download | nixpkgs-da5401e02203b83a20d016b5d873c7bf54e7e84b.tar nixpkgs-da5401e02203b83a20d016b5d873c7bf54e7e84b.tar.gz nixpkgs-da5401e02203b83a20d016b5d873c7bf54e7e84b.tar.bz2 nixpkgs-da5401e02203b83a20d016b5d873c7bf54e7e84b.tar.lz nixpkgs-da5401e02203b83a20d016b5d873c7bf54e7e84b.tar.xz nixpkgs-da5401e02203b83a20d016b5d873c7bf54e7e84b.tar.zst nixpkgs-da5401e02203b83a20d016b5d873c7bf54e7e84b.zip |
nixos/gdm: Conflict plymouth-quit, but more carefully
To avoid extra flickering on boot, we want GDM to tell Plymouth to quit after GDM takes control of the display. That configuration was reverted in #71065 because it caused ‘nixos-rebuild switch’ to bring down the graphical session. The reason was that if multi-user.target wants plymouth-quit.service which conflicts display-manager.service, then when ‘nixos-rebuild switch’ starts multi-user.target, display-manager.service is stopped so plymouth-quit.service can be started. We avoid this problem by removing WantedBy: multi-user.target from plymouth-quit.service. Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Diffstat (limited to 'nixos/modules/services/x11/display-managers')
-rw-r--r-- | nixos/modules/services/x11/display-managers/gdm.nix | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/nixos/modules/services/x11/display-managers/gdm.nix b/nixos/modules/services/x11/display-managers/gdm.nix index eae70a57c78..f53a4a49a06 100644 --- a/nixos/modules/services/x11/display-managers/gdm.nix +++ b/nixos/modules/services/x11/display-managers/gdm.nix @@ -183,14 +183,20 @@ in "systemd-udev-settle.service" ]; systemd.services.display-manager.conflicts = [ - "getty@tty${gdm.initialVT}.service" - # TODO: Add "plymouth-quit.service" so GDM can control when plymouth quits. - # Currently this breaks switching configurations while using plymouth. + "getty@tty${gdm.initialVT}.service" + "plymouth-quit.service" ]; systemd.services.display-manager.onFailure = [ "plymouth-quit.service" ]; + # Prevent nixos-rebuild switch from bringing down the graphical + # session. (If multi-user.target wants plymouth-quit.service which + # conflicts display-manager.service, then when nixos-rebuild + # switch starts multi-user.target, display-manager.service is + # stopped so plymouth-quit.service can be started.) + systemd.services.plymouth-quit.wantedBy = lib.mkForce []; + systemd.services.display-manager.serviceConfig = { # Restart = "always"; - already defined in xserver.nix KillMode = "mixed"; |