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

gdm: remove "getty@tty1.service" conflict definition #30893

Merged
merged 1 commit into from Oct 29, 2017

Conversation

jnugh
Copy link
Contributor

@jnugh jnugh commented Oct 28, 2017

Motivation for this change

Whenever I did a nixos-rebuild (switch/test) my display-manager service restarted. After some changes to gdm.nix I found that this was due to a conflict with getty@tty1.service.
See #21439 for reference.

I just started to use NixOS, so I am not sure if it is a good idea to simply remove such a conflict definition.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-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 nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

- fix restart of display-manager due to a conflict with getty@tty1
- fixes NixOS#21439
@eqyiel
Copy link
Contributor

eqyiel commented Oct 29, 2017

This seems to solve the problem for me!

@@ -125,7 +125,6 @@ in
"getty@tty1.service"
];

systemd.services.display-manager.conflicts = [ "getty@tty1.service" ];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lheckemann @teh what was the motivation for this in the first place?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@teh answered that here: #21439 (comment) (it comes from upstream service file)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But what if @GDM_INITIAL_VT@ is != 1. Would that fix it too?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After re-reading the systemd behaviour of Conflicts IMO what should happen is that tty1 is started, and then replaced by GDM, and if GDM dies (the systemd unit fails) then tty1 should restart. I have a feeling that we're seeing some other interactions here but if removing that line works for people then I'm all for it! (better than a completely broken system, even if we don't necessarily understand why)

@Mic92 Mic92 merged commit 801d38e into NixOS:master Oct 29, 2017
@Mic92
Copy link
Member

Mic92 commented Oct 29, 2017

also backported to 17.09 in a47a5a7

@bjornfor
Copy link
Contributor

How long do we wait before backporting to NixOS 17.09?

Doh, didn't see your message.

Thanks!

@roastiek
Copy link
Contributor

roastiek commented Oct 30, 2017

This breaks booting into GDM again.
Update: only on NVIDIA binary driver, Intel looks OK

@Mic92
Copy link
Member

Mic92 commented Oct 30, 2017

@deedrah hopefully fixed in #31003

@roastiek
Copy link
Contributor

roastiek commented Oct 31, 2017

@Mic92 Negative. You cannot mask "generator" service like that. I think I have finally found nice solution.
The getty@tty1.service is enabled by this line

ln -s ../autovt@tty1.service $out/getty.target.wants/

So making the tty number configurable or maybe the whole line optional will solve this.
I have set it to tty6 and removed everything about getty@tty1.service in configuration (so no conflicts) and it works for me (both boot and switch/test).

Correction: getty@tty1.service really get masked but somehow getty@tty2.service is started by nixos-rebuild switch instead. And that kills xserver with gdm, but only on first time.
Starting getty@tty2.service from cli has the same behavior. So you need start at least one getty before xserver to avoid problems with NVIDIA drivers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants