OPINIONATED OMARCHY
TROUBLESHOOTING CORPUS
790
RECORDS
790
AUDITED
0
UNCHECKED
2388
SOURCES
LIVE
network medium common DISPUTE

Recover saved Wi-Fi networks lost in the Omarchy 3 to Quattro upgrade

omarchynetworkmanageriwdlaptop
CORRECTED An auditor found the fix wrong or incomplete and rewrote it. · checked against Omarchy omarchy 4.0.4-1 on 2026-10-05
AUDIT NOTE

Re-read issue #8996 (open) in full: it supports every claim in the symptom and cause, including /var/lib/iwd mode 700, iwd and impala in the removal list, the =-hex filename encoding, and PR #6321 closed unmerged. The quattro omarchy-upgrade-to-quattro still lists impala and iwd for removal (lines 885 to 886). PR #12078 is still OPEN and unmerged on 2026-10-05, and grep -rl 'PreSharedKey\|/var/lib/iwd' /usr/share/omarchy returns nothing on this 4.0.4-1 workstation, so the cause is still current. Upstream latest release is v4.0.4. The import loop matches the issue's own verified workaround. Two small gaps are fixed, and the rest of the fix is kept verbatim: cp -r /var/lib/iwd ~/iwd-backup nests the copy as ~/iwd-backup/iwd if that directory already exists, so the loop then finds nothing (now cp -rT), and iwd uses the same .psk file for WPA3-only (SAE) networks, which a wpa-psk profile cannot join, so a one-line switch to sae is added. Status kept as corrected so the previous audit's findings stay attached. The loop was not exercised, since this workstation has no /var/lib/iwd.

The cause above was rewritten on 2026-10-04 to match this note; the fix was corrected by the audit itself.
RISK

~/iwd-backup is a plaintext copy of every saved Wi-Fi passphrase in your home directory. Delete it as soon as the import finishes. Do not delete /var/lib/iwd until you have confirmed every network reconnects.

Symptom

After upgrading from Omarchy 3.8.x to 4.0 (Quattro) and rebooting, Wi-Fi itself works, but every saved network is gone. Home, office and cafe networks all ask for their passwords again, and nmcli connection show lists no Wi-Fi profiles. There is no error or warning anywhere.

Cause

Quattro replaced iwd with NetworkManager plus wpa_supplicant, and omarchy-upgrade-to-quattro removes the iwd and impala packages without converting iwd's saved profiles. The profiles are still on disk in /var/lib/iwd/, one file per network named <SSID>.psk or <SSID>.open, with non-filename-safe SSIDs hex-encoded behind a leading =. That directory is mode 700 root-only, so a user has no visible sign it survived. The issue reporter found no import logic anywhere in /usr/share/omarchy on 4.0.1-1, and 4.0.4-1 still has none: the only migrations that mention iwd handle service and backend cleanup. A PR that implemented an import (#6321) was closed unmerged. A newer one (#12078) adds a migration that imports open and WPA-Personal networks, and was still open and unmerged on 2026-10-04.

Fix

Check that the old store survived:


sudo ls /var/lib/iwd/

For a few networks, read the passphrase and reconnect by hand:


sudo grep -E '^(Passphrase|PreSharedKey)=' '/var/lib/iwd/HomeWifi.psk'
nmcli device wifi connect 'HomeWifi' password 'the-passphrase'

For many networks, copy the store somewhere readable and import open and WPA-PSK networks in bulk (enterprise .8021x profiles must be re-added by hand):


sudo cp -rT /var/lib/iwd ~/iwd-backup && sudo chown -R "$USER" ~/iwd-backup

dir=~/iwd-backup
shopt -s nullglob
for f in "$dir"/*.psk "$dir"/*.open; do
  base=$(basename "$f"); ext=${base##*.}; name=${base%.*}
  if [[ $name == =* ]]; then
    ssid=$(python3 -c 'import sys; sys.stdout.buffer.write(bytes.fromhex(sys.argv[1]))' "${name#=}")
  else
    ssid=$name
  fi
  if [[ $ext == open ]]; then
    nmcli connection add type wifi con-name "$ssid" ssid "$ssid" autoconnect yes >/dev/null && echo "imported (open): $ssid"
    continue
  fi
  key=$(sed -n 's/^Passphrase=//p' "$f" | head -1)
  [[ -z $key ]] && key=$(sed -n 's/^PreSharedKey=//p' "$f" | head -1)
  [[ -z $key ]] && { echo "skip (no key): $ssid"; continue; }
  nmcli connection add type wifi con-name "$ssid" ssid "$ssid" \
    wifi-sec.key-mgmt wpa-psk wifi-sec.psk "$key" autoconnect yes >/dev/null && echo "imported: $ssid"
done

rm -rf ~/iwd-backup

iwd keeps WPA3-only (SAE) networks in the same .psk files. If one of the imported networks is WPA3-only and will not connect, switch its profile to SAE:


nmcli connection modify 'HomeWifi' wifi-sec.key-mgmt sae
nmcli connection up 'HomeWifi'

Keep /var/lib/iwd until everything reconnects. If you had profiles or scripts naming wlan0, note that removing iwd also removes its 80-iwd.link rule. The interface now gets a predictable name such as wlp3s0 (see interface-renamed-orphans-networkmanager-profile).

Verify

nmcli -f NAME,TYPE connection show | grep wifi lists the recovered networks. Walking into range of one of them connects automatically.

Sources

quattro-upgrade-drops-saved-wifi-networks