Nixpkgs: NixOS switches to a terminal from X11 on switch

Created on 31 Aug 2016  路  7Comments  路  Source: NixOS/nixpkgs

Issue description

As discussed in mailing list, NixOS sometimes suddenly switches to a text terminal from X11 on switch. When working with multiple monitors, it's more bizzare: one monitor switches and other continues to show X11 but mouse is inaccessible (you can go back to X11 with C-M-F1 C-M-F7). For me, also, after some time if this occured a sudden graceful reboot happens.

Steps to reproduce

  1. You should be in X11;
  2. You should switch from a different enough revision;
  3. Run nixos-rebuild swtich and wait till it comletes;
  4. Observe terminal.

    Technical details

  • Nixpkgs revision: f19c961b4e461da045f2e72e73701059e5117be0

Restarted services:

stopping the following units: acpid.service, alsa-store.service, audit.service, autofs.service, avahi-daemon.service, bumblebeed.service, chronyd.service, colord.service, cups-browsed.service, cups.service, dbus-org.bluez.service, gpm.service, idmapd.service, kmod-static-nodes.service, logmein-hamachi.service, nat.service, network-local-commands.service, network-manager.service, network-setup.service, nix-daemon.service, nix-gc.timer, nscd.service, postgresql.service, rngd.service, rpcbind.service, rtkit-daemon.service, statd.service, systemd-journald.service, systemd-modules-load.service, systemd-sysctl.service, systemd-tmpfiles-clean.timer, systemd-tmpfiles-setup-dev.service, systemd-udev-trigger.service, systemd-udevd.service, thermald.service, tlp.service, upower.service, wpa_supplicant.service
Warning: Stopping nix-daemon.service, but it can still be activated by:
  nix-daemon.socket
Warning: Stopping systemd-journald.service, but it can still be activated by:
  systemd-journald-dev-log.socket
  systemd-journald-audit.socket
  systemd-journald.socket
Warning: Stopping systemd-udevd.service, but it can still be activated by:
  systemd-udevd-kernel.socket
  systemd-udevd-control.socket
NOT restarting the following changed units: display-manager.service, [email protected], systemd-backlight@backlight:intel_backlight.service, systemd-backlight@leds:tpacpi::kbd_backlight.service, systemd-journal-flush.service, systemd-random-seed.service, systemd-remount-fs.service, systemd-tmpfiles-setup.service, systemd-update-utmp.service, systemd-user-sessions.service, [email protected], [email protected]
activating the configuration...
setting up /etc...
restarting systemd...
reloading the following units: dbus.service, dev-hugepages.mount, dev-mqueue.mount, sys-fs-fuse-connections.mount, sys-kernel-debug.mount
restarting the following units: polkit.service, sshd.service, systemd-logind.service
starting the following units: acpid.service, alsa-store.service, audit.service, autofs.service, avahi-daemon.service, bumblebeed.service, chronyd.service, colord.service, cups-browsed.service, cups.service, dbus-org.bluez.service, gpm.service, idmapd.service, kmod-static-nodes.service, logmein-hamachi.service, nat.service, network-local-commands.service, network-manager.service, network-setup.service, nix-daemon.service, nix-gc.timer, nscd.service, postgresql.service, rngd.service, rpcbind.service, rtkit-daemon.service, statd.service, systemd-journald.service, systemd-modules-load.service, systemd-sysctl.service, systemd-tmpfiles-clean.timer, systemd-tmpfiles-setup-dev.service, systemd-udev-trigger.service, systemd-udevd.service, thermald.service, tlp.service, upower.service, wpa_supplicant.service
the following new units were started: NetworkManager-dispatcher.service, systemd-hostnamed.service
bug nixos

Most helpful comment

I have kind of a related issue. When a nixos-rebuild switch upgrades systemd, pressing Alt and cursor keys left or right in X will switch to another tty and also propagate that key event to X.

This could possibly be related to https://github.com/systemd/systemd/issues/3842 as systemctl daemon-reexec is be called to upgrade systemd. The linked Debian bug report has more details on the tty issues that seem to match our symptoms: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=834367

I'll apply the patch and test if that fixes the problem.

All 7 comments

Subscribing here as I reported this issue on the ML and I'm also experiencing this.

I was getting dbus.service reload failure, but it didn't seem to cause any problems.

I have kind of a related issue. When a nixos-rebuild switch upgrades systemd, pressing Alt and cursor keys left or right in X will switch to another tty and also propagate that key event to X.

This could possibly be related to https://github.com/systemd/systemd/issues/3842 as systemctl daemon-reexec is be called to upgrade systemd. The linked Debian bug report has more details on the tty issues that seem to match our symptoms: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=834367

I'll apply the patch and test if that fixes the problem.

for anyone who wants a quick fix, just run (as root)
dumpkeys | sed "s/Incr_Console/Right/g; s/Decr_Console/Left/g" | loadkeys

@taktoa what does this do?

@matthiasbeyer sorry, I should have been more specific in saying that it fixes the issue mentioned above by @fpletz with the alt+cursor keys.

Related to #17560?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

retrry picture retrry  路  3Comments

copumpkin picture copumpkin  路  3Comments

edolstra picture edolstra  路  3Comments

rzetterberg picture rzetterberg  路  3Comments

langston-barrett picture langston-barrett  路  3Comments