Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

´error beacon valid´ error messages in AP mode #241

Open
henkv1 opened this issue Oct 19, 2024 · 18 comments
Open

´error beacon valid´ error messages in AP mode #241

henkv1 opened this issue Oct 19, 2024 · 18 comments

Comments

@henkv1
Copy link

henkv1 commented Oct 19, 2024

AP mode is really stable now and the connection speed is also fine, but I still observe a lot of the following error messages in the kernel log:

[533480.635435] rtw_8821cu 1-1.2.1:1.0: error beacon valid
[533480.635632] rtw_8821cu 1-1.2.1:1.0: failed to download drv rsvd page
[533480.635643] rtw_8821cu 1-1.2.1:1.0: failed to download beacon
[533714.828043] rtw_8821cu 1-1.2.1:1.0: error beacon valid
[533714.828237] rtw_8821cu 1-1.2.1:1.0: failed to download drv rsvd page
[533714.828247] rtw_8821cu 1-1.2.1:1.0: failed to download beacon
[534543.260394] rtw_8821cu 1-1.2.1:1.0: error beacon valid
[534543.260586] rtw_8821cu 1-1.2.1:1.0: failed to download drv rsvd page
[534699.420892] rtw_8821cu 1-1.2.1:1.0: error beacon valid
[534699.421090] rtw_8821cu 1-1.2.1:1.0: failed to download drv rsvd page
[534855.584947] rtw_8821cu 1-1.2.1:1.0: error beacon valid
[534855.585145] rtw_8821cu 1-1.2.1:1.0: failed to download drv rsvd page
[534855.585155] rtw_8821cu 1-1.2.1:1.0: failed to download beacon
[535371.892880] rtw_8821cu 1-1.2.1:1.0: error beacon valid
[535371.893079] rtw_8821cu 1-1.2.1:1.0: failed to download drv rsvd page
[535371.893090] rtw_8821cu 1-1.2.1:1.0: failed to download beacon

The messages also appear when there is (almost) no traffic and it does not seem to affect stability and/or performance.

@morrownr
Copy link
Collaborator

Hi @henkv1

dubhater is likely busy continuing to get the new drivers for rtl8812au and rtl8821/11au in the kernel.

@dubhater
Copy link
Collaborator

Indeed. I can tell you what we already knew: the beacon has to be updated every now and then (rtw_ops_set_tim) and sometimes this fails. Maybe it's a timing problem?

@henkv1
Copy link
Author

henkv1 commented Oct 21, 2024

I opened this ticket, because it's the last remaining issue I have with this driver. My AP is running very stable for some time now. This is a great achievement, so thank you all who worked hard to make this happen!
I don't think these messages have a negative impact on the performance and stability, but if someone knows what might cause this, maybe we can fix it. If not, maybe it's better to suppress the warnings, so they do not flood the kernel log.

@morrownr
Copy link
Collaborator

@henkv1

You mentioned this happens with AP mode. Do you know if it happens in any other mode and which one of the rtw88 drivers is the one in use in this case?

I ask just to document the issue for future reference.

@henkv1
Copy link
Author

henkv1 commented Oct 21, 2024

I've seen this on rtw_8822bu, rtw_8821cu and rtw_8822cu on both 5GHz and 2.4GHz in AP mode. I don't use other modes, so I don't know if this happens in other modes as well. But I will try to see if I can reproduce this in other modes.
The hardware I use is a Raspberry Pi 3b and a Raspberry Pi 4b. Both 64bit ArchLinux Arm.

@morrownr
Copy link
Collaborator

@henkv1

FYI: dubhater merged a patch this morning that appears to shut down the messages you are seeing but it will provide a message that may be more meaningful for now. You might want to pull it and see.

Overall, it is great to see you report how well AP mode working these days. Does your report include all 3 of the chips you listed above?

@henkv1
Copy link
Author

henkv1 commented Oct 22, 2024

Yes, all 3 run pretty well with the latest code. I've had some performance issues with rtw_8822bu in the past, but it looks like that is solved too.

@morrownr
Copy link
Collaborator

That is really good news. Having solid drivers in kernel 6.12, the probable next LTS kernel, is good news. I was hoping the new drivers for rtl8812au and rtl8821/11au would be in kernel 6.12 but that did not work out but they are coming soon. I wonder if Linus would authorize a late merge? Does hurt to ask and if Ping-Ke supports it, I can see it happening.

