watchthelight labs

Wi-Fi gone after a restart (W3 fail: patch download); card missing in Windows until a cold power-off #1

openarea:wifikind:bugkind:regressionseverity:high
watchthelight 2026-10-19

What happens

After a restart from macOS (Apple menu > Restart), Wi-Fi can be gone on the next boot. The driver stops at W3 fail: patch download and the card stays down. Restarting again doesn't help, and if you restart into Windows from there, the MT7925 is missing in Windows too: it isn't on the PCIe bus at all. Shutting down and powering on again brings it back in both systems.

Seen on a Lenovo Legion 5 15IAX10 (MT7925, PCI 14c3:7925), macOS Tahoe 26.7.1, MtkWlan 0.11.3 with MtkWlanNative 0.4.11.

Log

The boot before the failure was normal:

MtkWlan: W3 patch done
MtkWlan: W3 pass: firmware running (N9 ready)
MtkWlan: W4 pass: station ready (MAC, domain, power), scanning from the tick

It ended with a warm restart, and the next boot showed:

MtkWlan: W2 pass: WFDMA rings up
MtkWlan: W3 fail: patch download

Windows after the next warm restart: the device's last-arrival time is the boot after the cold power-off, so it never enumerated in the warm boot.

Cause

MtkWlan does nothing when macOS restarts or powers off. It never joins the IOKit power plane, so systemWillShutdown is never called, and stop() doesn't run on a restart either. A warm restart doesn't power-cycle the card, so the chip keeps the previous session's firmware running with its DMA rings pointing at host memory the next boot reuses. The bring-up's own WFSYS reset wasn't enough to recover from that here.

Linux handles this in its shutdown hook (mt7925_pci_shutdown -> mt7925e_unregister_device): take driver ownership, clean up DMA, reset WFSYS.

Fix

MtkWlan 0.11.4 joins the power plane before the firmware download and quiesces the chip on restart and power-off: interrupts off, driver ownership, TX/RX DMA stopped, WFSYS reset, bus mastering off. It logs a line like MtkWlan: quiesced for restart (drv_own 1, dma idle 1, wfsys reset 1).

The change is written but not built or tested yet. The test: five restarts in a row with Wi-Fi up every time, a restart into Windows with the card present, and Shut Down still powering off.

Workaround

Until 0.11.4 is out, use Shut Down and power on again instead of Restart when leaving macOS, or whenever Wi-Fi is missing.

watchthelight 2026-10-22

Upstream scout, 2026-10-22: SimpleMtkWlan PR #7 (flxxxxddd, MT7921/RZ608) handles the same warm-restart case at attach. Its commit "Recover a wedged chip at attach: WFSYS reset, then PCIe FLR" says a warm reboot leaves the M.2 card powered, driver own fails, and attach used to give up. It tries a WFSYS reset first and then a PCIe function level reset (DevCtl bit 15, config space saved and restored).

That is a fallback worth trying after the W3 patch download fails, if the 0.11.4 restart quiesce isn't enough. It won't help the other half of this issue, where the card is missing in Windows too until a cold power-off. The PR is GPL-2.0, so idea only, no code.

Write-up: https://github.com/watchthelight-labs/research/blob/main/scout/mt7925-wifi/2026-10-22.md

Reply on GitHub