Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nixos/gdm: don't conflict with plymouth-quit #71065

Merged
merged 1 commit into from
Oct 13, 2019

Conversation

worldofpeace
Copy link
Contributor

Motivation for this change

This also causes a crash like in #70357.

See #70357 (comment).

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
Notify maintainers

cc @

Sorry, something went wrong.

@ofborg ofborg bot added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux labels Oct 13, 2019
Co-Authored-By: Tor Hedin Brønner <torhedinbronner@gmail.com>
@worldofpeace worldofpeace force-pushed the gdm-no-plymouth-conflict branch from 5c20953 to ed20a54 Compare October 13, 2019 17:31
@worldofpeace worldofpeace merged commit 6d5fe6b into NixOS:master Oct 13, 2019
@worldofpeace worldofpeace deleted the gdm-no-plymouth-conflict branch October 13, 2019 17:34
@worldofpeace worldofpeace mentioned this pull request Feb 29, 2020
9 tasks
@andersk
Copy link
Contributor

andersk commented Sep 28, 2020

I tried to figure out what was really going on here:

switch-to-configuration tries to start all active targets with a command like systemctl start -- basic.target bluetooth.target cryptsetup.target getty.target graphical.target local-fs.target machines.target multi-user.target network-interfaces.target network-online.target paths.target remote-fs.target slices.target sockets.target sound.target swap.target sysinit.target timers.target virt-guest-shutdown.target.

Because multi-user.target wants plymouth-quit.service, and display-manager.service conflicts plymouth-quit.service, this results in display-manager.service being stopped so plymouth-quit.service can start. This happens even though graphical.target wants display-manager.service.

The same catastrophe can be reproduced on Fedora: systemctl start graphical.target multi-user.target destroys the graphical session. This questionable behavior was noted in a comment on RHBZ #708537, with no apparent resolution.

This feels like a systemd bug. But I also wonder if switch-to-configuration really wants to be trying to start so many targets in the first place?

One workaround would be for nixos/gdm to remove plymouth-quit.service from multi-user.target (systemd.services.plymouth-quit.wantedBy = lib.mkForce []).

andersk added a commit to andersk/nixpkgs that referenced this pull request Oct 15, 2020
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 NixOS#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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants