raspberrypi / bookworm-feedback

12 stars 1 forks source link

RPi 5 wifi AP-STA mode loses wlan0 connection after hours or days of correct operation #220

Open phylax2020 opened 4 months ago

phylax2020 commented 4 months ago

I have a Raspberry Pi 5b running the latest bookworm version from Raspberry Pi Imager v1.8.4: Pi OS (64-bit) with Raspberry Pi Desktop. I followed the different steps to install the OS with WiFi on a USB memory stick. I also did update the OS with apt update and apt full-upgrade. The current OS version is: Linux RaspberryPi 6.1.0-rpi8-rpi-2712 #1 SMP PREEMPT Debian 1:6.1.73-1+rpt1 (2024-01-25) aarch64 GNU/Linux

Next I generated a virtual WLAN1 interface on wlan0 and turned off power save in /etc/rc.local:

iw wlan0 set power_save off

# enable AP-STA mode
iw dev wlan0 interface add wlan1 type __ap
sleep 2
iw wlan1 set power_save off

Next i nstalled an access point on WLAN1 with NetworkManger:

#!/bin/bash
# File: setup_pi-ager-ap.sh
# START NetworkManger commands to setup AccessPoint on wirtual wlan1
# wlan1 must be configured by : iw dev wlan0 interface add wlan1 type __ap

set -x
trap read debug
 # configure access point with networkmanager
 nmcli con delete PI_AGER_AP
 nmcli con add type wifi ifname wlan1 mode ap con-name PI_AGER_AP ssid pi-ager-ap
 nmcli con modify PI_AGER_AP 802-11-wireless.band bg
 nmcli con modify PI_AGER_AP 802-11-wireless.channel 6
 nmcli con modify PI_AGER_AP 802-11-wireless-security.key-mgmt wpa-psk
 nmcli con modify PI_AGER_AP 802-11-wireless-security.psk 12345678
 nmcli con modify PI_AGER_AP ipv4.addr 192.168.4.1/24
 nmcli con modify PI_AGER_AP ipv4.method shared
 nmcli con modify PI_AGER_AP ipv6.method disabled
 nmcli con up PI_AGER_AP

All works fine for few hours or up to several day. Then suddenly the network indicator on the desktop is grayed out and states, that wlan0 is no langer available, the hotspot at IP: 192.168.4.1 is still active. The WLAN router (FRITZBOX 7490) has a strong and stable WLAN signal and is located nearby the RPi 5 and is still connected to other devices in the WLAN network.

Also the access point is still reachable by using smart phones or tablet computers. The log generated by journalctl shows the following errors, when the wlan0 connection disappears:

