Repository navigation
Closed
Labels
0.kind: bugSomething is broken6.topic: nixosIssues or PRs affecting NixOS modules, or package usability issues specific to NixOS
Description
Describe the bug
Gnome doesn't start due to a systemd ordering cycle
Steps to reproduce
On current staging-next ( b24205e ) #457894
And a GNOME based NixOS system
Expected behaviour
Startup GDM / Graphical-Session
Screenshots
No response
Relevant log output
187:Nov 06 17:22:02 fabian-desktop systemd[1778]: org.gnome.SettingsDaemon.Smartcard.target: Job gnome-initial-setup-first-login.service/start deleted to break ordering cycle starting with org.gnome.SettingsDaemon.Smartcard.target/verify-active
188:Nov 06 17:22:02 fabian-desktop systemd[1778]: org.gnome.SettingsDaemon.Smartcard.target: Found ordering cycle: gnome-session-initialized.target/start after gnome-session-manager.target/start after [email protected]/start after gnome-session-pre.target/start after graphical-session-pre.target/start after gnome-initial-setup-first-login.service/start after gnome-session.target/verify-active after org.gnome.SettingsDaemon.Smartcard.target/verify-active - after gnome-session-initialized.target
189:Nov 06 17:22:02 fabian-desktop systemd[1778]: org.gnome.SettingsDaemon.Smartcard.target: Job [email protected]/start deleted to break ordering cycle starting with org.gnome.SettingsDaemon.Smartcard.target/verify-active
190:Nov 06 17:22:02 fabian-desktop systemd[1778]: org.gnome.SettingsDaemon.Smartcard.target: Found ordering cycle: gnome-session-initialized.target/start after [email protected]/start after gnome-session-manager.target/start after [email protected]/start after gnome-session-pre.target/start after graphical-session-pre.target/start after gnome-initial-setup-first-login.service/start after gnome-session.target/verify-active after org.gnome.SettingsDaemon.Smartcard.target/verify-active - after gnome-session-initialized.target
191:Nov 06 17:22:02 fabian-desktop systemd[1778]: gnome-session.target: Job org.gnome.SettingsDaemon.Keyboard.target/verify-active deleted to break ordering cycle starting with gnome-session.target/verify-active
192:Nov 06 17:22:02 fabian-desktop systemd[1778]: gnome-session.target: Found ordering cycle: org.gnome.SettingsDaemon.Keyboard.target/verify-active after org.gnome.SettingsDaemon.Keyboard.service/start after gnome-session-initialized.target/start after [email protected]/start after gnome-session-manager.target/start after [email protected]/start after gnome-session-pre.target/start after graphical-session-pre.target/start after gnome-initial-setup-first-login.service/start after gnome-session.target/verify-active - after org.gnome.SettingsDaemon.Keyboard.targetAdditional context
No response
System metadata
Caveat: not the generation I attempted to boot into
- system: `"x86_64-linux"`
- host os: `Linux 6.17.7, NixOS, 25.11 (Xantusia), 25.11.20251104.f646317`
- multi-user?: `yes`
- sandbox: `yes`
- version: `nix-env (Nix) 2.31.2`
- channels(root): `""`
- nixpkgs: `/nix/store/xzaymmhb7wqmyxa0b2a4ribkbgx5gimk-source`
Notify maintainers
@NixOS/gnome
Note for maintainers: Please tag this issue in your pull request description. (i.e. Resolves #ISSUE.)
I assert that this issue is relevant for Nixpkgs
- I assert that this is a bug and not a support request.
- I assert that this is not a duplicate of an existing issue.
- I assert that I have read the NixOS Code of Conduct and agree to abide by it.
Is this issue important to you?
Add a 👍 reaction to issues you find important.
Reacted by nbCloud91
Metadata
Metadata
Assignees
Labels
0.kind: bugSomething is broken6.topic: nixosIssues or PRs affecting NixOS modules, or package usability issues specific to NixOS
Activity
fabianhjr commentedon Nov 6, 2025
I suspect the loop might have been introduced here: https://github.com/NixOS/nixpkgs/pull/440720/files#diff-83b758b1d8273403f59c2f2a6ae411f7f59f3add324cc88976c0722db587ef48 (On
nixos/modules/services/desktops/gnome/gnome-initial-setup.nix)I don't think I will have time to tinker/check the ordering until sunday so if anyone can/wants to work on this I would appreciate it. :3
jtojnar commentedon Nov 7, 2025
ElvishJerricco commentedon Nov 7, 2025
It seems to me that the cycle is deterministic, but what breaks is not. With more cores and / or more memory in the VM, it ends up trying to start more things at once, and it finds more ways to trigger the cycle. When systemd finds a cycle, it just removes the job whose dependency chain included a cycle. So the result is that the job that gets removed is non-deterministic. In a VM with fewer cores / less memory, the only job that gets removed is
gnome-initial-setup-first-login.service/start, which isn't fatal so the GUI starts up functionally. But with more cores / more memory, a bunch of other jobs end up trying to start first and a bunch of them end up being removed by systemd, completely breaking the GUI.Looks like the deps were mixed up in the module compared to what upstream wants. Fix here: #459443