Created
January 6, 2026 00:37
-
-
Save jlucaso1/251ba9df2a6fb9947cd71fb9cfa77fcb to your computer and use it in GitHub Desktop.
Fix slow 5GHz WiFi detection on Arch Linux with MediaTek MT7921/MT7922
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Fix: Slow 5GHz WiFi Detection on Arch Linux (MediaTek MT7921/MT7922) | |
| ## Problem | |
| After booting, the 5GHz WiFi network takes a long time to appear while 2.4GHz shows up immediately. | |
| ## Cause | |
| The wireless regulatory domain is set to `00` (world/unset), which forces **passive scanning** on 5GHz bands. This means the adapter must wait for beacon frames instead of actively probing for networks. | |
| You can check with: | |
| ```bash | |
| iw reg get | |
| ``` | |
| If you see `country 00: DFS-UNSET` with `PASSIVE-SCAN` on 5GHz frequencies, this is your issue. | |
| ## Solution | |
| ### 1. Install the regulatory database | |
| ```bash | |
| sudo pacman -S wireless-regdb | |
| ``` | |
| ### 2. Set your country code in the regdom config | |
| Edit `/etc/conf.d/wireless-regdom` and uncomment your country (e.g., `BR` for Brazil): | |
| ```bash | |
| sudo sed -i 's/^#WIRELESS_REGDOM="BR"/WIRELESS_REGDOM="BR"/' /etc/conf.d/wireless-regdom | |
| ``` | |
| ### 3. Create modprobe config for early boot | |
| ```bash | |
| echo 'options cfg80211 ieee80211_regdom=BR' | sudo tee /etc/modprobe.d/wireless-regdom.conf | |
| ``` | |
| ### 4. (Optional) Disable ASPM for MT7921 latency fix | |
| ```bash | |
| echo 'options mt7921e disable_aspm=1' | sudo tee -a /etc/modprobe.d/wireless-regdom.conf | |
| ``` | |
| ### 5. Regenerate initramfs | |
| ```bash | |
| sudo mkinitcpio -P | |
| ``` | |
| ### 6. Reboot | |
| After reboot, verify with: | |
| ```bash | |
| iw reg get | head -5 | |
| ``` | |
| You should see your country code (e.g., `country BR: DFS-FCC`) instead of `country 00`. | |
| ## Notes | |
| - Replace `BR` with your [ISO 3166-1 alpha-2 country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) | |
| - When connected to WiFi, the access point may override your regulatory domain via beacon hints (this is expected kernel behavior) | |
| - The ASPM fix helps with general MT7921/MT7922 latency issues | |
| ## References | |
| - https://bbs.archlinux.org/viewtopic.php?id=279356 | |
| - https://bbs.archlinux.org/viewtopic.php?id=287846 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment