firmware icon indicating copy to clipboard operation
firmware copied to clipboard

Raspberry Pi Zero 2 W WiFi networking/SSH unusable or crashing/rebooting

Open sysgarpi opened this issue 8 months ago • 14 comments

I have multiple Raspberry Pi Zero W 2, installed with Raspberry Pi OS (32bit, bookworm) using the rpi-imager. I am experiencing very inconsistent stability, ranging from no problems at all, to extreme delays in the network/SSH communication up to crashes/reboots. I've done extensive tests to troubleshoot the issue and I believe to have narrowed it down to the WiFi access point the Pi's are connected to.

More details on the process of pinpointing the culprit is documented here: https://forums.raspberrypi.com/viewtopic.php?p=2318044 (Thank you @gitbls for all the support!).

To summarize my approaches; I've tried a variety of combinations between different RPi02W boards, micro SD cards, power supplies, USB cables, wired/wireless network and wireless access points. The common denominator for cases where I experienced the issue was the WiFi access point of my FRITZ!Box 6490.

As I found other issues discussing WiFi, I hope I chose the correct repo to submit this, show me the proper repo otherwise.

I am unable to purposely reproduce the delays or crash/reboots. I have one Pi set up for a while now, attempting to log the crash/reboot, but it hasn't happened since then, while it happened frequently before.

To quantify unusable network or extreme delays I write this quick script:

!/usr/bin/bash

TIMEFORMAT=%R

i=0
while true; do
        ((i=i+1))
        echo "Timing SSH #${i}.. "
        { time timeout 60 sshpass -p 'password' ssh [email protected] 'uptime'; } 2>> times_savior.log
        sleep 10
done

The resulting times, if the delays occur are, for example:

2.253, 10.155, 9.361, 1.651, 16.094, 2.956, 8.395, 60.006, 60.006, 3.302, 6.843, 60.004, 15.030, 3.201, 3.904, 2.531, 9.490, 2.585, 9.388, 31.759, 2.594, 5.792, 2.244, 31.263, 30.349, 60.006, 2.553, 2.605, ...

If I wouldn't put a timeout to the connection, it would sometimes finish anywhere between 10-30 minutes, but also had some cases where it exceeded 80 minutes. But with the same setup, I've witnessed stretches of time, where the connection was perfectly fine, with consistent completion times of <2 seconds.

As elsewhere suggested I added the following file /etc/modprobe.de/02w-wifi-fix.conf, but this help in my case:

options brcmfmac debug=0x104404
options brcmfmac feature_disable=0x2000

Logs

The following shows an excerpt of the journalctl logs of one of the Pi's experiencing the delays, but no crash/reboot so far: journalctl | grep brcm. I have brcmfmac.debug=0x100000 added to /boot/firmware/cmdline.txt.

I'm happy to provide any other relevant information, but am having a hard time identifying relevant data. Let me know what else I can share to get this issue resolved.

