Bluetooth and Wifi stopped working - firmware missing?

I’m having what looks like the same problem as Reddit - Dive into anything

Am seeing errors in dmesg about being unable to locate the firmware just like that post.

The solution suggested in that post doesn’t seem to work with Fedora 40, can someone help me with re-unpacking the firmware?

Apologies for posting a photo, the machine is hard to access without wifi.

I did install docker yesterday but I’m not sure that is related.

Those messages are normal and not the cause of your problem. It tries multiple firmware filenames until one succeeds. You’ll have to look elsewhere to debug this. If ip link shows your wifi device, chances are the problem lies somewhere in userspace packages, not the kernel/firmware.

Are you sure rfkill isn’t just enabled? sudo rfkill to check.

Thanks Hector. It’s not rfkill.

root@macbookair-m2:~# rfkill
ID TYPE      DEVICE      SOFT      HARD
 0 bluetooth hci0   unblocked unblocked
 1 wlan      phy0   unblocked unblocked

I think it might be related to selinux. I disabled selinux to get docker going (I was in a rush).

I was about to post back about those errors, I worked with Broadcom crap for a while and remember how misleading their “errors” were.

I’m tethered over usb now so I can fetch more. The interface is present - once you get past those errors this looks ok.

root@macbookair-m2:~# dmesg | grep brcmfmac
[    3.223904] usbcore: registered new interface driver brcmfmac
[    3.223937] brcmfmac 0000:01:00.0: Adding to iommu group 8
[    3.223954] brcmfmac 0000:01:00.0: enabling device (0000 -> 0002)
[    3.238722] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4387c2-pcie for chip BCM4387/7
[    3.238900] brcmfmac 0000:01:00.0: Direct firmware load for brcm/brcmfmac4387c2-pcie.apple,hokkaido-TPHN-u-4.7-X0.bin failed with error -2
[    3.238919] brcmfmac 0000:01:00.0: Direct firmware load for brcm/brcmfmac4387c2-pcie.apple,hokkaido-TPHN-u-4.7.bin failed with error -2
[    3.239075] brcmfmac 0000:01:00.0: Direct firmware load for brcm/brcmfmac4387c2-pcie.apple,hokkaido-TPHN-u.bin failed with error -2
[    3.239091] brcmfmac 0000:01:00.0: Direct firmware load for brcm/brcmfmac4387c2-pcie.apple,hokkaido-TPHN.bin failed with error -2
[    3.239105] brcmfmac 0000:01:00.0: Direct firmware load for brcm/brcmfmac4387c2-pcie.apple,hokkaido-X0.bin failed with error -2
[    3.240229] brcmfmac 0000:01:00.0: Direct firmware load for brcm/brcmfmac4387c2-pcie.sig failed with error -2
[    4.191254] brcmfmac: brcmf_c_process_txcap_blob: TxCap blob found, loading
[    4.194157] brcmfmac: brcmf_c_process_cal_blob: Calibration blob provided by platform, loading
[    4.211535] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4387/7 wl0: May 27 2023 01:34:59 version 20.96.31.0.8.7.148 FWID 01-126f2c4c
[    4.307992] brcmfmac 0000:01:00.0 wlp1s0f0: renamed from wlan0

From here it gets ugly. This is looping.

