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-rebuild switch/test issue with GNOME #21439

Closed
bjornfor opened this issue Dec 27, 2016 · 34 comments
Closed

nixos-rebuild switch/test issue with GNOME #21439

bjornfor opened this issue Dec 27, 2016 · 34 comments
Labels
0.kind: bug 6.topic: GNOME GNOME desktop environment and its underlying platform 6.topic: nixos

Comments

@bjornfor
Copy link
Contributor

Issue description

A couple of times now I've been "locked out" of the GNOME desktop after having run "nixos-rebuild switch/test" on nixpkgs master branch. What happens is the graphical session disappears (black screen) and I can only access virtual terminals on Ctrl-Alt+F2..F6.

When this happens, I see this in the journal:

...
org.gnome.Shell.desktop[3217]: Window manager warning: Failed to set power save mode for output HDMI-2: Permission denied
org.gnome.Shell.desktop[3217]: Window manager warning: Failed to set power save mode for output HDMI-2: Permission denied
.gnome-shell-wr[3217]: Failed to set CRTC mode 1680x1050: Permission denied

Steps to reproduce

Doing "nixos-rebuild switch/test" on a NixOS unstable system with GNOME, where the currently running configuration is old/different enough (compared to new) to affect the desktop session. (As far as I can tell.)

Technical details

  • System: NixOS unstable
  • Nix version: 1.11.4
@bjornfor bjornfor added 0.kind: bug 6.topic: GNOME GNOME desktop environment and its underlying platform 6.topic: nixos labels Dec 27, 2016
@vcunat
Copy link
Member

vcunat commented Dec 27, 2016

I suspect restarting some of the services is a problem for gnome. Xfce once had this problem with dbus (the desktop just restarted).

@bjornfor
Copy link
Contributor Author

This seems fixed now.

@bjornfor bjornfor reopened this Feb 27, 2017
@bjornfor
Copy link
Contributor Author

It happens again now on recent master.

@bjornfor
Copy link
Contributor Author

Well, I don't see that error message in the journal. But "nixos-rebuild switch" on recent master kills the desktop. Some of the "switch'es" cause a restart of display-manager (so I can login immediately) while others have left me at the console and had to "sudo systemctl stop + start display-manager" to get it back.

@cyraxjoe
Copy link
Contributor

Can confirm I'm experiencing this issue with gnome3/nixos 17.03. It happens with both options, test and switch.

@ixxie
Copy link
Contributor

ixxie commented Sep 8, 2017

I have been experiencing this issue for months now in 17.03; didn't know I could access the virtual terminals, I once accidentally hard-reset the machine due to the issue and corrupted my boot partition.

Here are some logs from my latest crash.

@eqyiel
Copy link
Contributor

eqyiel commented Sep 9, 2017

I think this is related to #28053 (comment)

@eqyiel
Copy link
Contributor

eqyiel commented Sep 9, 2017

A workaround is to use nixos-rebuild boot, unless you're prepared to be booted out of your graphical session.

@eqyiel
Copy link
Contributor

eqyiel commented Oct 15, 2017

@teh are you still experiencing GDM changing every time you rebuild?

@teh
Copy link
Contributor

teh commented Oct 15, 2017

@eqyiel I use boot ATM. We did narrow this down to systemd-logind restarting, and in current master we have

    systemd.services.systemd-logind.restartIfChanged = false;
    systemd.services.systemd-logind.stopIfChanged = false;

If you are still experiencing this it's probably a new problem. Can you find anything in the logs that would point to the reason for restarting?

@ixxie
Copy link
Contributor

ixxie commented Oct 17, 2017

@teh which master are you referring too?

@eqyiel
Copy link
Contributor

eqyiel commented Oct 17, 2017

@ixxie I think it's this commit: 23f3980

@ylwghst
Copy link
Contributor

ylwghst commented Oct 18, 2017

I experience this on my machine too.

Gnome desktop alwayes crashes and gets stuck on blank screen with flashing "_" after I ran nixos-rebuild switch within gnome environment.

I'm currently on: 17.09.1756.c99239bca0 (Hummingbird)

@vcunat
Copy link
Member

vcunat commented Oct 18, 2017

That's strange. The fix was picked to 17.09 as 24f0aec, a few weeks before your version.

@ylwghst
Copy link
Contributor

ylwghst commented Oct 18, 2017

The problem still persist.

X11 breaks while systemd is going to be restarted.

I can't even change tty after x11 breaks. I only can leave the blank screen by shutting down the machine.

There was someone on #nixos irc encoutering this still too.

@eqyiel
Copy link
Contributor

eqyiel commented Oct 18, 2017

@teh there's a bunch of stuff in the logs that looks suspicious:

eqyiel@ayanami ~ % journalctl -b -2 | grep -C 10 "Stopped target Current graphical user session."
Oct 16 12:39:32 ayanami.maher.fyi rtkit-daemon[1204]: Successfully made thread 24068 of process 24068 (/nix/store/62yaisnk2a7di012sv01gvgbvrcy4m28-pulseaudio-11.0/bin/pulseaudio) owned by '1000' high priority at nice level -11.
Oct 16 12:39:32 ayanami.maher.fyi rtkit-daemon[1204]: Supervising 4 threads of 2 processes of 1 users.
Oct 16 12:39:32 ayanami.maher.fyi pulseaudio[24068]: Daemon already running.
Oct 16 12:39:32 ayanami.maher.fyi xsession[24054]: 31
Oct 16 12:39:32 ayanami.maher.fyi xsession[24054]: Warning: graphical-session.target changed on disk. Run 'systemctl --user daemon-reload' to reload units.
Oct 16 12:39:32 ayanami.maher.fyi xsession[24054]: /nix/store/6nc3q6ghipnc8w9irn7zkcw5f84zc8wx-xsession: Window manager 'gnome3' not found.
Oct 16 12:39:33 ayanami.maher.fyi gnome-session[24078]: gnome-session-binary[24078]: WARNING: Could not parse desktop file devilspie.desktop or it references a not found TryExec binary
Oct 16 12:39:33 ayanami.maher.fyi gnome-session[24078]: gnome-session-binary[24078]: WARNING: Could not parse desktop file slack.desktop or it references a not found TryExec binary
Oct 16 12:39:33 ayanami.maher.fyi gnome-session[24078]: gnome-session-binary[24078]: CRITICAL: gsm_manager_set_phase: assertion 'GSM_IS_MANAGER (manager)' failed
Oct 16 12:39:33 ayanami.maher.fyi gnome-session-binary[24078]: CRITICAL: gsm_manager_set_phase: assertion 'GSM_IS_MANAGER (manager)' failed
Oct 16 12:39:33 ayanami.maher.fyi systemd[1141]: Stopped target Current graphical user session.
Oct 16 12:39:33 ayanami.maher.fyi pulseaudio[1211]: XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server ":1"
Oct 16 12:39:33 ayanami.maher.fyi pulseaudio[1211]:       after 12 requests (6 known processed) with 0 events remaining.
Oct 16 12:39:33 ayanami.maher.fyi systemd[1141]: pulseaudio.service: Main process exited, code=exited, status=1/FAILURE
Oct 16 12:39:33 ayanami.maher.fyi systemd[1141]: pulseaudio.service: Unit entered failed state.
Oct 16 12:39:33 ayanami.maher.fyi bluetoothd[820]: Endpoint unregistered: sender=:1.29 path=/MediaEndpoint/A2DPSource
Oct 16 12:39:33 ayanami.maher.fyi bluetoothd[820]: Endpoint unregistered: sender=:1.29 path=/MediaEndpoint/A2DPSink
Oct 16 12:39:33 ayanami.maher.fyi gdm-autologin][24041]: pam_unix(gdm-autologin:session): session closed for user eqyiel
Oct 16 12:39:33 ayanami.maher.fyi gdm[24009]: GdmDisplay: display lasted 1.339851 seconds
Oct 16 12:39:33 ayanami.maher.fyi systemd-logind[958]: Removed session 5.
Oct 16 12:39:33 ayanami.maher.fyi systemd[1]: Created slice User Slice of gdm.
--
Oct 16 12:58:09 ayanami.maher.fyi rtkit-daemon[1204]: Successfully made thread 24656 of process 24656 (/nix/store/62yaisnk2a7di012sv01gvgbvrcy4m28-pulseaudio-11.0/bin/pulseaudio) owned by '1000' high priority at nice level -11.
Oct 16 12:58:09 ayanami.maher.fyi rtkit-daemon[1204]: Supervising 4 threads of 2 processes of 1 users.
Oct 16 12:58:09 ayanami.maher.fyi pulseaudio[24656]: Daemon already running.
Oct 16 12:58:09 ayanami.maher.fyi xsession[24642]: 27
Oct 16 12:58:09 ayanami.maher.fyi systemd[1141]: Reached target Current graphical user session.
Oct 16 12:58:09 ayanami.maher.fyi xsession[24642]: /nix/store/6nc3q6ghipnc8w9irn7zkcw5f84zc8wx-xsession: Window manager 'gnome3' not found.
Oct 16 12:58:10 ayanami.maher.fyi gnome-session[24666]: gnome-session-binary[24666]: WARNING: Could not parse desktop file devilspie.desktop or it references a not found TryExec binary
Oct 16 12:58:10 ayanami.maher.fyi gnome-session[24666]: gnome-session-binary[24666]: WARNING: Could not parse desktop file slack.desktop or it references a not found TryExec binary
Oct 16 12:58:10 ayanami.maher.fyi gnome-session[24666]: gnome-session-binary[24666]: CRITICAL: gsm_manager_set_phase: assertion 'GSM_IS_MANAGER (manager)' failed
Oct 16 12:58:10 ayanami.maher.fyi gnome-session-binary[24666]: CRITICAL: gsm_manager_set_phase: assertion 'GSM_IS_MANAGER (manager)' failed
Oct 16 12:58:10 ayanami.maher.fyi systemd[1141]: Stopped target Current graphical user session.
Oct 16 12:58:10 ayanami.maher.fyi pulseaudio[24104]: XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server ":2"
Oct 16 12:58:10 ayanami.maher.fyi pulseaudio[24104]:       after 14 requests (6 known processed) with 0 events remaining.
Oct 16 12:58:10 ayanami.maher.fyi systemd[1141]: pulseaudio.service: Main process exited, code=exited, status=1/FAILURE
Oct 16 12:58:10 ayanami.maher.fyi bluetoothd[820]: Endpoint unregistered: sender=:1.129 path=/MediaEndpoint/A2DPSource
Oct 16 12:58:10 ayanami.maher.fyi bluetoothd[820]: Endpoint unregistered: sender=:1.129 path=/MediaEndpoint/A2DPSink
Oct 16 12:58:10 ayanami.maher.fyi systemd[1141]: pulseaudio.service: Unit entered failed state.
Oct 16 12:58:10 ayanami.maher.fyi gdm-password][24621]: pam_unix(gdm-password:session): session closed for user eqyiel
Oct 16 12:58:10 ayanami.maher.fyi gdm[24009]: GdmDisplay: display lasted 1.411901 seconds
Oct 16 12:58:10 ayanami.maher.fyi /nix/store/3aaalwlzws7nsikvx0vgzdm7zvrsayr1-gdm-3.24.2/libexec/gdm-x-session[24101]: (II) systemd-logind: got resume for 13:67
Oct 16 12:58:10 ayanami.maher.fyi /nix/store/3aaalwlzws7nsikvx0vgzdm7zvrsayr1-gdm-3.24.2/libexec/gdm-x-session[24101]: (II) systemd-logind: got resume for 13:64
--
Oct 16 12:58:19 ayanami.maher.fyi pulseaudio[24727]: Daemon already running.
Oct 16 12:58:19 ayanami.maher.fyi xsession[24713]: 27
Oct 16 12:58:19 ayanami.maher.fyi systemd[1141]: Reached target Current graphical user session.
Oct 16 12:58:19 ayanami.maher.fyi xsession[24713]: /nix/store/6nc3q6ghipnc8w9irn7zkcw5f84zc8wx-xsession: Window manager 'gnome3' not found.
Oct 16 12:58:19 ayanami.maher.fyi gnome-session[24737]: gnome-session-binary[24737]: WARNING: Could not parse desktop file devilspie.desktop or it references a not found TryExec binary
Oct 16 12:58:19 ayanami.maher.fyi gnome-session-binary[24737]: WARNING: Could not parse desktop file devilspie.desktop or it references a not found TryExec binary
Oct 16 12:58:19 ayanami.maher.fyi gnome-session[24737]: gnome-session-binary[24737]: WARNING: Could not parse desktop file slack.desktop or it references a not found TryExec binary
Oct 16 12:58:19 ayanami.maher.fyi gnome-session-binary[24737]: WARNING: Could not parse desktop file slack.desktop or it references a not found TryExec binary
Oct 16 12:58:19 ayanami.maher.fyi gnome-session[24737]: gnome-session-binary[24737]: CRITICAL: gsm_manager_set_phase: assertion 'GSM_IS_MANAGER (manager)' failed
Oct 16 12:58:19 ayanami.maher.fyi gnome-session-binary[24737]: CRITICAL: gsm_manager_set_phase: assertion 'GSM_IS_MANAGER (manager)' failed
Oct 16 12:58:19 ayanami.maher.fyi systemd[1141]: Stopped target Current graphical user session.
Oct 16 12:58:19 ayanami.maher.fyi pulseaudio[24686]: XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server ":2"
Oct 16 12:58:19 ayanami.maher.fyi pulseaudio[24686]:       after 14 requests (6 known processed) with 0 events remaining.
Oct 16 12:58:19 ayanami.maher.fyi /nix/store/3aaalwlzws7nsikvx0vgzdm7zvrsayr1-gdm-3.24.2/libexec/gdm-x-session[24704]: (**) Option "fd" "28"
Oct 16 12:58:19 ayanami.maher.fyi /nix/store/3aaalwlzws7nsikvx0vgzdm7zvrsayr1-gdm-3.24.2/libexec/gdm-x-session[24704]: (II) event15 - (II) SynPS/2 Synaptics TouchPad: (II) device removed
Oct 16 12:58:19 ayanami.maher.fyi systemd[1141]: pulseaudio.service: Main process exited, code=exited, status=1/FAILURE
Oct 16 12:58:19 ayanami.maher.fyi systemd[1141]: pulseaudio.service: Unit entered failed state.
Oct 16 12:58:19 ayanami.maher.fyi bluetoothd[820]: Endpoint unregistered: sender=:1.175 path=/MediaEndpoint/A2DPSource
Oct 16 12:58:19 ayanami.maher.fyi systemd[1141]: pulseaudio.service: Failed with result 'exit-code'.
Oct 16 12:58:19 ayanami.maher.fyi bluetoothd[820]: Endpoint unregistered: sender=:1.175 path=/MediaEndpoint/A2DPSink
Oct 16 12:58:19 ayanami.maher.fyi /nix/store/3aaalwlzws7nsikvx0vgzdm7zvrsayr1-gdm-3.24.2/libexec/gdm-x-session[24704]: (II) evdev: ThinkPad Extra Buttons: Close
--
Oct 16 12:59:49 ayanami.maher.fyi rtkit-daemon[1204]: Successfully made thread 24859 of process 24859 (/nix/store/62yaisnk2a7di012sv01gvgbvrcy4m28-pulseaudio-11.0/bin/pulseaudio) owned by '1000' high priority at nice level -11.
Oct 16 12:59:49 ayanami.maher.fyi rtkit-daemon[1204]: Supervising 4 threads of 2 processes of 1 users.
Oct 16 12:59:49 ayanami.maher.fyi pulseaudio[24859]: Daemon already running.
Oct 16 12:59:49 ayanami.maher.fyi xsession[24845]: 27
Oct 16 12:59:49 ayanami.maher.fyi systemd[1141]: Reached target Current graphical user session.
Oct 16 12:59:49 ayanami.maher.fyi xsession[24845]: /nix/store/6nc3q6ghipnc8w9irn7zkcw5f84zc8wx-xsession: Window manager 'gnome3' not found.
Oct 16 12:59:49 ayanami.maher.fyi gnome-session[24869]: gnome-session-binary[24869]: WARNING: Could not parse desktop file devilspie.desktop or it references a not found TryExec binary
Oct 16 12:59:49 ayanami.maher.fyi gnome-session[24869]: gnome-session-binary[24869]: WARNING: Could not parse desktop file slack.desktop or it references a not found TryExec binary
Oct 16 12:59:49 ayanami.maher.fyi gnome-session[24869]: gnome-session-binary[24869]: CRITICAL: gsm_manager_set_phase: assertion 'GSM_IS_MANAGER (manager)' failed
Oct 16 12:59:49 ayanami.maher.fyi gnome-session-binary[24869]: CRITICAL: gsm_manager_set_phase: assertion 'GSM_IS_MANAGER (manager)' failed
Oct 16 12:59:49 ayanami.maher.fyi systemd[1141]: Stopped target Current graphical user session.
Oct 16 12:59:49 ayanami.maher.fyi pulseaudio[24756]: XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server ":2"
Oct 16 12:59:49 ayanami.maher.fyi pulseaudio[24756]:       after 14 requests (6 known processed) with 0 events remaining.
Oct 16 12:59:49 ayanami.maher.fyi systemd[1141]: pulseaudio.service: Main process exited, code=exited, status=1/FAILURE
Oct 16 12:59:49 ayanami.maher.fyi systemd[1141]: pulseaudio.service: Unit entered failed state.
Oct 16 12:59:49 ayanami.maher.fyi bluetoothd[820]: Endpoint unregistered: sender=:1.186 path=/MediaEndpoint/A2DPSource
Oct 16 12:59:49 ayanami.maher.fyi bluetoothd[820]: Endpoint unregistered: sender=:1.186 path=/MediaEndpoint/A2DPSink
Oct 16 12:59:50 ayanami.maher.fyi gdm-password][24828]: pam_unix(gdm-password:session): session closed for user eqyiel
Oct 16 12:59:50 ayanami.maher.fyi gdm[24009]: GdmDisplay: display lasted 1.467381 seconds
Oct 16 12:59:50 ayanami.maher.fyi /nix/store/3aaalwlzws7nsikvx0vgzdm7zvrsayr1-gdm-3.24.2/libexec/gdm-x-session[24101]: (II) systemd-logind: got resume for 13:67
Oct 16 12:59:50 ayanami.maher.fyi /nix/store/3aaalwlzws7nsikvx0vgzdm7zvrsayr1-gdm-3.24.2/libexec/gdm-x-session[24101]: (II) systemd-logind: got resume for 13:64
--
Oct 16 13:02:32 ayanami.maher.fyi rtkit-daemon[1204]: Successfully made thread 25216 of process 25216 (/nix/store/62yaisnk2a7di012sv01gvgbvrcy4m28-pulseaudio-11.0/bin/pulseaudio) owned by '1000' high priority at nice level -11.
Oct 16 13:02:32 ayanami.maher.fyi rtkit-daemon[1204]: Supervising 4 threads of 2 processes of 1 users.
Oct 16 13:02:32 ayanami.maher.fyi pulseaudio[25216]: Daemon already running.
Oct 16 13:02:32 ayanami.maher.fyi xsession[25202]: 27
Oct 16 13:02:32 ayanami.maher.fyi systemd[1141]: Reached target Current graphical user session.
Oct 16 13:02:32 ayanami.maher.fyi xsession[25202]: /nix/store/6nc3q6ghipnc8w9irn7zkcw5f84zc8wx-xsession: Window manager 'gnome3' not found.
Oct 16 13:02:32 ayanami.maher.fyi gnome-session[25226]: gnome-session-binary[25226]: WARNING: Could not parse desktop file devilspie.desktop or it references a not found TryExec binary
Oct 16 13:02:32 ayanami.maher.fyi gnome-session[25226]: gnome-session-binary[25226]: WARNING: Could not parse desktop file slack.desktop or it references a not found TryExec binary
Oct 16 13:02:32 ayanami.maher.fyi gnome-session[25226]: gnome-session-binary[25226]: CRITICAL: gsm_manager_set_phase: assertion 'GSM_IS_MANAGER (manager)' failed
Oct 16 13:02:32 ayanami.maher.fyi gnome-session-binary[25226]: CRITICAL: gsm_manager_set_phase: assertion 'GSM_IS_MANAGER (manager)' failed
Oct 16 13:02:32 ayanami.maher.fyi systemd[1141]: Stopped target Current graphical user session.
Oct 16 13:02:32 ayanami.maher.fyi pulseaudio[25138]: XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server ":2"
Oct 16 13:02:32 ayanami.maher.fyi pulseaudio[25138]:       after 14 requests (6 known processed) with 0 events remaining.
Oct 16 13:02:32 ayanami.maher.fyi bluetoothd[820]: Endpoint unregistered: sender=:1.231 path=/MediaEndpoint/A2DPSource
Oct 16 13:02:32 ayanami.maher.fyi bluetoothd[820]: Endpoint unregistered: sender=:1.231 path=/MediaEndpoint/A2DPSink
Oct 16 13:02:32 ayanami.maher.fyi systemd[1141]: pulseaudio.service: Main process exited, code=exited, status=1/FAILURE
Oct 16 13:02:32 ayanami.maher.fyi systemd[1141]: pulseaudio.service: Unit entered failed state.
Oct 16 13:02:33 ayanami.maher.fyi gdm-password][25182]: pam_unix(gdm-password:session): session closed for user eqyiel
Oct 16 13:02:33 ayanami.maher.fyi gdm[24009]: GdmDisplay: display lasted 1.228368 seconds
Oct 16 13:02:33 ayanami.maher.fyi /nix/store/3aaalwlzws7nsikvx0vgzdm7zvrsayr1-gdm-3.24.2/libexec/gdm-x-session[24101]: (II) systemd-logind: got resume for 13:67
Oct 16 13:02:33 ayanami.maher.fyi /nix/store/3aaalwlzws7nsikvx0vgzdm7zvrsayr1-gdm-3.24.2/libexec/gdm-x-session[24101]: (II) systemd-logind: got resume for 13:64
--
Oct 16 13:18:28 ayanami.maher.fyi rtkit-daemon[1204]: Successfully made thread 25798 of process 25798 (/nix/store/62yaisnk2a7di012sv01gvgbvrcy4m28-pulseaudio-11.0/bin/pulseaudio) owned by '1000' high priority at nice level -11.
Oct 16 13:18:28 ayanami.maher.fyi rtkit-daemon[1204]: Supervising 4 threads of 2 processes of 1 users.
Oct 16 13:18:28 ayanami.maher.fyi pulseaudio[25798]: Daemon already running.
Oct 16 13:18:28 ayanami.maher.fyi xsession[25784]: 27
Oct 16 13:18:28 ayanami.maher.fyi systemd[1141]: Reached target Current graphical user session.
Oct 16 13:18:28 ayanami.maher.fyi xsession[25784]: /nix/store/6nc3q6ghipnc8w9irn7zkcw5f84zc8wx-xsession: Window manager 'gnome3' not found.
Oct 16 13:18:29 ayanami.maher.fyi gnome-session[25808]: gnome-session-binary[25808]: WARNING: Could not parse desktop file devilspie.desktop or it references a not found TryExec binary
Oct 16 13:18:29 ayanami.maher.fyi gnome-session[25808]: gnome-session-binary[25808]: WARNING: Could not parse desktop file slack.desktop or it references a not found TryExec binary
Oct 16 13:18:29 ayanami.maher.fyi gnome-session[25808]: gnome-session-binary[25808]: CRITICAL: gsm_manager_set_phase: assertion 'GSM_IS_MANAGER (manager)' failed
Oct 16 13:18:29 ayanami.maher.fyi gnome-session-binary[25808]: CRITICAL: gsm_manager_set_phase: assertion 'GSM_IS_MANAGER (manager)' failed
Oct 16 13:18:29 ayanami.maher.fyi systemd[1141]: Stopped target Current graphical user session.
Oct 16 13:18:29 ayanami.maher.fyi pulseaudio[25254]: XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server ":1"
Oct 16 13:18:29 ayanami.maher.fyi pulseaudio[25254]:       after 14 requests (6 known processed) with 0 events remaining.
Oct 16 13:18:29 ayanami.maher.fyi bluetoothd[820]: Endpoint unregistered: sender=:1.253 path=/MediaEndpoint/A2DPSource
Oct 16 13:18:29 ayanami.maher.fyi bluetoothd[820]: Endpoint unregistered: sender=:1.253 path=/MediaEndpoint/A2DPSink
Oct 16 13:18:29 ayanami.maher.fyi systemd[1141]: pulseaudio.service: Main process exited, code=exited, status=1/FAILURE
Oct 16 13:18:29 ayanami.maher.fyi systemd[1141]: pulseaudio.service: Unit entered failed state.
Oct 16 13:18:29 ayanami.maher.fyi gdm-autologin][25768]: pam_unix(gdm-autologin:session): session closed for user eqyiel
Oct 16 13:18:29 ayanami.maher.fyi gdm[25739]: GdmDisplay: display lasted 1.086666 seconds
Oct 16 13:18:29 ayanami.maher.fyi systemd-logind[958]: Removed session 12.
Oct 16 13:18:29 ayanami.maher.fyi systemd[1]: Created slice User Slice of gdm.
--
Oct 16 13:18:41 ayanami.maher.fyi rtkit-daemon[1204]: Successfully made thread 26036 of process 26036 (/nix/store/62yaisnk2a7di012sv01gvgbvrcy4m28-pulseaudio-11.0/bin/pulseaudio) owned by '1000' high priority at nice level -11.
Oct 16 13:18:41 ayanami.maher.fyi rtkit-daemon[1204]: Supervising 4 threads of 2 processes of 2 users.
Oct 16 13:18:41 ayanami.maher.fyi pulseaudio[26036]: Daemon already running.
Oct 16 13:18:41 ayanami.maher.fyi xsession[26022]: 27
Oct 16 13:18:41 ayanami.maher.fyi systemd[1141]: Reached target Current graphical user session.
Oct 16 13:18:41 ayanami.maher.fyi xsession[26022]: /nix/store/6nc3q6ghipnc8w9irn7zkcw5f84zc8wx-xsession: Window manager 'gnome3' not found.
Oct 16 13:18:42 ayanami.maher.fyi gnome-session[26046]: gnome-session-binary[26046]: WARNING: Could not parse desktop file devilspie.desktop or it references a not found TryExec binary
Oct 16 13:18:42 ayanami.maher.fyi gnome-session[26046]: gnome-session-binary[26046]: WARNING: Could not parse desktop file slack.desktop or it references a not found TryExec binary
Oct 16 13:18:42 ayanami.maher.fyi gnome-session[26046]: gnome-session-binary[26046]: CRITICAL: gsm_manager_set_phase: assertion 'GSM_IS_MANAGER (manager)' failed
Oct 16 13:18:42 ayanami.maher.fyi gnome-session-binary[26046]: CRITICAL: gsm_manager_set_phase: assertion 'GSM_IS_MANAGER (manager)' failed
Oct 16 13:18:42 ayanami.maher.fyi systemd[1141]: Stopped target Current graphical user session.
Oct 16 13:18:42 ayanami.maher.fyi pulseaudio[25837]: XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server ":2"
Oct 16 13:18:42 ayanami.maher.fyi pulseaudio[25837]:       after 14 requests (6 known processed) with 0 events remaining.
Oct 16 13:18:42 ayanami.maher.fyi bluetoothd[820]: Endpoint unregistered: sender=:1.274 path=/MediaEndpoint/A2DPSource
Oct 16 13:18:42 ayanami.maher.fyi bluetoothd[820]: Endpoint unregistered: sender=:1.274 path=/MediaEndpoint/A2DPSink
Oct 16 13:18:42 ayanami.maher.fyi systemd[1141]: pulseaudio.service: Main process exited, code=exited, status=1/FAILURE
Oct 16 13:18:42 ayanami.maher.fyi systemd[1141]: pulseaudio.service: Unit entered failed state.
Oct 16 13:18:42 ayanami.maher.fyi gdm-password][26003]: pam_unix(gdm-password:session): session closed for user eqyiel
Oct 16 13:18:42 ayanami.maher.fyi gdm[25739]: GdmDisplay: display lasted 1.229223 seconds
Oct 16 13:18:42 ayanami.maher.fyi /nix/store/3aaalwlzws7nsikvx0vgzdm7zvrsayr1-gdm-3.24.2/libexec/gdm-x-session[25834]: (II) systemd-logind: got resume for 13:66
Oct 16 13:18:42 ayanami.maher.fyi /nix/store/3aaalwlzws7nsikvx0vgzdm7zvrsayr1-gdm-3.24.2/libexec/gdm-x-session[25834]: (II) systemd-logind: got resume for 13:67