May 13 02:17:54 raspberrypi kernel: Kernel command line: coherent_pool=1M 8250.nr_uarts=0 snd_bcm2835.enable_headphones=0 cgroup_disable=memory snd_bcm2835.enable_hdmi=1 snd_bcm2835.enable_hdmi=0  smsc95xx.macaddr=01:23:45:67:89 vc_mem.
mem_base=0x1ec00000 vc_mem.mem_size=0x20000000  console=ttyS0,115200 console=tty1 root=PARTUUID=0b22e5e3-02 rootfstype=ext4 fsck.repair=yes rootwait cfg80211.ieee80211_regdom=DE systemd.run=/boot/firmware/firstrun.sh systemd.run_success_ac
tion=reboot systemd.unit=kernel-command-line.target brcmfmac.debug=0x100000
May 13 02:17:56 raspberrypi kernel: Bluetooth: hci0: BCM43430A1 'brcm/BCM43430A1.raspberrypi,model-zero-2-w.hcd' Patch
May 13 02:17:56 raspberrypi kernel: brcmfmac: F1 signature read @0x18000000=0x1541a9a6                                                                                                                                                         May 13 02:17:56 raspberrypi kernel: brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1
May 13 02:17:56 raspberrypi kernel: usbcore: registered new interface driver brcmfmac
May 13 02:17:57 raspberrypi kernel: brcmfmac: brcmf_c_process_txcap_blob: no txcap_blob available (err=-2)
May 13 02:17:57 raspberrypi kernel: brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM43430/1 wl0: Jun 14 2023 07:27:45 version 7.45.96.s1 (gf031a129) FWID 01-70bd2af7 es7
May 13 02:17:57 raspberrypi kernel: brcmfmac: CONSOLE: hndarm_armr addr: 0x18003000, cr4_idx: 0
May 13 02:17:57 raspberrypi kernel: brcmfmac: CONSOLE: 000000.001
May 13 02:17:57 raspberrypi kernel: brcmfmac: CONSOLE: RTE (SDIO-CDC) 7.45.96.s1 on BCM43430 r1 @ 37.4/81.6/81.6MHz
May 13 02:17:57 raspberrypi kernel: brcmfmac: CONSOLE: 000000.001 sdpcmdcdc0: Broadcom SDPCMD CDC driver
May 13 02:17:57 raspberrypi kernel: brcmfmac: CONSOLE: 000000.007 reclaim section 0: Returned 45474 bytes to the heap
May 13 02:17:57 raspberrypi kernel: brcmfmac: CONSOLE: 000000.009 wlc_bmac_info_init: host_enab 1
May 13 02:17:57 raspberrypi kernel: brcmfmac: CONSOLE: 000000.061 wl0: Broadcom BCM43430 802.11 Wireless Controller 7.45.96.s1 (gf031a129)
May 13 02:17:57 raspberrypi kernel: brcmfmac: CONSOLE: 000000.062 wl_nd_ra_filter_init: Enter..
May 13 02:17:57 raspberrypi kernel: brcmfmac: CONSOLE: 000000.062 TCAM: 256 used: 215 exceed:0
May 13 02:17:57 raspberrypi kernel: brcmfmac: CONSOLE: 000000.063 reclaim section 1: Returned 79816 bytes to the heap
May 13 02:17:57 raspberrypi kernel: brcmfmac: CONSOLE: 000000.156 wl0: wlc_enable_probe_req: state down, deferring setting of host flags
May 13 02:17:57 raspberrypi kernel: brcmfmac: CONSOLE: 000000.293 wl0: wlc_enable_probe_req: state down, deferring setting of host flags
May 13 02:18:24 subject kernel: Kernel command line: coherent_pool=1M 8250.nr_uarts=0 snd_bcm2835.enable_headphones=0 cgroup_disable=memory snd_bcm2835.enable_hdmi=1 snd_bcm2835.enable_hdmi=0  smsc95xx.macaddr=01:23:45:67:89 vc_mem.mem_
base=0x1ec00000 vc_mem.mem_size=0x20000000  console=ttyS0,115200 console=tty1 root=PARTUUID=0b22e5e3-02 rootfstype=ext4 fsck.repair=yes rootwait brcmfmac.debug=0x100000 cfg80211.ieee80211_regdom=DE
May 13 02:18:26 subject kernel: Bluetooth: hci0: BCM43430A1 'brcm/BCM43430A1.raspberrypi,model-zero-2-w.hcd' Patch
May 13 02:18:27 subject kernel: brcmfmac: F1 signature read @0x18000000=0x1541a9a6
May 13 02:18:27 subject kernel: brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1
May 13 02:18:27 subject kernel: usbcore: registered new interface driver brcmfmac
May 13 02:18:27 subject kernel: brcmfmac: brcmf_c_process_txcap_blob: no txcap_blob available (err=-2)
May 13 02:18:27 subject kernel: brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM43430/1 wl0: Jun 14 2023 07:27:45 version 7.45.96.s1 (gf031a129) FWID 01-70bd2af7 es7
May 13 02:18:27 subject kernel: brcmfmac: CONSOLE: hndarm_armr addr: 0x18003000, cr4_idx: 0
May 13 02:18:27 subject kernel: brcmfmac: CONSOLE: 000000.001
May 13 02:18:27 subject kernel: brcmfmac: CONSOLE: RTE (SDIO-CDC) 7.45.96.s1 on BCM43430 r1 @ 37.4/81.6/81.6MHz
May 13 02:18:27 subject kernel: brcmfmac: CONSOLE: 000000.001 sdpcmdcdc0: Broadcom SDPCMD CDC driver
May 13 02:18:27 subject kernel: brcmfmac: CONSOLE: 000000.007 reclaim section 0: Returned 45474 bytes to the heap
May 13 02:18:27 subject kernel: brcmfmac: CONSOLE: 000000.009 wlc_bmac_info_init: host_enab 1
May 13 02:18:27 subject kernel: brcmfmac: CONSOLE: 000000.061 wl0: Broadcom BCM43430 802.11 Wireless Controller 7.45.96.s1 (gf031a129)
May 13 02:18:27 subject kernel: brcmfmac: CONSOLE: 000000.062 wl_nd_ra_filter_init: Enter..
May 13 02:18:27 subject kernel: brcmfmac: CONSOLE: 000000.062 TCAM: 256 used: 215 exceed:0
May 13 02:18:27 subject kernel: brcmfmac: CONSOLE: 000000.063 reclaim section 1: Returned 79816 bytes to the heap
May 13 02:18:27 subject kernel: brcmfmac: CONSOLE: 000000.102 wl0: wlc_enable_probe_req: state down, deferring setting of host flags
May 13 02:18:27 subject kernel: brcmfmac: CONSOLE: 000000.140 wl0: wlc_enable_probe_req: state down, deferring setting of host flags
May 13 02:18:30 subject NetworkManager[434]: <info>  [1747095510.0003] rfkill1: found Wi-Fi radio killswitch (at /sys/devices/platform/soc/3f300000.mmcnr/mmc_host/mmc1/mmc1:0001/mmc1:0001:1/ieee80211/phy0/rfkill1) (driver brcmfmac)
May 13 02:18:30 subject kernel: brcmfmac: brcmf_cfg80211_set_power_mgmt: power save enabled
May 13 02:18:30 subject kernel: brcmfmac: CONSOLE: 000003.150 wl0: wl_open
May 13 02:18:30 subject kernel: brcmfmac: CONSOLE: 000003.509 wl0: wl_open
May 13 02:18:31 subject kernel: brcmfmac: CONSOLE: 000003.631 wl0: wlc_enable_probe_req: state down, deferring setting of host flags
May 13 02:18:31 subject kernel: brcmfmac: CONSOLE: 000004.389 E/GTK: wlc_bcol_process_gtk_rekey: 4 handshake frame, skip
May 13 02:18:31 subject kernel: brcmfmac: CONSOLE: 000004.448 E/GTK: wlc_bcol_process_gtk_rekey: 4 handshake frame, skip
May 29 19:34:23 subject kernel: brcmfmac: CONSOLE: 000702.850 E/GTK: wlc_bcol_process_gtk_rekey: 4 handshake frame, skip
May 29 19:34:23 subject kernel: brcmfmac: CONSOLE: 000702.934 E/GTK: wlc_bcol_process_gtk_rekey: 4 handshake frame, skip
May 29 19:34:23 subject kernel: brcmfmac: CONSOLE: 000702.850 E/GTK: wlc_bcol_process_gtk_rekey: 4 handshake frame, skip                                                                                                                [0/220]
May 29 19:34:23 subject kernel: brcmfmac: CONSOLE: 000702.934 E/GTK: wlc_bcol_process_gtk_rekey: 4 handshake frame, skip
May 29 20:11:04 subject NetworkManager[427]: <info>  [1748542264.0638] rfkill1: found Wi-Fi radio killswitch (at /sys/devices/platform/soc/3f300000.mmcnr/mmc_host/mmc1/mmc1:0001/mmc1:0001:1/ieee80211/phy0/rfkill1) (driver brcmfmac)
May 29 20:11:04 subject kernel: brcmfmac: brcmf_cfg80211_set_power_mgmt: power save enabled
May 29 20:11:04 subject kernel: brcmfmac: CONSOLE: 000003.251 wl0: wl_open
May 29 20:11:04 subject kernel: brcmfmac: CONSOLE: 000003.607 wl0: wl_open
May 29 20:11:05 subject kernel: brcmfmac: CONSOLE: 000003.714 wl0: wlc_enable_probe_req: state down, deferring setting of host flags
May 29 20:11:06 subject kernel: brcmfmac: CONSOLE: 000005.516 E/GTK: wlc_bcol_process_gtk_rekey: 4 handshake frame, skip
May 29 20:11:06 subject kernel: brcmfmac: CONSOLE: 000005.569 E/GTK: wlc_bcol_process_gtk_rekey: 4 handshake frame, skip
May 29 20:11:03 subject NetworkManager[435]: <info>  [1748542263.9841] rfkill1: found Wi-Fi radio killswitch (at /sys/devices/platform/soc/3f300000.mmcnr/mmc_host/mmc1/mmc1:0001/mmc1:0001:1/ieee80211/phy0/rfkill1) (driver brcmfmac)
May 29 20:11:04 subject kernel: brcmfmac: brcmf_cfg80211_set_power_mgmt: power save enabled
May 29 20:11:04 subject kernel: brcmfmac: CONSOLE: 000003.142 wl0: wl_open
May 29 20:11:04 subject kernel: brcmfmac: CONSOLE: 000003.485 wl0: wl_open
May 29 20:11:04 subject kernel: brcmfmac: CONSOLE: 000003.508 wl0: wlc_enable_probe_req: state down, deferring setting of host flags
May 29 20:11:06 subject kernel: brcmfmac: CONSOLE: 000005.432 E/GTK: wlc_bcol_process_gtk_rekey: 4 handshake frame, skip
May 29 20:11:06 subject kernel: brcmfmac: CONSOLE: 000005.491 E/GTK: wlc_bcol_process_gtk_rekey: 4 handshake frame, skip
May 29 21:17:01 subject kernel: Kernel command line: coherent_pool=1M 8250.nr_uarts=0 snd_bcm2835.enable_headphones=0 cgroup_disable=memory snd_bcm2835.enable_hdmi=1 snd_bcm2835.enable_hdmi=0  smsc95xx.macaddr=01:23:45:67:89 vc_mem.mem_base=0x1ec00000 vc_mem.mem_size=0x20000000  console=ttyS0,115200 console=tty1 root=PARTUUID=0b22e5e3-02 rootfstype=ext4 fsck.repair=yes rootwait brcmfmac.debug=0x100000 cfg80211.ieee80211_regdom=DE
May 29 21:17:03 subject kernel: Bluetooth: hci0: BCM43430A1 'brcm/BCM43430A1.raspberrypi,model-zero-2-w.hcd' Patch
May 29 21:17:04 subject kernel: brcmfmac: F1 signature read @0x18000000=0x1541a9a6
May 29 21:17:04 subject kernel: brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1
May 29 21:17:04 subject kernel: usbcore: registered new interface driver brcmfmac
May 29 21:17:04 subject kernel: brcmfmac: brcmf_c_process_txcap_blob: no txcap_blob available (err=-2)
May 29 21:17:04 subject kernel: brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM43430/1 wl0: Jun 14 2023 07:27:45 version 7.45.96.s1 (gf031a129) FWID 01-70bd2af7 es7
May 29 21:17:04 subject kernel: brcmfmac: CONSOLE: hndarm_armr addr: 0x18003000, cr4_idx: 0
May 29 21:17:04 subject kernel: brcmfmac: CONSOLE: 000000.001
May 29 21:17:04 subject kernel: brcmfmac: CONSOLE: RTE (SDIO-CDC) 7.45.96.s1 on BCM43430 r1 @ 37.4/81.6/81.6MHz
May 29 21:17:04 subject kernel: brcmfmac: CONSOLE: 000000.001 sdpcmdcdc0: Broadcom SDPCMD CDC driver
May 29 21:17:04 subject kernel: brcmfmac: CONSOLE: 000000.007 reclaim section 0: Returned 45474 bytes to the heap
May 29 21:17:04 subject kernel: brcmfmac: CONSOLE: 000000.009 wlc_bmac_info_init: host_enab 1
May 29 21:17:04 subject kernel: brcmfmac: CONSOLE: 000000.061 wl0: Broadcom BCM43430 802.11 Wireless Controller 7.45.96.s1 (gf031a129)
May 29 21:17:04 subject kernel: brcmfmac: CONSOLE: 000000.062 wl_nd_ra_filter_init: Enter..
May 29 21:17:04 subject kernel: brcmfmac: CONSOLE: 000000.062 TCAM: 256 used: 215 exceed:0
May 29 21:17:04 subject kernel: brcmfmac: CONSOLE: 000000.063 reclaim section 1: Returned 79816 bytes to the heap
May 29 21:17:04 subject kernel: brcmfmac: CONSOLE: 000000.089 wl0: wlc_enable_probe_req: state down, deferring setting of host flags
May 29 21:17:04 subject kernel: brcmfmac: CONSOLE: 000000.125 wl0: wlc_enable_probe_req: state down, deferring setting of host flags
May 29 21:19:13 subject NetworkManager[431]: <info>  [1748546353.4801] rfkill1: found Wi-Fi radio killswitch (at /sys/devices/platform/soc/3f300000.mmcnr/mmc_host/mmc1/mmc1:0001/mmc1:0001:1/ieee80211/phy0/rfkill1) (driver brcmfmac)
May 29 21:19:13 subject kernel: brcmfmac: brcmf_cfg80211_set_power_mgmt: power save enabled
May 29 21:19:13 subject kernel: brcmfmac: CONSOLE: 000002.798 wl0: wl_open
May 29 21:19:14 subject kernel: brcmfmac: CONSOLE: 000003.121 wl0: wl_open
May 29 21:19:14 subject kernel: brcmfmac: CONSOLE: 000003.144 wl0: wlc_enable_probe_req: state down, deferring setting of host flags
May 29 21:19:16 subject kernel: brcmfmac: CONSOLE: 000005.050 E/GTK: wlc_bcol_process_gtk_rekey: 4 handshake frame, skip
May 29 21:19:16 subject kernel: brcmfmac: CONSOLE: 000005.088 E/GTK: wlc_bcol_process_gtk_rekey: 4 handshake frame, skip
May 30 03:32:16 subject kernel: brcmfmac: CONSOLE: 022350.842 E/GTK: wlc_bcol_process_gtk_rekey: 4 handshake frame, skip
May 30 03:32:16 subject kernel: brcmfmac: CONSOLE: 022350.909 E/GTK: wlc_bcol_process_gtk_rekey: 4 handshake frame, skip
May 30 12:31:40 subject NetworkManager[433]: <info>  [1748601100.5014] rfkill1: found Wi-Fi radio killswitch (at /sys/devices/platform/soc/3f300000.mmcnr/mmc_host/mmc1/mmc1:0001/mmc1:0001:1/ieee80211/phy0/rfkill1) (driver brcmfmac)
May 30 12:31:40 subject kernel: brcmfmac: brcmf_cfg80211_set_power_mgmt: power save enabled
May 30 12:31:41 subject kernel: brcmfmac: CONSOLE: 000003.179 wl0: wl_open
May 30 12:31:41 subject kernel: brcmfmac: CONSOLE: 000003.487 wl0: wl_open
May 30 12:31:41 subject kernel: brcmfmac: CONSOLE: 000003.613 wl0: wlc_enable_probe_req: state down, deferring setting of host flags
May 30 12:31:43 subject kernel: brcmfmac: CONSOLE: 000005.385 E/GTK: wlc_bcol_process_gtk_rekey: 4 handshake frame, skip
May 30 12:31:43 subject kernel: brcmfmac: CONSOLE: 000005.406 E/GTK: wlc_bcol_process_gtk_rekey: 4 handshake frame, skip
May 30 12:33:40 subject NetworkManager[426]: <info>  [1748601220.2208] rfkill1: found Wi-Fi radio killswitch (at /sys/devices/platform/soc/3f300000.mmcnr/mmc_host/mmc1/mmc1:0001/mmc1:0001:1/ieee80211/phy0/rfkill1) (driver brcmfmac)
May 30 12:33:40 subject kernel: brcmfmac: brcmf_cfg80211_set_power_mgmt: power save enabled
May 30 12:33:40 subject kernel: brcmfmac: CONSOLE: 000002.764 wl0: wl_open
May 30 12:33:41 subject kernel: brcmfmac: CONSOLE: 000003.119 wl0: wl_open
May 30 12:33:41 subject kernel: brcmfmac: CONSOLE: 000003.142 wl0: wlc_enable_probe_req: state down, deferring setting of host flags
May 30 12:33:42 subject kernel: brcmfmac: CONSOLE: 000005.021 E/GTK: wlc_bcol_process_gtk_rekey: 4 handshake frame, skip
May 30 12:33:43 subject kernel: brcmfmac: CONSOLE: 000005.122 E/GTK: wlc_bcol_process_gtk_rekey: 4 handshake frame, skip
May 30 12:49:51 subject kernel: brcmfmac: CONSOLE: 000906.835 E/GTK: wlc_bcol_process_gtk_rekey: 4 handshake frame, skip
May 30 12:49:51 subject kernel: brcmfmac: CONSOLE: 000906.861 E/GTK: wlc_bcol_process_gtk_rekey: 4 handshake frame, skip

