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