I haven't gotten around to investigating all of this, but thank you for getting back to me - i just reached out because I remembered you had a similar problem. 😄

@jnugh
Copy link
Contributor

jnugh commented Oct 22, 2017

This happens to me as well, as long as gdm is enabled every rebuild (I do not even have to change my config) kills my graphical environment.

@bjornfor
Copy link
Contributor Author

bjornfor commented Oct 22, 2017

Hm, I haven't experienced any trouble like this lately. (So if it wasn't for others here, I'd close the issue.) (UPDATE: I was wrong, "nixos-rebuild switch" restarts the desktop on NixOS 17.09 when using GNOME.)

But just to rule out statefulness in $HOME, try adding a "test" user to your system and use that for a bit.

I'm saying this because I just had trouble with screen locking not working in GNOME. When pressing Super+L I only got .gnome-shell-wr[1237]: Screen lock is locked down, not locking in the system log. This happened since updating to NixOS 17.09 and/or toggling services.xserver.displayManager.gdm.autoLogin.enable. Using a new user worked, but the real fix was found here https://bbs.archlinux.org/viewtopic.php?pid=1718174#p1718174. (How did messing with NixOS upgrade and/or ...gdm.autoLogin end up changing a dconf setting?!)

@jnugh
Copy link
Contributor