sysgarpi avatar May 30 '25 18:05 sysgarpi

As elsewhere suggested I added the following file /etc/modprobe.de/02w-wifi-fix.conf, but this help in my case:

this didn't help?

pelwell avatar May 30 '25 19:05 pelwell

As elsewhere suggested I added the following file /etc/modprobe.de/02w-wifi-fix.conf, but this help in my case:

this didn't help?

Correct. Unless there is something else I have to do before the changes take effect, other than creating the file with this content and rebooting the system. I've read that with Raspberry Pi OS it's not necessary to rebuild initramfs (?) and the file permissions shouldn't matter either.

So, with these options present as described, the delays occur just the same as I witnessed before making the changes. But to reiterate, I'm unable to reproduce these issues consistently. For example, I've ran the tests again and now get consistent times of 2~ish seconds (with the time timeout sshpass ssh -setup).

ls -lah /etc/modprobe.d/02w-wifi-fix.conf
 -rw-r--r--  1 root root  122 May 29 19:24 02w-wifi-fix.conf

cat /etc/modprobe.d/02w-wifi-fix.conf
options brcmfmac debug=0x104404 
options brcmfmac feature_disable=0x2000

I've also read elsewhere, to do this with the option options brmfmac roamoff=1 feature_disable=82000, which didn't help either.