[   19.449850] ieee80211 phy0: brcmf_dongle_roam: WLC_SET_ROAM_DELTA error (-52)
[   20.052196] ieee80211 phy0: brcmf_p2p_set_firmware: failed to update device address ret -52
[   20.052895] ieee80211 phy0: brcmf_p2p_create_p2pdev: set p2p_disc error
[   20.052899] ieee80211 phy0: brcmf_cfg80211_add_iface: add iface p2p-dev-wlp1s0f type 10 failed: err=-52
[   44.639355] ieee80211 phy0: brcmf_msgbuf_query_dcmd: Timeout on response for query command
[   44.639377] ieee80211 phy0: brcmf_cfg80211_disconnect: error (-5)
[   46.687322] ieee80211 phy0: brcmf_msgbuf_query_dcmd: Timeout on response for query command
[   46.687346] ieee80211 phy0: brcmf_cfg80211_reg_notifier: Country code iovar returned err = -5
[   48.735322] ieee80211 phy0: brcmf_msgbuf_query_dcmd: Timeout on response for query command
[   48.735342] ieee80211 phy0: brcmf_cfg80211_get_channel: chanspec failed (-5)
[   50.783301] ieee80211 phy0: brcmf_msgbuf_query_dcmd: Timeout on response for query command
[   50.783323] ieee80211 phy0: brcmf_cfg80211_get_tx_power: error (-5)
[   52.831263] ieee80211 phy0: brcmf_msgbuf_query_dcmd: Timeout on response for query command
[   52.831288] ieee80211 phy0: _brcmf_set_multicast_list: Setting mcast_list failed, -5
[   54.879248] ieee80211 phy0: brcmf_msgbuf_query_dcmd: Timeout on response for query command
[   54.879271] ieee80211 phy0: _brcmf_set_multicast_list: Setting allmulti failed, -5
[   56.927263] ieee80211 phy0: brcmf_msgbuf_query_dcmd: Timeout on response for query command
[   56.927293] ieee80211 phy0: brcmf_cfg80211_get_channel: chanspec failed (-5)
[   58.975246] ieee80211 phy0: brcmf_msgbuf_query_dcmd: Timeout on response for query command
[   58.975269] ieee80211 phy0: brcmf_c_set_cur_etheraddr: Setting cur_etheraddr failed, -5
[   61.023234] ieee80211 phy0: brcmf_msgbuf_query_dcmd: Timeout on response for query command
[   63.071226] ieee80211 phy0: brcmf_msgbuf_query_dcmd: Timeout on response for query command
[   63.071261] ieee80211 phy0: _brcmf_set_multicast_list: Setting BRCMF_C_SET_PROMISC failed, err=-5

I don’t need you to spend a ton of time on one person’s problems. I can usb tether until I get home and use wired once I get home. If there’s anything obvious to try please call it out otherwise please work on stuff that helps more than one person. Thanks for all your hard work, Asahi is the best.

I’ll update here once I solve this.

The first few errors (up to the p2p stuff) are normal (unsupported features). It’s at second 44 where things break. It looks like the wifi firmware just crashes.

The question now is what happened to cause it. If it’s something we can reproduce somehow then we can try to investigate. But it’s very difficult to debug this “remotely”.

Just as a sanity check, can you post the output of sha1sum /lib/firmware/vendor/brcm/*hokkaido*?

You can also put options brcmfmac debug=0xffffff in /etc/modprobe.d/brcmfmac-debug.conf and then run sudo dracut -f --kver=$(uname -r) and reboot. That will enable a lot of debug output, so expect things to slow down. But if you can reproduce the crashing wifi with that on, it might give as a clue as to what happened.

@marcan apologies, back from my travels, busily parenting and useing my marvellous m2 with a wired connection.

tom@macbookair-m2:~$ sha1sum /lib/firmware/vendor/brcm/*hokkaido*
059a6021019de7b44fb7318871fed17d7ee2df65  /lib/firmware/vendor/brcm/brcmbt4387c2-apple,hokkaido-u.bin
74e81c2fc30a5a2a67196f41bb362162bdcb9751  /lib/firmware/vendor/brcm/brcmbt4387c2-apple,hokkaido-u.ptb
3bd5a6b6b8f37c80a42fa1e9b78f7ee20bf6b0b0  /lib/firmware/vendor/brcm/brcmfmac4387c2-pcie.apple,hokkaido.bin
9a973fb6a36b2a414d3aa7011d07d6f316479eb7  /lib/firmware/vendor/brcm/brcmfmac4387c2-pcie.apple,hokkaido.clm_blob
1688c29bba0ced7eb53d44921d27a058efee8dc6  /lib/firmware/vendor/brcm/brcmfmac4387c2-pcie.apple,hokkaido.txcap_blob
48e5edf3ec342684abb6e71f7b4cf7d9b104a5fd  /lib/firmware/vendor/brcm/brcmfmac4387c2-pcie.apple,hokkaido.txt

Unfortunately it’s connecting to my home wifi just fine. The struggles were with a hotel wifi (no password, captive portal) so it might be something specific to this. I’ll make sure I come back here if I see the issues again. Thanks.

Hashes look good… and yeah, sounds like a problem specific to a given wifi network. Please do report back if you can reproduce it.

Next time, you could try: Getting the login screen on hotel WiFi .

Not sure if it’s the same issue, but on Friday, right after upgrading the kernel 6.9.5, I tried to connect to the SFO free wifi and it left my laptop unable to even browse for other networks. I downgraded to 6.8.9 and it got in the same state. If I ignored it, after a reboot I was able to use my phone’s hotspot.

I also set options brcmfmac debug=0xffffff and ran dracut -f --kver=$(uname -r), but I’m not seeing any verbose output in the journal even now, after upgrading to 6.9.9 (which I assume ran dracut as well).

https://paste.centos.org/view/3dc33a80
https://paste.centos.org/view/2203d2c6