From ae837498a3957da50e88262f0d9ea5c16428150c Mon Sep 17 00:00:00 2001 From: Douglas Teles Date: Fri, 26 Jun 2026 18:06:02 -0300 Subject: [PATCH] network: reconnect WiFi at boot when wifi.enabled is set WiFi was refactored from connman to iwd (wifictl uses iwctl), but iwd is dbus-activated and nothing re-associates it to the saved network at boot. The result: a unit rebooted with WiFi on comes up with the ES toggle showing active but no connection, and the user has to flip the toggle off and on to reconnect. The ES "Enable WiFi" toggle reconnects via `wifictl enable` (rfkill unblock) + `wifictl connect` (scan + associate to the saved iwd profile, ApiSystem::enableWifi). Mirror that in 099-networkservices, which already owns the network domain at boot and runs after network.target. The connect is backgrounded so the scan does not delay the UI, and wifictl no-ops when there is no WiFi device. Co-Authored-By: Claude Opus 4.8 --- .../packages/archr/autostart/099-networkservices | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/projects/ArchR/packages/archr/autostart/099-networkservices b/projects/ArchR/packages/archr/autostart/099-networkservices index 0d8ac10df9..6e8b944712 100755 --- a/projects/ArchR/packages/archr/autostart/099-networkservices +++ b/projects/ArchR/packages/archr/autostart/099-networkservices @@ -40,3 +40,15 @@ do ;; esac done + +# Reconnect WiFi at boot. iwd is dbus-activated and nothing re-associates it +# to the saved network here, so a unit rebooted with WiFi on comes back with +# the toggle showing active but no connection (the user otherwise has to flip +# it off and on). The ES "Enable WiFi" toggle reconnects by running +# `wifictl enable` (rfkill unblock) then `wifictl connect` (scan + associate +# to the saved iwd profile), so mirror that here. Backgrounded so the scan +# does not delay the UI; wifictl is a no-op when there is no WiFi device. +if [ "$(get_setting wifi.enabled)" = "1" ]; then + /usr/bin/wifictl enable + nohup /usr/bin/wifictl connect >/dev/null 2>&1 & +fi