Feb 25 11:16:12 RaspberryPi NetworkManager[865]: <info>  [1708856172.6016] dhcp6 (wlan0): state changed no lease
Feb 25 11:16:12 RaspberryPi NetworkManager[865]: <info>  [1708856172.6016] dhcp6 (wlan0): activation: beginning transaction (timeout in 45 seconds)
Feb 25 11:16:12 RaspberryPi NetworkManager[865]: <info>  [1708856172.6181] dhcp6 (wlan0): state changed new lease
Feb 25 11:16:12 RaspberryPi dbus-daemon[730]: [system] Activating via systemd: service name='org.freedesktop.nm_dispatcher' unit='dbus-org.freedesktop.nm-dispatcher.service' requested by ':1.9' (uid=0 pid=865 comm="/usr/sbin/NetworkManager --no-daemon")
Feb 25 11:16:12 RaspberryPi NetworkManager[865]: <info>  [1708856172.6224] dhcp4 (wlan0): state changed new lease, address=192.168.0.237
Feb 25 11:16:12 RaspberryPi systemd[1]: Starting NetworkManager-dispatcher.service - Network Manager Script Dispatcher Service...
Feb 25 11:16:12 RaspberryPi dbus-daemon[730]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'
Feb 25 11:16:12 RaspberryPi systemd[1]: Started NetworkManager-dispatcher.service - Network Manager Script Dispatcher Service.
Feb 25 11:16:22 RaspberryPi systemd[1]: NetworkManager-dispatcher.service: Deactivated successfully.
Feb 25 11:17:01 RaspberryPi CRON[420065]: pam_unix(cron:session): session opened for user root(uid=0) by (uid=0)
Feb 25 11:17:01 RaspberryPi CRON[420066]: (root) CMD (cd / && run-parts --report /etc/cron.hourly)
Feb 25 11:17:01 RaspberryPi CRON[420065]: pam_unix(cron:session): session closed for user root
Feb 25 12:17:01 RaspberryPi CRON[424903]: pam_unix(cron:session): session opened for user root(uid=0) by (uid=0)
Feb 25 12:17:01 RaspberryPi CRON[424904]: (root) CMD (cd / && run-parts --report /etc/cron.hourly)
Feb 25 12:17:01 RaspberryPi CRON[424903]: pam_unix(cron:session): session closed for user root
Feb 25 12:49:28 RaspberryPi systemd[1]: Starting apt-daily.service - Daily apt download activities...
Feb 25 12:49:29 RaspberryPi systemd[1]: apt-daily.service: Deactivated successfully.
Feb 25 12:49:29 RaspberryPi systemd[1]: Finished apt-daily.service - Daily apt download activities.
Feb 25 13:17:01 RaspberryPi CRON[429790]: pam_unix(cron:session): session opened for user root(uid=0) by (uid=0)
Feb 25 13:17:01 RaspberryPi CRON[429791]: (root) CMD (cd / && run-parts --report /etc/cron.hourly)
Feb 25 13:17:01 RaspberryPi CRON[429790]: pam_unix(cron:session): session closed for user root
Feb 25 14:17:01 RaspberryPi CRON[434627]: pam_unix(cron:session): session opened for user root(uid=0) by (uid=0)
Feb 25 14:17:01 RaspberryPi CRON[434628]: (root) CMD (cd / && run-parts --report /etc/cron.hourly)
Feb 25 14:17:01 RaspberryPi CRON[434627]: pam_unix(cron:session): session closed for user root
Feb 25 14:32:56 RaspberryPi wpa_supplicant[866]: wlan0: CTRL-EVENT-DISCONNECTED bssid=c8:0e:14:27:6d:b5 reason=3
Feb 25 14:32:56 RaspberryPi wpa_supplicant[866]: Removed BSSID c8:0e:14:27:6d:b4 from ignore list (expired)
Feb 25 14:32:56 RaspberryPi NetworkManager[865]: <info>  [1708867976.5641] device (wlan0): supplicant interface state: completed -> disconnected
Feb 25 14:32:56 RaspberryPi NetworkManager[865]: <info>  [1708867976.5641] device (p2p-dev-wlan0): supplicant management interface state: completed -> disconnected
Feb 25 14:32:56 RaspberryPi kernel: ieee80211 phy0: brcmf_run_escan: error (-52)
Feb 25 14:32:56 RaspberryPi kernel: ieee80211 phy0: brcmf_cfg80211_scan: scan error (-52)
Feb 25 14:32:56 RaspberryPi wpa_supplicant[866]: wlan0: CTRL-EVENT-SCAN-FAILED ret=-52 retry=1
Feb 25 14:32:57 RaspberryPi wpa_supplicant[866]: wlan0: CTRL-EVENT-SCAN-FAILED ret=-52 retry=1
Feb 25 14:32:57 RaspberryPi kernel: ieee80211 phy0: brcmf_run_escan: error (-52)
Feb 25 14:32:57 RaspberryPi kernel: ieee80211 phy0: brcmf_cfg80211_scan: scan error (-52)
Feb 25 14:32:58 RaspberryPi wpa_supplicant[866]: wlan0: CTRL-EVENT-SCAN-FAILED ret=-52 retry=1
Feb 25 14:32:58 RaspberryPi kernel: ieee80211 phy0: brcmf_run_escan: error (-52)
Feb 25 14:32:58 RaspberryPi kernel: ieee80211 phy0: brcmf_cfg80211_scan: scan error (-52)
Feb 25 14:32:59 RaspberryPi wpa_supplicant[866]: wlan0: CTRL-EVENT-SCAN-FAILED ret=-52 retry=1
Feb 25 14:32:59 RaspberryPi kernel: ieee80211 phy0: brcmf_run_escan: error (-52)
Feb 25 14:32:59 RaspberryPi kernel: ieee80211 phy0: brcmf_cfg80211_scan: scan error (-52)
Feb 25 14:33:00 RaspberryPi kernel: ieee80211 phy0: brcmf_run_escan: error (-52)
Feb 25 14:33:00 RaspberryPi kernel: ieee80211 phy0: brcmf_cfg80211_scan: scan error (-52)
Feb 25 14:33:00 RaspberryPi wpa_supplicant[866]: wlan0: CTRL-EVENT-SCAN-FAILED ret=-52 retry=1
Feb 25 14:33:01 RaspberryPi wpa_supplicant[866]: wlan0: CTRL-EVENT-SCAN-FAILED ret=-52 retry=1
Feb 25 14:33:01 RaspberryPi kernel: ieee80211 phy0: brcmf_run_escan: error (-52)
Feb 25 14:33:01 RaspberryPi kernel: ieee80211 phy0: brcmf_cfg80211_scan: scan error (-52)
Feb 25 14:33:02 RaspberryPi wpa_supplicant[866]: wlan0: CTRL-EVENT-SCAN-FAILED ret=-52 retry=1
Feb 25 14:33:02 RaspberryPi kernel: ieee80211 phy0: brcmf_run_escan: error (-52)
Feb 25 14:33:02 RaspberryPi kernel: ieee80211 phy0: brcmf_cfg80211_scan: scan error (-52)
Feb 25 14:33:03 RaspberryPi wpa_supplicant[866]: wlan0: CTRL-EVENT-SCAN-FAILED ret=-52 retry=1
Feb 25 14:33:03 RaspberryPi kernel: ieee80211 phy0: brcmf_run_escan: error (-52)
Feb 25 14:33:03 RaspberryPi kernel: ieee80211 phy0: brcmf_cfg80211_scan: scan error (-52)
Feb 25 14:33:04 RaspberryPi kernel: ieee80211 phy0: brcmf_run_escan: error (-52)
Feb 25 14:33:04 RaspberryPi kernel: ieee80211 phy0: brcmf_cfg80211_scan: scan error (-52)
Feb 25 14:33:04 RaspberryPi wpa_supplicant[866]: wlan0: CTRL-EVENT-SCAN-FAILED ret=-52 retry=1
Feb 25 14:33:05 RaspberryPi wpa_supplicant[866]: wlan0: CTRL-EVENT-SCAN-FAILED ret=-52 retry=1
Feb 25 14:33:05 RaspberryPi kernel: ieee80211 phy0: brcmf_run_escan: error (-52)
Feb 25 14:33:05 RaspberryPi kernel: ieee80211 phy0: brcmf_cfg80211_scan: scan error (-52)
Feb 25 14:33:06 RaspberryPi wpa_supplicant[866]: wlan0: CTRL-EVENT-SCAN-FAILED ret=-52 retry=1
Feb 25 14:33:06 RaspberryPi kernel: ieee80211 phy0: brcmf_run_escan: error (-52)
Feb 25 14:33:06 RaspberryPi kernel: ieee80211 phy0: brcmf_cfg80211_scan: scan error (-52)
Feb 25 14:33:07 RaspberryPi wpa_supplicant[866]: wlan0: CTRL-EVENT-SCAN-FAILED ret=-52 retry=1
Feb 25 14:33:07 RaspberryPi kernel: ieee80211 phy0: brcmf_run_escan: error (-52)
Feb 25 14:33:07 RaspberryPi kernel: ieee80211 phy0: brcmf_cfg80211_scan: scan error (-52)
Feb 25 14:33:08 RaspberryPi wpa_supplicant[866]: wlan0: CTRL-EVENT-SCAN-FAILED ret=-52 retry=1
Feb 25 14:33:08 RaspberryPi kernel: ieee80211 phy0: brcmf_run_escan: error (-52)
Feb 25 14:33:08 RaspberryPi kernel: ieee80211 phy0: brcmf_cfg80211_scan: scan error (-52)
Feb 25 14:33:09 RaspberryPi wpa_supplicant[866]: wlan0: CTRL-EVENT-SCAN-FAILED ret=-52 retry=1
Feb 25 14:33:09 RaspberryPi kernel: ieee80211 phy0: brcmf_run_escan: error (-52)
Feb 25 14:33:09 RaspberryPi kernel: ieee80211 phy0: brcmf_cfg80211_scan: scan error (-52)
Feb 25 14:33:10 RaspberryPi wpa_supplicant[866]: wlan0: CTRL-EVENT-SCAN-FAILED ret=-52 retry=1
Feb 25 14:33:10 RaspberryPi kernel: ieee80211 phy0: brcmf_run_escan: error (-52)
Feb 25 14:33:10 RaspberryPi kernel: ieee80211 phy0: brcmf_cfg80211_scan: scan error (-52)
Feb 25 14:33:11 RaspberryPi NetworkManager[865]: <warn>  [1708867991.6148] device (wlan0): link timed out.
Feb 25 14:33:11 RaspberryPi kernel: ieee80211 phy0: brcmf_run_escan: error (-52)
Feb 25 14:33:11 RaspberryPi kernel: ieee80211 phy0: brcmf_cfg80211_scan: scan error (-52)
Feb 25 14:33:11 RaspberryPi avahi-daemon[728]: Withdrawing address record for 2003:c9:8f39:8a00:cac:791b:441b:dccd on wlan0.
Feb 25 14:33:11 RaspberryPi NetworkManager[865]: <info>  [1708867991.6149] device (wlan0): state change: activated -> failed (reason 'ssid-not-found', sys-iface-state: 'managed')
Feb 25 14:33:11 RaspberryPi avahi-daemon[728]: Leaving mDNS multicast group on interface wlan0.IPv6 with address 2003:c9:8f39:8a00:cac:791b:441b:dccd.
Feb 25 14:33:11 RaspberryPi NetworkManager[865]: <warn>  [1708867991.6157] device (wlan0): Activation: failed for connection 'preconfigured'
Feb 25 14:33:11 RaspberryPi dbus-daemon[730]: [system] Activating via systemd: service name='org.freedesktop.nm_dispatcher' unit='dbus-org.freedesktop.nm-dispatcher.service' requested by ':1.9' (uid=0 pid=865 comm="/usr/sbin/NetworkManager --no-daemon")
Feb 25 14:33:11 RaspberryPi NetworkManager[865]: <info>  [1708867991.6165] manager: NetworkManager state is now CONNECTED_LOCAL
Feb 25 14:33:11 RaspberryPi avahi-daemon[728]: Joining mDNS multicast group on interface wlan0.IPv6 with address fe80::801a:2fbb:f8ce:38e3.
Feb 25 14:33:11 RaspberryPi NetworkManager[865]: <info>  [1708867991.6170] device (wlan0): state change: failed -> disconnected (reason 'none', sys-iface-state: 'managed')
Feb 25 14:33:11 RaspberryPi avahi-daemon[728]: Registering new address record for fe80::801a:2fbb:f8ce:38e3 on wlan0.*.
Feb 25 14:33:11 RaspberryPi systemd[1]: Starting NetworkManager-dispatcher.service - Network Manager Script Dispatcher Service...
Feb 25 14:33:11 RaspberryPi avahi-daemon[728]: Withdrawing address record for fe80::801a:2fbb:f8ce:38e3 on wlan0.
Feb 25 14:33:11 RaspberryPi avahi-daemon[728]: Leaving mDNS multicast group on interface wlan0.IPv6 with address fe80::801a:2fbb:f8ce:38e3.
Feb 25 14:33:11 RaspberryPi avahi-daemon[728]: Interface wlan0.IPv6 no longer relevant for mDNS.
Feb 25 14:33:11 RaspberryPi wpa_supplicant[866]: wlan0: CTRL-EVENT-SCAN-FAILED ret=-52
Feb 25 14:33:11 RaspberryPi NetworkManager[865]: <info>  [1708867991.6574] dhcp4 (wlan0): canceled DHCP transaction
Feb 25 14:33:11 RaspberryPi NetworkManager[865]: <info>  [1708867991.6574] dhcp4 (wlan0): activation: beginning transaction (timeout in 45 seconds)
Feb 25 14:33:11 RaspberryPi NetworkManager[865]: <info>  [1708867991.6575] dhcp4 (wlan0): state changed no lease
Feb 25 14:33:11 RaspberryPi NetworkManager[865]: <info>  [1708867991.6577] dhcp6 (wlan0): canceled DHCP transaction
Feb 25 14:33:11 RaspberryPi NetworkManager[865]: <info>  [1708867991.6577] dhcp6 (wlan0): activation: beginning transaction (timeout in 45 seconds)
Feb 25 14:33:11 RaspberryPi NetworkManager[865]: <info>  [1708867991.6577] dhcp6 (wlan0): state changed no lease
Feb 25 14:33:11 RaspberryPi dbus-daemon[730]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'
Feb 25 14:33:11 RaspberryPi systemd[1]: Started NetworkManager-dispatcher.service - Network Manager Script Dispatcher Service.
Feb 25 14:33:11 RaspberryPi dnsmasq[1717]: no servers found in /etc/resolv.conf, will retry
Feb 25 14:33:11 RaspberryPi avahi-daemon[728]: Withdrawing address record for 192.168.0.237 on wlan0.
Feb 25 14:33:11 RaspberryPi avahi-daemon[728]: Leaving mDNS multicast group on interface wlan0.IPv4 with address 192.168.0.237.
Feb 25 14:33:11 RaspberryPi avahi-daemon[728]: Interface wlan0.IPv4 no longer relevant for mDNS.
Feb 25 14:33:11 RaspberryPi NetworkManager[865]: <info>  [1708867991.7503] device (wlan0): supplicant interface state: disconnected -> inactive
Feb 25 14:33:11 RaspberryPi NetworkManager[865]: <info>  [1708867991.7503] device (p2p-dev-wlan0): supplicant management interface state: disconnected -> inactive
Feb 25 14:33:12 RaspberryPi wpa_supplicant[866]: wlan0: CTRL-EVENT-SCAN-FAILED ret=-52
Feb 25 14:33:12 RaspberryPi kernel: ieee80211 phy0: brcmf_run_escan: error (-52)
Feb 25 14:33:12 RaspberryPi kernel: ieee80211 phy0: brcmf_cfg80211_scan: scan error (-52)
Feb 25 14:33:16 RaspberryPi wpa_supplicant[866]: wlan0: CTRL-EVENT-SCAN-FAILED ret=-52
Feb 25 14:33:16 RaspberryPi kernel: ieee80211 phy0: brcmf_run_escan: error (-52)
Feb 25 14:33:16 RaspberryPi kernel: ieee80211 phy0: brcmf_cfg80211_scan: scan error (-52)
Feb 25 14:33:21 RaspberryPi wpa_supplicant[866]: wlan0: CTRL-EVENT-SCAN-FAILED ret=-52
Feb 25 14:33:21 RaspberryPi kernel: ieee80211 phy0: brcmf_run_escan: error (-52)
Feb 25 14:33:21 RaspberryPi kernel: ieee80211 phy0: brcmf_cfg80211_scan: scan error (-52)