edit: it is so inconsistent, that I start doubting my own experience, as it currently works perfectly fine, with the options set. But I know that it didn't throughout the last days of testing.

edit 2: Okay, I have confirmation again, after logging stretches of a perfectly fine connection, I'm seeing the immense delays and timeouts again. Logging times as shown below, with the initially mentioned approach:

2.252, 2.324, 1.410, 3.805, 3.059, 4.034, 2.427, 12.661, 60.004, 6.825, 60.004, 2.286, 2.156, 2.146, 2.323, 2.371, 2.236, 18.241, 2.289, 2.359, 2.290, 2.361, 2.222

sysgarpi avatar May 31 '25 06:05 sysgarpi

I also have this problem - very unstable WiFi with the Zero 2W after some period of time, in my case when connected to Unifi U6-lite AP.

Unifi configuration for the network is 2.4GHz, WPA2, PMF disabled, 802.11r disabled. All disabled: client device isolation, proxy arp, bss transition, UAPSD, speed limit, multicast enhancement, multicast/broadcast control. On Auto: 802.11 DTIM period and minimum data rate control.

The '2W is within 2 meters of the U6-lite AP. There are no brown-out messages in the logs.

The device has Bookworm with latest 'full-upgrade' applied as of time of writing.

dmesg:

$ dmesg | grep -i brcmfmac [ 7.540579] brcmfmac: F1 signature read @0x18000000=0x1541a9a6 [ 7.546009] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1 [ 7.547555] usbcore: registered new interface driver brcmfmac [ 7.785833] brcmfmac: brcmf_c_process_txcap_blob: no txcap_blob available (err=-2) [ 7.786588] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM43430/1 wl0: Jun 14 2023 07:27:45 version 7.45.96.s1 (gf031a129) FWID 01-70bd2af7 es7 [ 11.015860] brcmfmac: brcmf_cfg80211_set_power_mgmt: power save enabled [ 12.389805] brcmfmac: brcmf_cfg80211_set_power_mgmt: power save disabled

After applying 'full-upgrade', lowering the RPi transmit power to 12dB and disabling power save, and restarting the AP, connectivity has been dramatically improved (no ping drops in 12 hours). Time will tell if it's a permanent fix.

J1mbo avatar Jun 02 '25 13:06 J1mbo

I've come across the Alpine Linux Raspberry Pi documentation, which notes the following file/configuration for improved WiFi stability:

$cat /etc/modprobe.d/brcmfmac.conf
options brcmfmac roamoff=1 feature_disable=0x282000

I've undone all previous configuration and tried, this, but it still results in terribly inconsistent times for SSH connections, tested with the initially mentioned script:

1.661, 0.782, 0.689, 1.824, 1.637, 1.671, 60.006, 2.412, 1.998, 59.662, 60.003, 60.006, 60.009, 9.265, 60.006, 1.974, 60.006, 60.006, 60.006, 2.053, 3.224, 28.336, 2.255, 2.863, 6.032

sysgarpi avatar Jun 15 '25 07:06 sysgarpi

Just to verify, I've set both feature_disable values and updated initramfs, as I've read that that could make a difference:

$cat /etc/modprobe.d/brcmfmac.conf
options brcmfmac roamoff=1 feature_disable=0x282000
options brcmfmac feature_disable=0x2000