jnugh commented Oct 28, 2017

Hi @bjornfor nixos-rebuild switch restarts X11 even if I'm not logged in via gdm (tested using SSH).
Just to verify this I also created a new user: first run of nixos-rebuild switch from withing my gnome3 session restarted X.

@jnugh
Copy link
Contributor

jnugh commented Oct 28, 2017

Once I remove

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

from nixos/modules/services/x11/display-managers/gdm.nix

I can do a nixos-rebuild test or switch just fine. I have no idea why getty@tty1.service and gdm are conflicting. But whenever getty or gdm is started the other one is being stopped + for some reason getty is being started after nixos-rebuild.

@bjornfor
Copy link
Contributor Author

I wrote:

Hm, I haven't experienced any trouble like this lately. (So if it wasn't for others here, I'd close the issue.)

But I was wrong. I am affected by this on NixOS 17.09.

@bjornfor
Copy link
Contributor Author

I have no idea why getty@tty1.service and gdm are conflicting.

That "conflicts" line was added in b73e3b6 ("GNOME: 3.22 -> 3.24") at the end of august. One month later, just before NixOS 17.09 release, another related fix was added: 48465ae ("Revert "kbd service: use /dev/tty1 for systemd-vconsole-setup").

@jnugh: Will you submit a PR to remove the systemd.services.display-manager.conflicts = [ "getty@tty1.service" ]; line?

@Mic92 Mic92 closed this as completed in 4a180da Oct 29, 2017
Mic92 pushed a commit that referenced this issue Oct 29, 2017
- fix restart of display-manager due to a conflict with getty@tty1
- fixes #21439
@roastiek
Copy link
Contributor

roastiek commented Oct 30, 2017

The conflict between getty@tty1.service and gdm is OK and needed for boot. The issue comes from nixos activation script restarting all active targets, notably getty.target which starts getty@tty1.service and breaks conflicts.
I see three ways to solve this:

  • keep gdm on tty1 with conflict on getty@tty1
    • and stop activation script restarting getty.target with systemd.targets.getty.unitConfig.RefuseManualStart = "yes";
    • or fix up the activation script to fully support conflicts
  • move gdm to tty7 with no conflicts. This can be done with configure flags "--with-initial-vt=7" like this

@roastiek
Copy link
Contributor

More specific: The conflict between getty@tt1 and gdm on boot happens only with NVIDIA binary drivers now. On intel cards, both getty@tty1 and gdm can run simultaneously and getty on tty1 will appear whenever you stop gdm (display-manager)
So the conflict with getty@tty1.service should remain when nvidia video drivers are used.

@jnugh
Copy link
Contributor

jnugh commented Nov 6, 2017

This should be reopened, as it is occurring again since has been merged #31003.
See #30893 (comment)

@bjornfor bjornfor reopened this Nov 6, 2017
@bjornfor
Copy link
Contributor Author

bjornfor commented Nov 6, 2017

Cross-linking: roastiek@d761e66#commitcomment-25382880

Seems like that's the approach we should use.

@roastiek
Copy link
Contributor

roastiek commented Nov 7, 2017

Ha, the main difference is whether GDM runs on wayland or xserver. Only wayland supports sharing tty1 between getty and GDM. I have disabled wayland in GDM and got the same bad behavior on both NVIDIA and Intel drivers. (NVIDIA does not support wayland)

pierrechevalier83 added a commit to pierrechevalier83/nixpkgs that referenced this issue Nov 19, 2017
- Fixes nixos-rebuild switch/test issue with GNOME
  NixOS#21439
- The solution was given here:
  roastiek@d761e66#commitcomment-25382880
bjornfor pushed a commit that referenced this issue Nov 19, 2017
- Fixes nixos-rebuild switch/test issue with GNOME
  #21439
- The solution was given here:
  roastiek@d761e66#commitcomment-25382880
@bjornfor
Copy link
Contributor Author

Fixed on master as of c46d4da.

orivej pushed a commit to bjornfor/nixpkgs that referenced this issue Nov 29, 2017
- Fixes nixos-rebuild switch/test issue with GNOME
  NixOS#21439
- The solution was given here:
  roastiek@d761e66#commitcomment-25382880

(cherry picked from commit 37875c4)
@hedning hedning mentioned this issue Sep 15, 2019
20 tasks
hedning added a commit that referenced this issue Sep 16, 2019
GDM is now killed if tty1 is started after gdm is launched. This follows
upstream's gdm service config.

This might cause problems with nixos-rebuild switch though. See the reasoning
and work that led to not following upstream on this:
  #21439
  4a180da
  c46d4da
worldofpeace pushed a commit that referenced this issue Sep 19, 2019
GDM is now killed if tty1 is started after gdm is launched. This follows
upstream's gdm service config.

This might cause problems with nixos-rebuild switch though. See the reasoning
and work that led to not following upstream on this:
  #21439
  4a180da
  c46d4da
hedning added a commit that referenced this issue Sep 30, 2019
GDM is now killed if tty1 is started after gdm is launched. This follows
upstream's gdm service config.

This might cause problems with nixos-rebuild switch though. See the reasoning
and work that led to not following upstream on this:
  #21439
  4a180da
  c46d4da
@jul1u5
Copy link
Contributor

jul1u5 commented Oct 16, 2019

Still happens on nixos-unstable (20.03pre196586.b943338e)

@hedning
Copy link
Contributor

hedning commented Oct 16, 2019

The fix hasn't landed in a channel yet (last nixos-unstable channel build failed on an urelated timeout https://hydra.nixos.org/job/nixos/trunk-combined/tested#tabs-constituents )

@roastiek
Copy link
Contributor

Using conflicts between services and nixos-rebuild switch was allways little buggy #30972.

Tha main reason is part of https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/system/activation/switch-to-configuration.pl#L170-L268, which restart getty.target on switch if I recall correctly. Maybe setting X-RestartIfChanged to no on getty.target could fix it. I didn't think of it two years ago.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug 6.topic: GNOME GNOME desktop environment and its underlying platform 6.topic: nixos
Projects
None yet
Development

No branches or pull requests