Side note: A company sent me an adapter based on the rtl8852/32cu chip along with the most up to date out-of-kernel driver so I am evaluating that. I was hoping we could get beyond the out-of-kernel drivers but for WiFi 6 Realtek usb chips, it seems to be out-of-kernel or nothing for a LONG time. In the words of Larry Finger "those drivers are a pile of crap."

However, thanks to the work of dubhater and some others, USB WiFi is in better shape on Linux than it has ever been and it is continuing to get better. I sure wish someone would release an adapter based on the mt7925 chip. It sucks having a driver but no toy to play with.

@Simon566
Copy link

my 8812au crashes regularly in AP mode , every 2 days or so

Okt 29 16:51:48 odroid-h3 kernel: rtw_8812au 2-1:1.0: error beacon valid
Okt 29 16:51:48 odroid-h3 kernel: rtw_8812au 2-1:1.0: failed to download drv rsvd page
Okt 29 16:53:20 odroid-h3 kernel: rtw_8812au 2-1:1.0: error beacon valid
Okt 29 16:53:20 odroid-h3 kernel: rtw_8812au 2-1:1.0: failed to download drv rsvd page
Okt 29 16:53:20 odroid-h3 kernel: rtw_8812au 2-1:1.0: failed to download beacon
Okt 29 16:57:07 odroid-h3 kernel: rtw_8812au 2-1:1.0: error beacon valid
Okt 29 16:57:07 odroid-h3 kernel: rtw_8812au 2-1:1.0: failed to download drv rsvd page
Okt 29 17:00:01 odroid-h3 CRON[326044]: pam_unix(cron:session): session opened for user root(uid=0)>
Okt 29 17:00:01 odroid-h3 CRON[326045]: (root) CMD (/etc/dns_monitor.sh)
Okt 29 17:00:03 odroid-h3 CRON[326044]: pam_unix(cron:session): session closed for user root
Okt 29 17:02:01 odroid-h3 su[320535]: pam_unix(su:session): session closed for user simon
Okt 29 17:02:39 odroid-h3 kernel: rtw_8812au 2-1:1.0: failed to allocate rx_skb
Okt 29 17:02:40 odroid-h3 kernel: rtw_8812au 2-1:1.0: failed to allocate rx_skb
Okt 29 17:02:49 odroid-h3 kernel: rtw_8812au 2-1:1.0: failed to send h2c command
Okt 29 17:02:49 odroid-h3 kernel: rtw_8812au 2-1:1.0: failed to send h2c command
Okt 29 17:02:49 odroid-h3 kernel: rtw_8812au 2-1:1.0: failed to send h2c command
Okt 29 17:02:57 odroid-h3 kernel: rtw_8812au 2-1:1.0: failed to send h2c command
Okt 29 17:02:57 odroid-h3 kernel: rtw_8812au 2-1:1.0: failed to send h2c command
Okt 29 17:03:05 odroid-h3 kernel: rtw_8812au 2-1:1.0: failed to send h2c command
Okt 29 17:03:05 odroid-h3 kernel: rtw_8812au 2-1:1.0: failed to send h2c command

@dubhater
Copy link
Collaborator

@Simon566 I assume it stops working? Clients can't connect to it anymore? If that's the case, try the patch here: #205 (comment)

@Simon566
Copy link

yes it stops working .....

should the patch normally fix it ? i will give it a shot then. Whats wrong in the code ?

@Simon566
Copy link

Simon566 commented Oct 29, 2024

@dubhater how to apply the patch to a out of tree rtw88 repo ? patch -p1 doesnt seem right or are you really trying to apply to kernel sources ? then Hunk #1 #2 are failing for 6.11.5

@dubhater
Copy link
Collaborator

The patch should fix it. The problem is described here: https://lore.kernel.org/linux-wireless/baca0d5d-072e-4003-ab4a-ecc524d6b89b@gmail.com/

For me, patch -i alloc_skb.diff.txt applies it, no -p needed. It's meant for this repository.

@morrownr
Copy link
Collaborator

@dubhater

Idea: Let me apply the patch to this repo so that @Simon566 and others can just use git pull to update. What do you think? This repo is for testing.

@dubhater
Copy link
Collaborator

@morrownr Okay, yes.

@Simon566
Copy link

i was able to apply the patch , but wifi broke up this night. without any special error message or so .... see here:

Okt 30 03:06:23 odroid-h3 kernel: rtw_8812au 1-2:1.0: failed to download drv rsvd page
Okt 30 03:06:23 odroid-h3 kernel: rtw_8812au 1-2:1.0: error beacon valid
Okt 30 03:06:23 odroid-h3 kernel: rtw_8812au 1-2:1.0: failed to download drv rsvd page
Okt 30 03:07:36 odroid-h3 kernel: rtw_8812au 1-2:1.0: error beacon valid
Okt 30 03:07:36 odroid-h3 kernel: rtw_8812au 1-2:1.0: failed to download drv rsvd page
Okt 30 03:07:36 odroid-h3 kernel: rtw_8812au 1-2:1.0: error beacon valid
Okt 30 03:07:36 odroid-h3 kernel: rtw_8812au 1-2:1.0: failed to download drv rsvd page
Okt 30 03:07:54 odroid-h3 kernel: rtw_8812au 1-2:1.0: error beacon valid
Okt 30 03:07:54 odroid-h3 kernel: rtw_8812au 1-2:1.0: failed to download drv rsvd page
Okt 30 03:07:54 odroid-h3 kernel: rtw_8812au 1-2:1.0: error beacon valid
Okt 30 03:07:54 odroid-h3 kernel: rtw_8812au 1-2:1.0: failed to download drv rsvd page
Okt 30 03:09:17 odroid-h3 kernel: rtw_8812au 1-2:1.0: error beacon valid
Okt 30 03:09:17 odroid-h3 kernel: rtw_8812au 1-2:1.0: failed to download drv rsvd page
Okt 30 03:09:17 odroid-h3 kernel: rtw_8812au 1-2:1.0: error beacon valid
Okt 30 03:09:17 odroid-h3 kernel: rtw_8812au 1-2:1.0: failed to download drv rsvd page
Okt 30 03:09:22 odroid-h3 kernel: rtw_8812au 1-2:1.0: error beacon valid
Okt 30 03:09:22 odroid-h3 kernel: rtw_8812au 1-2:1.0: failed to download drv rsvd page
Okt 30 03:09:23 odroid-h3 kernel: rtw_8812au 1-2:1.0: error beacon valid
Okt 30 03:09:23 odroid-h3 kernel: rtw_8812au 1-2:1.0: failed to download drv rsvd page
Okt 30 03:09:23 odroid-h3 kernel: rtw_8812au 1-2:1.0: error beacon valid
Okt 30 03:09:23 odroid-h3 kernel: rtw_8812au 1-2:1.0: failed to download drv rsvd page
Okt 30 03:09:23 odroid-h3 kernel: rtw_8812au 1-2:1.0: error beacon valid
Okt 30 03:09:23 odroid-h3 kernel: rtw_8812au 1-2:1.0: failed to download drv rsvd page
Okt 30 03:09:48 odroid-h3 dnsmasq-dhcp[1741]: Fehler beim Senden des DHCP-Pakets an 10.10.15.138: Die Ressource ist zur Zeit nicht verfügbar
Okt 30 03:09:49 odroid-h3 dnsmasq-dhcp[1741]: Fehler beim Senden des DHCP-Pakets an 10.10.15.157: Die Ressource ist zur Zeit nicht verfügbar
Okt 30 03:09:49 odroid-h3 dnsmasq-dhcp[1741]: Fehler beim Senden des DHCP-Pakets an 10.10.15.238: Die Ressource ist zur Zeit nicht verfügbar
Okt 30 03:09:51 odroid-h3 dnsmasq-dhcp[1741]: Fehler beim Senden des DHCP-Pakets an 10.10.13.188: Die Ressource ist zur Zeit nicht verfügbar
Okt 30 03:09:52 odroid-h3 dnsmasq-dhcp[1741]: Fehler beim Senden des DHCP-Pakets an 10.10.15.157: Die Ressource ist zur Zeit nicht verfügbar
Okt 30 03:09:52 odroid-h3 dnsmasq-dhcp[1741]: Fehler beim Senden des DHCP-Pakets an 10.10.15.238: Die Ressource ist zur Zeit nicht verfügbar
Okt 30 03:09:55 odroid-h3 dnsmasq-dhcp[1741]: Fehler beim Senden des DHCP-Pakets an 10.10.15.157: Die Ressource ist zur Zeit nicht verfügbar
Okt 30 03:09:55 odroid-h3 dnsmasq-dhcp[1741]: Fehler beim Senden des DHCP-Pakets an 10.10.15.238: Die Ressource ist zur Zeit nicht verfügbar
Okt 30 03:09:56 odroid-h3 dnsmasq-dhcp[1741]: Fehler beim Senden des DHCP-Pakets an 10.10.15.138: Die Ressource ist zur Zeit nicht verfügbar
Okt 30 03:09:58 odroid-h3 dnsmasq-dhcp[1741]: Fehler beim Senden des DHCP-Pakets an 10.10.15.157: Die Ressource ist zur Zeit nicht verfügbar
Okt 30 03:09:58 odroid-h3 dnsmasq-dhcp[1741]: Fehler beim Senden des DHCP-Pakets an 10.10.15.238: Die Ressource ist zur Zeit nicht verfügbar

the first indicator was that dhcp requests were not delivered or so , but the devices continued working when i look at my home assistant logfiles. but roughly 30mins later the data logging via wlan stopped completely ( maybe the devices lost their dhcp leases)

i wasnt able to log my handy into the wlan this morning.

could recover by:
ifdown wlx24050f9d9b4b; rmmod rtw_8812au; rmmod rtw_usb; modprobe rtw_8812au; ifup wlx24050f9d9b4b

a simple restart of hostapd before didnt solve the issue

@Simon566
Copy link

here is the hostapd failed restart log , maybe it helps ( please also read post above)

Okt 30 06:42:42 odroid-h3 python[1666]: 2024-10-30 06:42:42,737 [web_server.INFO] Calling script restart wlan. User {'ip': '10.10.202.3'}
Okt 30 06:42:42 odroid-h3 python[1666]: 2024-10-30 06:42:42,737 [script_server.execution_service.INFO] Calling script #802: /root/script-server/restart-wlan.sh
Okt 30 06:42:42 odroid-h3 python[1666]: 2024-10-30 06:42:42,741 [tornado.access.INFO] 200 POST /executions/start (10.10.202.3) 40.87ms
Okt 30 06:42:42 odroid-h3 python[1666]: 2024-10-30 06:42:42,840 [tornado.access.INFO] 101 GET /executions/io/802 (10.10.202.3) 1.13ms
Okt 30 06:42:42 odroid-h3 python[1666]: 2024-10-30 06:42:42,853 [script_server.audit_utils.WARNING] Could not get hostname for 10.10.202.3
Okt 30 06:42:42 odroid-h3 python[1666]: 2024-10-30 06:42:42,865 [script_server.audit_utils.WARNING] Could not get hostname for 10.10.202.3
Okt 30 06:42:42 odroid-h3 systemd[1]: Stopping hostapd_8812.service - Hostapd IEEE 802.11 AP, IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator...
Okt 30 06:42:43 odroid-h3 kernel: rtw_8812au 1-2:1.0: error beacon valid
Okt 30 06:42:43 odroid-h3 kernel: rtw_8812au 1-2:1.0: failed to download drv rsvd page
Okt 30 06:42:43 odroid-h3 kernel: rtw_8812au 1-2:1.0: error beacon valid
Okt 30 06:42:43 odroid-h3 kernel: rtw_8812au 1-2:1.0: failed to download drv rsvd page
Okt 30 06:42:43 odroid-h3 kernel: rtw_8812au 1-2:1.0 wlx24050f9d9b4b: left allmulticast mode
Okt 30 06:42:43 odroid-h3 kernel: rtw_8812au 1-2:1.0 wlx24050f9d9b4b: left promiscuous mode
Okt 30 06:42:43 odroid-h3 kernel: br-guest: port 2(wlx24050f9d9b4b) entered disabled state
Okt 30 06:42:44 odroid-h3 systemd[1]: hostapd_8812.service: Deactivated successfully.
Okt 30 06:42:44 odroid-h3 systemd[1]: Stopped hostapd_8812.service - Hostapd IEEE 802.11 AP, IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator.
Okt 30 06:42:44 odroid-h3 systemd[1]: hostapd_8812.service: Consumed 2min 38.128s CPU time.
Okt 30 06:42:45 odroid-h3 kernel: rtw_8812au 1-2:1.0: failed to get tx report from firmware
Okt 30 06:42:45 odroid-h3 systemd[1]: Starting hostapd_8812.service - Hostapd IEEE 802.11 AP, IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator...
Okt 30 06:42:45 odroid-h3 kernel: br-guest: port 2(wlx24050f9d9b4b) entered blocking state

@dubhater
Copy link
Collaborator

dubhater commented Nov 1, 2024

@morrownr On second thought, let's not apply that patch. There's another problem in the RX code. You can see it by running the iperf3 client with -R --udp -b 0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants