Hi! Having the same problem, I tried several solutions like @piknew /etc/systemd/network/x.link, or another idea with the service file that changes MAC via ip tool or macchanger:
% cat /etc/systemd/system/wlan0-mac.service
[Unit]
Description=wlan0 MAC
Wants=network-pre.target
Before=network-pre.target wpa_supplicant.service
BindsTo=sys-subsystem-net-devices-wlan0.device
After=sys-subsystem-net-devices-wlan0.device
[Service]
Type=oneshot
ExecStart=/usr/bin/logger "wlan0 MAC"
#ExecStart=/usr/bin/ip link set dev wlan0 address xx:xx
#ExecStart=/usr/bin/ip link set dev wlan0 up
ExecStart=/usr/bin/macchanger --mac=xx:xx wlan0
[Install]
WantedBy=multi-user.target
all of them work partially - MAC is changed, but after that NM doesn't connect to WiFi, says authentication problem:
Aug 4 13:10:39 o3dp wpa_supplicant[605]: wlx0: CTRL-EVENT-SSID-TEMP-DISABLED id=0 ssid="o-nest" auth_failures=2 duration=20 reason=CONN_FAILED
Aug 4 13:10:39 o3dp NetworkManager[576]: <info> [1659607839.4767] device (wlx0): supplicant interface state: authenticating -> disconnected
Aug 4 13:10:39 o3dp NetworkManager[576]: <info> [1659607839.4769] device (p2p-dev-wlx0): supplicant management interface state: authenticating -> disconnected
I tried to switch to IWD instead, but NM crashes with SEGV/11.
The only working solution is to downgrade to 5.10 (I tried both 5.15.48 and 5.15.25). I need fixed MAC because I use my OPi Zero as OctoPrint server and thus need the same IP address. Alternatively you may set IP address via NMtui manually.
PS: wired connection has constant MAC.