Nixpkgs: Switch to another configuration crashes X server

Created on 11 Oct 2019  路  9Comments  路  Source: NixOS/nixpkgs

Describe the bug
I have some child configuration specified in nesting.clone. In the recent nixos-unstable channel, switching to a child using something like /run/current-system/fine-tune/child-1/bin/switch-to-configuration test will crash the xserver. Switching works fine in the nixos-19.09 channel.

To Reproduce
Steps to reproduce the behavior:

  1. Upgrade to recent nixos-unstable channel and build.
  2. Switch to another configuration using switch-to-configuration

Additional context
I'm using gnome3 desktop with gdm.

Metadata

  • system: "x86_64-linux"
  • host os: Linux 5.3.5, NixOS, 20.03pre196201.07d4df59626 (Markhor)
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.3
  • channels(mlatus): "home-manager, nixpkgs-20.03pre196201.07d4df59626, rolling-20.03pre196523.9cf81e9174e"
bug GNOME nixos

All 9 comments

Hopefully fixed by #70357. That have worked for me at least, though no idea why, so would be good to get someone who can verify.

Unfortunately that doesn't work. I tried change to tty7, tty9, tty11, tty17, the issue is not gone. :(

The output of switch-to-configuration dry-activate might be interesting. It's possible that a relevant systemd service is being restarted or even stopped (depending on how much the configurations differ).

it doesn't give me much interesting output:

would restart systemd
would reload the following units: firewall.service

Yeah, I'm able to trigger it with a minimal rebuild (ie. no changes).

from a66adfcc5bf6d12af8ca6d74621dae4dc95e8027 to a66adfcc5bf6d12af8ca6d74621dae4dc95e8027:

  File: master->master
  building Nix...
  building the system configuration...
  trace: warning: The option `services.gnome3.gpaste.enable' defined in `/home/hed/src/nixconfiguration/co
  nfiguration.nix' has been renamed to `programs.gpaste.enable'.
  activating the configuration...
  setting up /etc...
  reloading user units for hed...
  setting up tmpfiles

going from the the proposed fix (https://github.com/hedning/nixpkgs/commit/e84811df74f8f5afc49ca08871838cfb9c5772b8) to a66adfcc5bf6d12af8ca6d74621dae4dc95e8027 doesn't kill the session. Going from a66adfcc5bf6d12af8ca6d74621dae4dc95e8027 to https://github.com/hedning/nixpkgs/commit/e84811df74f8f5afc49ca08871838cfb9c5772b8 also works and results in this log:

  File: master->fix
  building Nix...
  building the system configuration...
  trace: warning: The option `services.gnome3.gpaste.enable' defined in `/home/hed/src/nixconfiguration/co
  nfiguration.nix' has been renamed to `programs.gpaste.enable'.
  stopping the following units: accounts-daemon.service
  NOT restarting the following changed units: display-manager.service, [email protected]
  activating the configuration...
  setting up /etc...
  reloading user units for hed...
  setting up tmpfiles
  reloading the following units: dbus.service
  restarting the following units: polkit.service
  starting the following units: accounts-daemon.service
  the following new units were started: [email protected]

Now just removing [email protected] from gdm's service config seemed to work too, which does indicate that tty1 gets enabled or something.

Though it's pretty weird that @Ninlives can't reproduce :/

OK, hopefully #70357 should fix it. You might need gdm 3.34.1 which is available in the newest nixos-unstable.

OK, looks like there were two issue, if you're using boot splash (plymouth), #71065 should probably fix things.

Hi @hedning , many thanks! It solved my problem(I just disabled the plymouth :P ). I think this issue could be closed now.

That's good to hear :) I'll close when https://github.com/NixOS/nixpkgs/pull/71065 is merged.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

retrry picture retrry  路  3Comments

lverns picture lverns  路  3Comments

ob7 picture ob7  路  3Comments

domenkozar picture domenkozar  路  3Comments

matthiasbeyer picture matthiasbeyer  路  3Comments