After updating the configuration file:

sudo update-initramfs -u
sudo reboot

SSH remains unusable via WiFi.

sysgarpi avatar Jun 15 '25 08:06 sysgarpi

@sysgarpi - according to ChatGPT, "Because modprobe processes options in order and “the last value set wins,” your second line effectively overwrites the first mask, so the only feature you end up disabling is SWSUP (the 4-way WPA handshake offload)". So try instead the single line:

options brcmfmac roamoff=1 feature_disable=0x282000

This disables roaming, SWSUP (4-way WPA handshake (EAPOL) in firmware), SAE_EXT (SAE (WPA3) authentication in firmware - note this will result in not being able to join WPA3 networks), and DUMP_OBSS (overlapping-BSS scanning in firmware).

J1mbo avatar Jun 15 '25 19:06 J1mbo

@sysgarpi - according to ChatGPT, "Because modprobe processes options in order and “the last value set wins,” your second line effectively overwrites the first mask, so the only feature you end up disabling is SWSUP (the 4-way WPA handshake offload)". So try instead the single line:

options brcmfmac roamoff=1 feature_disable=0x282000

This disables roaming, SWSUP (4-way WPA handshake (EAPOL) in firmware), SAE_EXT (SAE (WPA3) authentication in firmware - note this will result in not being able to join WPA3 networks), and DUMP_OBSS (overlapping-BSS scanning in firmware).

Hi @J1mbo, thanks for the feedback, that's good to know! Unfortunately I've had both options active as a single line in the .conf file as well with the same result.

sysgarpi avatar Jun 16 '25 18:06 sysgarpi

Also been struggling with a Unifi network and a Pi Zero 2 W with ssh. I found this post and did as it said adding IPQoS 0x00 0x00 to the end of /etc/ssh/sshd_config, reboot and it is working great now!

Massive pain to need to do that. Something funny about the Unifi network or does it apply some QoS that is being problematic?

AllanJard avatar Sep 14 '25 20:09 AllanJard

Good find, IPQoS 0x00 in sshd_config seems to fix the problem for me, too! Another way to get it working is to use IPv6 instead of IPv4 to connect.

csarn avatar Sep 16 '25 12:09 csarn

Thanks for the feedback! I've tried the sshd_config options, only one per test:

IPQoS cs0 cs0
IPQoS 0x00 0x00

With and without the settings in /etc/modprobe.de/02w-wifi-fix.conf, only one per test:

options brcmfmac feature_disable=0x2000 
options brcmfmac roamoff=1 feature_disable=0x282000

However this didn't make my wifi usable with the raspberry pi 2w, latest Raspberry Pi OS as of writing this.

sysgarpi avatar Nov 07 '25 18:11 sysgarpi

@sysgarpi

i've read about a solution for brcmfmac and pi zero 2's not playing nice with each other (i cannot locate the post now). it was to disable NetworkManager and use wpa_supplicant and systemd-networkd, I've had this running on a machine for a good bit now and it's been smooth sailing.

user-zbx avatar Nov 07 '25 20:11 user-zbx

@sysgarpi

i've read about a solution for brcmfmac and pi zero 2's not playing nice with each other (i cannot locate the post now). it was to disable NetworkManager and use wpa_supplicant and systemd-networkd, I've had this running on a machine for a good bit now and it's been smooth sailing.

Thanks for the info, I'll give that a shot as well!

sysgarpi avatar Nov 08 '25 08:11 sysgarpi

@sysgarpi seems disabling bluetooth helps in my, similar to yours, case. In /boot/firmware/config.txt add line dtoverlay=disable-bt, save and reboot.

slawpaw avatar Dec 02 '25 11:12 slawpaw