From 5232505c12054fc6dc318f79a08b2dabc19d3c8c Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Mon, 20 Jul 2026 10:34:26 -0700 Subject: [PATCH] Don't block the desktop on network-online at boot graphical.target was gated on network-online.target: cups-browsed orders itself After=network-online.target and sits in multi-user.target, so the session waited for NetworkManager-wait-online (DHCP/Wi-Fi association) before coming up. On the bench VM that was ~140ms, but it's the classic multi-second boot stall on real Wi-Fi. Mask NetworkManager-wait-online.service so network-online.target is reached immediately and nothing in the boot waits for connectivity; NetworkManager still comes up and cups-browsed browses once the link is live. Mirrors the existing systemd-networkd-wait-online mask. Enabled at install (enable-services.sh) and masked on existing installs via migration. Verified on a fresh boot: the graphical.target critical chain no longer passes through network-online.target / NetworkManager-wait-online. Co-Authored-By: Claude Fable 5 --- install/config/enable-services.sh | 5 +++++ migrations/1784568652.sh | 15 +++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 migrations/1784568652.sh diff --git a/install/config/enable-services.sh b/install/config/enable-services.sh index 8df4f171..2a1698e5 100644 --- a/install/config/enable-services.sh +++ b/install/config/enable-services.sh @@ -7,5 +7,10 @@ systemctl enable linux-modules-cleanup.service systemctl enable docker.socket systemctl enable systemd-resolved.service systemctl enable NetworkManager.service +# Don't let network-online.target (pulled in by cups-browsed) hold up +# graphical.target waiting for DHCP/Wi-Fi association. Nothing in the session +# needs to block on the network. Mirrors the systemd-networkd-wait-online mask +# in install/hardware/network.sh. +systemctl mask NetworkManager-wait-online.service systemctl enable power-profiles-daemon.service systemctl enable sddm.service diff --git a/migrations/1784568652.sh b/migrations/1784568652.sh new file mode 100644 index 00000000..3ad97921 --- /dev/null +++ b/migrations/1784568652.sh @@ -0,0 +1,15 @@ +echo "Stop waiting for the network before showing the desktop" + +as_root() { + if (( EUID == 0 )); then + "$@" + else + sudo "$@" + fi +} + +# graphical.target was gated on network-online.target (cups-browsed orders +# itself after it), so the desktop waited for DHCP/Wi-Fi association at boot. +# Nothing in the session needs to block on the network; mask the wait so +# network-online no longer delays boot. Mirrors the systemd-networkd variant. +as_root systemctl mask NetworkManager-wait-online.service >/dev/null 2>&1 || true