The problem starts at this point without any external cause:

Feb 25 14:32:56 RaspberryPi wpa_supplicant[866]: wlan0: CTRL-EVENT-DISCONNECTED bssid=c8:0e:14:27:6d:b5 reason=3

The status of NetworkManager is as follows:

● NetworkManager.service - Network Manager
     Loaded: loaded (/lib/systemd/system/NetworkManager.service; enabled; preset: enabled)
     Active: active (running) since Mon 2024-02-26 17:53:52 CET; 16h ago
       Docs: man:NetworkManager(8)
   Main PID: 800 (NetworkManager)
      Tasks: 4 (limit: 4385)
        CPU: 2.831s
     CGroup: /system.slice/NetworkManager.service
             ├─ 800 /usr/sbin/NetworkManager --no-daemon
             └─1181 /usr/sbin/dnsmasq --conf-file=/dev/null --no-hosts --keep-in-foreground --bind-interfaces --except-interface=lo --clear-on-reload --strict-order --listen-address=10.0.0.1 --dhcp-range=10.0.0.10,10.0.0.254,60m --dhcp-leasefile=/var/lib/NetworkManager/dnsmasq-wlan1.leases --pid-file=/run/nm-dnsmasq-wlan1.pid --conf-dir=/etc/NetworkManager/dnsmasq-shared.d

Feb 27 00:05:38 pi-ager NetworkManager[800]: <info>  [1708988738.6231] Config: added 'key_mgmt' value 'WPA-PSK WPA-PSK-SHA256 FT-PSK'
Feb 27 00:05:38 pi-ager NetworkManager[800]: <info>  [1708988738.6231] Config: added 'auth_alg' value 'OPEN'
Feb 27 00:05:38 pi-ager NetworkManager[800]: <info>  [1708988738.6231] Config: added 'psk' value '<hidden>'
Feb 27 00:06:04 pi-ager NetworkManager[800]: <warn>  [1708988764.1150] device (wlan0): Activation: (wifi) association took too long, failing activation
Feb 27 00:06:04 pi-ager NetworkManager[800]: <info>  [1708988764.1150] device (wlan0): state change: config -> failed (reason 'ssid-not-found', sys-iface-state: 'managed')
Feb 27 00:06:04 pi-ager NetworkManager[800]: <info>  [1708988764.1153] manager: NetworkManager state is now CONNECTED_LOCAL
Feb 27 00:06:04 pi-ager NetworkManager[800]: <warn>  [1708988764.1155] device (wlan0): Activation: failed for connection 'FRITZ!Box 7490'
Feb 27 00:06:04 pi-ager NetworkManager[800]: <info>  [1708988764.1157] device (wlan0): state change: failed -> disconnected (reason 'none', sys-iface-state: 'managed')
Feb 27 00:06:04 pi-ager NetworkManager[800]: <info>  [1708988764.7474] device (wlan0): supplicant interface state: disconnected -> inactive
Feb 27 00:06:04 pi-ager NetworkManager[800]: <info>  [1708988764.7474] device (p2p-dev-wlan0): supplicant management interface state: disconnected -> inactive

The device states with 'nmcli dev' is as follows:

DEVICE         TYPE      STATE                   CONNECTION 
wlan1          wifi      connected               PI_AGER_AP 
lo             loopback  connected (externally)  lo         
wlan0          wifi      disconnected         --         
p2p-dev-wlan0  wifi-p2p  disconnected         --         
p2p-dev-wlan1  wifi-p2p  disconnected         --         
eth0           ethernet  unavailable         --         

The problem persists until you restart NetworkManager. If I set up the system with the 32Bit OS-Lite version of Bookworm in the same way and run it on a Pi zero 2W, there are no problems.

Does anyone have an idea of what might be causing this error and how to fix it?

phylax2020 commented 3 months ago

Further research into this issue yielded the following results:

If there is no traffic over WLAN for a long period of time, the system decides to interrupt the WLAN0 connection. The connection remains interrupted and is not reactivated automatically. The minimum WLAN idle time is exactly 12 hours. The only way to get out of this state is to restart the NetworkManager.

wlan0-disconnect-period

In order to make this effect visible, I used a bash script that periodically checks the status of the WLAN connection every 2 minutes via crontab. If the WLAN connection is interrupted, a message is written to the journal and the NetworkManager is restarted.


#!/bin/bash
# restart NetworkManager when wlan0 disappeared

if [ "$(nmcli -g GENERAL.STATE dev show wlan0)" = "30 (disconnected)" ]; then
    echo "wlan0 disconnected" | systemd-cat
    systemctl restart NetworkManager
fi

Does anyone know where in the OS there is a timeout of exactly 12 hours that leads to this problem? As already reported, the WLAN power management is switched off and is therefore not a possible cause.

fwoomer commented 3 months ago

I'm experiencing the same problem.

However, it seems that I don't have to restart NetworkManager. I can just

sudo ifconfig wlan0 down

then

sudo ifconfig wlan0 up

And everything comes back and works properly again...until next time.

EDIT: To clarify, I haven't set up any access point or virtual WLANs or anything like that. Just a run of the mill install/setup. It just keeps randomly disconnecting.

I haven't been able to verify whether it's on a routine 12-hour cycle, or anything like that.

lurch commented 3 months ago

I know it's not quite what you're asking about (and I'm afraid I've never used AP-STA mode myself), but FYI https://www.raspberrypi.com/tutorials/host-a-hotel-wifi-hotspot/ suggests using a separate USB WiFi dongle in addition to the built-in WiFi interface.

phylax2020 commented 3 months ago

The commands: sudo ifconfig wlan0 down followed by sudo ifconfig wlan0 up don't work, wlan0 keeps disconnected:

wlan0-failed

However, my workaround with restarting NetworkManager works perfectly. The test was now also carried out with the following kernel version:

Linux pi-ager 6.1.73-v8+ #1726 SMP PREEMPT Wed Jan 24 15:02:30 GMT 2024 aarch64 GNU/Linux

I would be very interested to know whether the problem is in the Linux kernel or in modules in the kernel environment.

phylax2020 commented 2 months ago

There is an intersting thread that sheds some light on the problem with concurrent STA and AP mode on the RPi 5. The RPi 5 uses the Infinon CYW43455 wireless chip and in that thread is shown, when STA mode fails after a while outputting the same error messages seen on my Raspberry Pi 5 system. In summary, the firmware for this wireless chip is faulty:

https://community.infineon.com/t5/AIROC-Wi-Fi-and-Wi-Fi-Bluetooth/CYW43455-STA-mode-fails-for-DFS-enabled-channels-in-concurrent-STA-and-AP-mode/td-p/340650

Clownfish33 commented 1 month ago

Not just WIFI. I have my pi5 connected to a router via Ethernet and get the same disconnect after a period and of inactivity. I use the pi to run a remote observatory so this is very unacceptable as I now have to go to the observatory to restart the pi each night. Looks like I need to revert back to a pi4.

lurch commented 4 weeks ago

@Clownfish33 Is it possible that your problem is with your router, or some kind of incompatibility between your router and your Pi? I've had a Pi 5 connected via Ethernet for several months (using a simple Netgear gigabit switch), and never had a single connectivity problem.

Clownfish33 commented 4 weeks ago

@Clownfish33 “Is it possible that your problem is with your router, or some kind of incompatibility between your router and your Pi?”

I solved the problem, and it wasn’t the network router or cables. I removed my NVME hat and SSD card and put the normal SD card back in. Voila the disconnect issue after a 12 hour idle went away.

My SSD card was an exact copy of the SD card. I swapped them back again, and the problem returned. It only occurred when I boot from the SSD card.

JamesH65 commented 4 weeks ago

A common culprit here would be power supply. Although make sure your OS is up to date, there have been improvements in there too.