Disable MAC randomization for hotspots and MAC-registered networks
Checked on this Omarchy 4 workstation (omarchy 4.0.2-1, networkmanager 1.58.1-1, wpa_supplicant 2:2.12-1, iwd not installed, kernel 7.1.9) and against the 1.58 man pages, the Arch wiki and the upstream author's reference post. Four defects. (1) The cited URL https://github.com/basecamp/omarchy/issues/4607 is a hard 404 with no redirect, so it is removed and replaced with the omacom path. Read in full, issue 4607 supports only the quoted symptom. It reports omarchy 3.3.3, nobody diagnosed a cause, MAC randomization is never mentioned, and dhh closed it with "Quattro replaces the iwd, Impala, and systemd-networkd stack with NetworkManager and the native network panel". Worse, the Arch wiki MAC_address_spoofing page states NetworkManager ignores MAC spoofing options from conf.d on the iwd backend, so the record's own fix could not have worked on the machine in the cited report. The mechanism is real on Omarchy 4, but the cited issue is not evidence for it. (2) The cause was mechanically wrong. It said NetworkManager "can also use a per-connection random MAC", implying that is a default. man nm-settings-nmcli for 1.58 states wifi.cloned-mac-address defaults to "preserve", and "preserve" means not to touch the MAC on activation. The upstream author's post records that the default changed from "permanent" to "preserve" in 1.6. So the real mechanism is that the random address left on the radio by scanning is carried into the association, which is why the fix works. Nothing on this install sets "random" or "stable". Confirmed live: wlo1 currently reads fe:86:ef:5b:7e:d4 against permaddr 3c:6a:a7:68:5c:5e, a locally administered scan address on a disconnected radio. (3) verify called ethtool -P. Confirmed on this machine that /usr/bin/ethtool does not exist and no package owns it, so ethtool is not installed on Omarchy 4. It also used wlan0, a name Omarchy 4 does not produce: naming scheme v261 under 99-default.link gives wlo1 here. Rewritten to ip -d link show, which prints permaddr, confirmed working unprivileged. (4) systemctl restart NetworkManager is heavier than needed. man nmcli 1.58 documents nmcli general reload conf, allowed non-root via PolicyKit, and the Arch wiki uses nmcli general reload. On the precedence question asked: conf.d is read in lexicographic order with later files winning, and Omarchy's /etc/NetworkManager/conf.d/omarchy-wifi-powersave.conf (owned by omarchy-settings) has no numeric prefix, so it is read after every numerically prefixed file. It sets only wifi.powersave, so it does not shadow the MAC keys and 25-mac-stable.conf does land, but no numeric prefix can ever override Omarchy's file, which the fix now says. Confirmed the only other drop-ins are 20-omarchy-dns.conf (unowned, managed by omarchy-dns, [global-dns] only) and /usr/lib/NetworkManager/conf.d/20-connectivity.conf. nmcli syntax verified without changing anything by running nmcli --offline connection modify against a scratch keyfile: wifi.cloned-mac-address permanent is accepted and also emits the deprecated companion key mac-address-randomization=1, which the fix now notes. NOT exercised: this machine has a Wi-Fi radio (wlo1, iwlwifi) but no association is possible here, so the association-time MAC, the hotspot reconnect and the captive portal re-registration were not reproduced. Those rest on the 1.58 documentation and the upstream post, not on observation. frequency is lowered to occasional because the MAC-registered portal case is real but the headline hotspot-drop symptom was never diagnosed as MAC related in the only report cited. severity stays medium.
Pinning the permanent MAC removes the privacy benefit of randomization, so you become trackable across public networks by one stable identifier. The [connection] block is a global default and applies to every Wi-Fi and Ethernet profile on the machine, not only the one that misbehaves, so prefer the single-connection form if that matters. Reconnecting a profile drops the link, so do not run nmcli connection up on the connection carrying your only route while you are logged in over it.
Symptom
Tethering to a phone hotspot "often disconnects automatically and I have to manually reconnect", while the same laptop is stable on home/office Wi-Fi. On university, hotel or corporate networks that register your device by MAC, you get kicked back to the sign-in page every reconnect and have to re-register.
Cause
Two independent mechanisms, and only one of them is on by default. wifi.scan-rand-mac-address in the [device] section defaults to yes, so NetworkManager sets a random, locally administered MAC on the radio while it scans. Separately, the per-connection wifi.cloned-mac-address and ethernet.cloned-mac-address decide the address used at association, and since NetworkManager 1.6 both default to preserve, which means NetworkManager does not touch the MAC when a profile activates. The two combine: the random address left behind by scanning is the one carried into the association, so an AP that registers your device by MAC sees a different station each time and the lease or the portal registration does not carry over. The default is not a per-connection random MAC, which would be random or stable, and neither is set on a stock Omarchy 4 or Arch install. This mechanism fully explains the MAC-registered portal case. It is a plausible but undiagnosed explanation for plain hotspot drops, because the upstream report was filed against Omarchy 3 on the old iwd stack and nobody there identified a cause.
Fix
Two settings are involved and they are independent. Turn off scan randomization and force the permanent address at association:
sudo tee /etc/NetworkManager/conf.d/25-mac-stable.conf >/dev/null <<'EOF'
[device]
wifi.scan-rand-mac-address=no
[connection]
wifi.cloned-mac-address=permanent
ethernet.cloned-mac-address=permanent
EOF
nmcli general reload conf
nmcli general reload conf re-reads conf.d without restarting the service and is allowed for a non-root user through PolicyKit. The MAC is only applied when a profile activates, so reconnect the affected network:
nmcli connection down "<SSID>" && nmcli connection up "<SSID>"
Or for just one network, leaving randomization on elsewhere:
nmcli connection modify "<SSID>" wifi.cloned-mac-address permanent
nmcli connection up "<SSID>"
That also writes the deprecated companion key mac-address-randomization=1 into the profile, which is expected and not an error.
**Omarchy 4 note on file ordering.** Omarchy ships its own drop-in, /etc/NetworkManager/conf.d/omarchy-wifi-powersave.conf, owned by omarchy-settings. Files in conf.d are read in lexicographic order and later files win, and because Omarchy's filename has no numeric prefix it is read after every numerically prefixed file. It sets only wifi.powersave, so it does not shadow the MAC keys above and 25-mac-stable.conf takes effect. If you ever need to override wifi.powersave itself, no numeric prefix will do it: the file has to sort after omarchy-, for example /etc/NetworkManager/conf.d/zz-local.conf.
**If you switched NetworkManager to the iwd backend**, none of the above applies. NetworkManager ignores MAC spoofing options from NetworkManager.conf and conf.d on that backend and the setting has to go in /etc/iwd/main.conf. Omarchy 4 does not install iwd and uses wpa_supplicant.
Verify
ethtool is not installed on Omarchy 4, so read both addresses with ip. ip -d link show <iface> prints the current link/ether and the hardware permaddr:
ip -d link show wlo1 | grep -oE 'link/ether [0-9a-f:]+|permaddr [0-9a-f:]+'
They must match both while the radio is idle or scanning and while associated. Before the change they differ, and the current address has the locally administered bit set, so its first octet ends in 2, 6, a or e. Then reconnect to the hotspot or portal network and confirm it no longer asks you to register again. Use your own interface name from ip -br link, which on Omarchy 4 is typically wlo1 or wlp* and not wlan0.
Sources
- https://man.archlinux.org/man/NetworkManager.conf.5
- https://github.com/omacom/omarchy/issues/4607
- https://man.archlinux.org/man/nm-settings-nmcli.5
- https://man.archlinux.org/man/nmcli.1
- https://wiki.archlinux.org/title/MAC_address_spoofing
- https://wiki.archlinux.org/title/NetworkManager
- https://blogs.gnome.org/thaller/2016/08/26/mac-address-spoofing-in-networkmanager-1-4-0/