Macbook Pro 2020 WIFI Issues
System details
MacBook Pro (13-inch, 2020, Two Thunderbolt 3 ports)
What's wrong?
After installing Omarchy I am unable to connect to WiFi. When I enter the wifi password in the wifi UI, I get an error that says "Operation Failed" with some additional text I'm unable to read as the error flashes too briefly. I've done some basic troubleshooting with the help of ChatGPT. I suspect this may be a driver issue with BRCM wifi chip. Here's a quick summary of the issue and troubleshooting I've performed:
-
When I run
iwctlthe immediate prompt showsNetworkConfigurationEnabled: disabledI've added a main.conf file in /etc/iwd/ with "EnableNetworkConfiguration=true". I then reraniwctlit now showsNetworkConfigurationEnabled: enabled. Oddly, the WIFI UI is no longer showing my networks after making this change. But when I reboot, the wifi UI now shows my networks again. -
In the 'iwctl' cli when I run
station wlan0 scanI get "Operation Failed". -
When I run journalctl -u iwd I do see some errors. I posted a screenshot of the part of the log output below (from the last reboot).
-
There's no rfkill blocks disabling wifi.
-
Running
dmesg | grep -iE 'wlan|brcm|b43|wl|firmware'shows some interesting errors like "Direct firmware load for brcm/brcm/fmac4377b3. . . . . failed with error -2". I posted another screenshot below showing the dmesg output.
I have the same issue with the same Wifi adapter (4377b3) on a 2020 Macbook Air. My assumption is that those missing driver files are available on macOS but I've already re-partitioned so I'm not sure if I can go back.
I think I'm going to restore MacOS and then extract the drivers using the T2 Linux script.
I just confirmed my Mac has the BRCM4377 wifi adapter and is using the brcmfmac driver. Some basic googling says that's the right driver for that chip. But the dmseg error "direct firmware load for brcm/brcmfmac4377b3. . . . failed with error -2" tells me the driver ain't working.
Ok. Just asked Gemini about this and according to Gemini the driver is right, it's just missing a file which I need to download. Going to have to figure out how to get the file since I don't have Internet. Here's the Gemini response in case you're interested:
You have done an excellent job of diagnosing the problem. Your analysis is spot on.
The message direct firmware load for brcm/brcmfmac4377b3... failed with error -2 is the definitive clue. It means:
- Your driver is correct: The
brcmfmacdriver loaded properly and correctly identified your BRCM4377 Wi-Fi adapter. - The driver is missing a file: The driver then tried to load a required firmware file from your hard drive (
/lib/firmware/brcm/) but could not find it. The "error -2" simply means "file not found."
This is a very common situation with Broadcom cards on Linux, especially on Mac hardware. The open-source driver is included in the kernel, but the proprietary firmware file it needs cannot be included for licensing reasons.
You do not need a new driver. You just need to provide the missing firmware file.
How to Fix the Missing Firmware Issue
The solution is to manually obtain the correct firmware files and place them where the driver can find them. There is a community-maintained git repository specifically for the firmware needed for Apple hardware.
You will need a temporary internet connection to perform these steps. The easiest way is to use a USB-to-Ethernet adapter or to tether to your smartphone's data connection via USB.
Step 1: Install Git
First, ensure you have git installed so you can download the firmware repository. Open a terminal and run:
sudo pacman -S git
Step 2: Clone the Firmware Repository
Next, use git to download the necessary firmware files from a repository that collects them for Macs.
git clone https://github.com/AdityaGarg8/Apple-Firmware.git
This will create a new directory called Apple-Firmware in your current folder.
Step 3: Copy the Firmware to the System Directory
Now, you need to copy the firmware files from the downloaded repository into the system-wide firmware directory.
-
Navigate into the
brcmdirectory inside the repository you just cloned:cd Apple-Firmware/brcm/ -
Copy all the files from this directory into the system's
brcmfirmware location:sudo cp ./* /lib/firmware/brcm/(The
.means "the current directory" and*means "all files")
Step 4: Reboot Your System
The driver only attempts to load the firmware when the hardware is first initialized. The simplest way to trigger this is to reboot your MacBook.
reboot
After your Omarchy system restarts, the brcmfmac driver will run again, but this time when it looks for brcmfmac4377b3..., it will find the files you just copied. Your Wi-Fi adapter should now be active and available. You can then use iwctl or another network manager to scan for and connect to your wireless network.
I was able to follow Gemini's instructions by git cloning the repo on my macbook, copying the driver files to a USB and transferring them to my Omarchy laptop. I copied them to /lib/firmware/brcm/ then rebooted. Still no luck with wifi, but am getting new errors now. (screenshot below).
@trevorputbrese according to ChatGPT those timeouts are due to a power management issue where the driver is trying to suspend the device but it's not responding.
I followed the instructions on T2 Linux that suggested adding brcmfmac.feature_disable=0x82000 to kernel_cmdline in /boot/limine.conf. That cleared the power management errors.
But it still won't connect...
@jzimdars Thanks for the info. So I've been ignoring the timeout errors based on that.
I've spent the evening troubleshooting this without luck. Gemini is telling me the files from here that I added to /lib/firmware/brcm are definitely the right ones, and when I gave it the latest errors from dmesg (telling it to ignore the timeout) it advised the following logs are relevant:
brcmf_cfg80211_get_channel: chanspec failed (-5): The driver failed to get channel specifications. This is a critical failure. _brcmf_set_multicast_list: Setting BRCMF_C_SET_PROMIS failed, err=-5: The driver failed to put the card into "promiscuous mode," which is a necessary step during initialization and scanning. brcmf_run_escan: error (-5) and brcmf_cfg8211_scan: scan error (-5): This is the final result of the previous errors. The driver is telling the kernel that the command to scan for networks failed. This is why you see no Wi-Fi networks listed.
Doing some further troubleshooting I ran dmesg | grep -i brcmfmac" and it appears the kernel is trying to load the following files:
brcmfmac4377b3-pcie.apple,tahiti-SPPR-u-3.1-X0.bin brcmfmac4377b3-pcie.apple,tahiti-SPPR-u-3.1.bin brcmfmac4377b3-pcie.apple,tahiti-SPPR-u.bin brcmfmac4377b3-pcie.apple,tahiti-SPPR.bin brcmfmac4377b3-pcie.apple,tahiti-X0.bin
Gemini advised I need to create symlinks to a few of the driver files I added to correct the error (since it wasn't finding the EXACT right file) via:
sudo ln -s brcmfmac4377b3-pcie.apple,formosa.bin brcmfmac4377b3-pcie.apple,tahiti-SPPR-u-3.1-X0.bin sudo ln -s brcmfmac4377b3-pcie.apple,formosa-SPPR-u.txt brcmfmac4377b3-pcie.apple,tahiti-SPPR-u-3.1-X0.txt sudo ln -s brcmfmac4377b3-pcie.apple,formosa.clm_blob brcmfmac4377b3-pcie.apple,tahiti-SPPR-u-3.1-X0.clm_blob
After rebooting that still didn't work. I've tried symlinks to a couple of the other files as well without luck. I think I'm going to call it a night for now.
I also tried the symlink approach to no avail.
Hi thanks for the hints. Tried the mentioned things from above. Still having issues. WLAN is not working sometimes the UI or the wlan settings isn't showing up.
Happy to investigate further and find a solution.
Can confirm this happens on Framework 13 as well. But it seems to be certain Wifi network, my home network, fine, my office, same results as above.
I worked around it by installing Network Manager and using that to connect.
Can confirm this happens on Framework 13 as well. But it seems to be certain Wifi network, my home network, fine, my office, same results as above.
I worked around it by installing Network Manager and using that to connect.
Can you give me some steps I could try too please ?
Currently I am out of ideas what to try next.
Thank you.
Black list hci_bcm4377. That driver breaks wifi on bcm4377 chips
That fixed it for me, @AdityaGarg8! Thank you.
Steps:
echo "blacklist hci_bcm4377" | sudo tee /etc/modprobe.d/blacklist-bcm4377.conf
That creates /etc/modprobe.d/blacklist-bcm4377.conf with one line:
blacklist hci_bcm4377
Rebuild initramfs (so the change is applied early at boot):
sudo mkinitcpio -P
Reboot and connect to a Wifi network.
Thank you! Also fixed it for me.
Make sure you set iwd as the backend if using NetworkManager. Unfortunately the devs here did not consult us at t2linux before adding T2 support. (btw t2linux dev here, noticed this when a guy on our discord pointed out the issue.). Anyways, good luck!
connect
Awesome that helped and WLAN is working. Than you very much.
Make sure you set iwd as the backend if using NetworkManager. Unfortunately the devs here did not consult us at t2linux before adding T2 support. (btw t2linux dev here, noticed this when a guy on our discord pointed out the issue.). Anyways, good luck!
Thank you very much too. WLAN is now working ! Thank you for your hint. How can I support the t2linux devs ?
Make sure you set iwd as the backend if using NetworkManager. Unfortunately the devs here did not consult us at t2linux before adding T2 support. (btw t2linux dev here, noticed this when a guy on our discord pointed out the issue.). Anyways, good luck!
Thank you very much too. WLAN is now working ! Thank you for your hint. How can I support the t2linux devs ?
We have a little guide if you wanna support us:
https://wiki.t2linux.org/contribute/
Btw NoaHimesaka1873 is the one whose work you are using here.
tldr; (2020 MacBook Air) connecting to an open network works fine, but fails with WPA2.
Just wanted to add that I'm seeing a similar issue on my 2020 MacBook Air. impala shows the nearby wifi networks, so I know the driver is loaded and the radio "works" but when I try to connect to a network with a password (WPA2) it fails with logs similar to these (timeout issues).
Interestingly, when I try to run a scan myself from the cmdline using iwctl it fails with "Operation Failed" (like OP said). But the networks are listed in impala.
Even more interesting is that I can connect to an open network just fine. And while not related to wifi, my USB-C Belkin Ethernet adapter works fine - so the network stack seems functional otherwise.
I haven't had a chance to try more configurations of WPA/WPA2/WPA3, but just wanted to point out that having a password on the network seems to be the issue (for me) currently. Not sure where in the stack that would be an issue (driver, user-land, etc) but I assume it's something up in user-land (~wpa_supplicant?~ edit: I think iwd is used in place of this, yeah?).
Let me know if I can provide any other logs or whatever. To be honest, if I knew where to start digging I would have and would share my findings, so any help there would be appreciated!
You shouldn't link firmware files since it could cause more issues. brcmfmac tries multiple other paths for firmware so those errors will happen, though in the end it will load fine.