Keep DGX Spark Wi-Fi connected at the login screen

If your DGX Spark uses Wi-Fi and not a LAN cable, it can stay offline after a reboot until someone logs in at its screen, so SSH and RDP do not work.

At boot, the first Wi-Fi handshake with the access point can fail, for example on a timeout. NetworkManager before 1.58 then does not try the saved password again. It asks for a new password. The login screen runs even when no monitor is connected, so it takes that request and waits for someone to type the password. Nobody does, and the Wi-Fi stays down. NetworkManager 1.58 fixes this, but DGX OS 7 has NetworkManager 1.46.

wifi-watchdog works around it with a systemd timer. The timer runs 90 seconds after boot and then every minute. If the Wi-Fi connection is not active, it runs nmcli connection up, which uses the saved password. If the connection is up, it does nothing.

Install it and start watching your Wi-Fi connection:

sudo curl -fsSL https://raw.githubusercontent.com/prabirshrestha/wifi-watchdog/main/wifi-watchdog -o /usr/local/bin/wifi-watchdog
sudo chmod +x /usr/local/bin/wifi-watchdog
sudo wifi-watchdog install MyWifi

Replace MyWifi with the name of your Wi-Fi connection. See the README for the other commands.