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

Radxa Zero-3W: Lot of RX packets dropped on wifi #85

Closed
gyscos opened this issue Mar 11, 2025 · 6 comments
Closed

Radxa Zero-3W: Lot of RX packets dropped on wifi #85

gyscos opened this issue Mar 11, 2025 · 6 comments

Comments

@gyscos
Copy link

gyscos commented Mar 11, 2025

Hi!

Currently running a radxa zero-3W with the latest kernel and firmware from this repo, however I get a lot of RX packet dropped on the wifi interface.

wlan0: flags=-28605<UP,BROADCAST,RUNNING,MULTICAST,DYNAMIC>  mtu 1500
        inet 192.168.1.197  netmask 255.255.255.0  broadcast 192.168.1.255
        ether 98:03:cf:d2:2d:e6  txqueuelen 1000  (Ethernet)
        RX packets 73574  bytes 12901542 (12.3 MiB)
        RX errors 0  dropped 12762  overruns 0  frame 0
        TX packets 26942  bytes 4340401 (4.1 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Here is the part from lshw about the wifi:

  *-mmc2
       description: MMC Host
       physical id: a
       logical name: mmc2
     *-device
          description: SDIO Device
          physical id: 390b
          bus info: mmc@2:390b
          serial: 0
          capabilities: sdio
        *-wifi:0
             description: Wireless interface
             physical id: 1
             bus info: mmc@2:390b:1
             logical name: mmc2:390b:1
             logical name: wlan0
             serial: 98:03:cf:d2:2d:e6
             capabilities: wireless ethernet physical
             configuration: broadcast=yes driver=aicwf_sdio driverversion=6.14.0-rc4 ip=192.168.1.197 multicast=yes wireless=IEEE 802.11
        *-wifi:1
             description: Wireless interface
             physical id: 2
             bus info: mmc@2:390b:2
             logical name: mmc2:390b:2
             capabilities: wireless
             configuration: wireless=IEEE 802.11

Any idea what could be causing this?

I was curious if the linux-firmware package here includes the latest changes from https://github.com/radxa-pkg/aic8800?

@gyscos gyscos changed the title AIC8800 drivers Lot of RX packets dropped on wifi Mar 11, 2025
@warpme
Copy link
Owner

warpme commented Mar 11, 2025

Hi,
aic8800 driver code + firmware was not updated by vendor since 9 months.
This crappy code has a lot of issues and it is really shame radxa is using this junk as wifi on their so nice boards.....
I contacted radxa many times about quality of aic8800 code. They - the same like me - are 100% dependent on aicsemi.
aicsemi seems totally deaf to any issue reports so I'm afraid not much can be done with this :-(

@warpme warpme closed this as completed Mar 11, 2025
@gyscos gyscos changed the title Lot of RX packets dropped on wifi Radxa Zero-3W: Lot of RX packets dropped on wifi Mar 11, 2025
@gyscos
Copy link
Author

gyscos commented Mar 13, 2025

Thanks for the quick answer!

I do think the linux-firmware package from this repo has worse performance with AIC8800 than what radxa provides in the repo I linked above.

Running up-to-date miniarch, there must be some packet rejection issue because while I can ssh, iperf3 reports a speed of 0.0 between the radxa-zero3w and another device on the network. Reducing the mtu on the interface has some random positive impact (sometimes a positive speed is detected), but very slight and not always reproducible.

By comparison, in the same location, the "official" debian bullseye image with aic8800-sdio-dkms reports ~5-10Mb/s (this is still way less than a raspberry pi Zero W in the same location, which reports 40-50Mb/s, though maybe the raspberry pi has a better antenna).

I'll see if I can use the "official" deb dkms package in miniarch, and if it helps. I'm not familiar with overlays and device tree much though so I might mess things up :(

EDIT: Well it seems dkms might be broken: the /usr/lib/modules/6.14.0-rc4/build/scripts/basic/fixdep file, which is from the linux-aarch64-headers package, is a x86_64 binary, and not an aarch64 one. Same for modpost.

I tried copying the fixdep file from the bullseye image, and at least the dkms install command went further, crashing when trying to call modpost. I then tried copying the modpost file over from the bullseye image, but it must have been a different version because I now get /usr/lib/modules/6.14.0-rc4/build/scripts/mod/modpost: invalid option -- 'M'.

Is it possible to rebuild the linux-aarch64-headers package, but with aarch64 binaries instead of x86_64 ones? Also, I am curious - how are you building the linux-firmware package? It must get some aic8800 drivers, but I don't think these are upstreamed yet. Are you including the same ones as in the radxa-pkg/aic8800 repository? They had to patch it to work with newer kernels, did you also have to independently patch it? Or are you using a different driver source?

@warpme
Copy link
Owner

warpme commented Mar 14, 2025

By comparison, in the same location, the "official" debian bullseye image with aic8800-sdio-dkms reports ~5-10Mb/s (this is still way less than a raspberry pi Zero W in the same location, which reports 40-50Mb/s, though maybe the raspberry pi has a better antenna).

this is very interesting.
May you pls provide me link to sources of this "official" package?
I can compare sources + fw - maybe there is some magic changes making debian code working better?

@warpme warpme reopened this Mar 14, 2025
@warpme
Copy link
Owner

warpme commented Mar 14, 2025

Is it possible to rebuild the linux-aarch64-headers package, but with aarch64 binaries instead of x86_64 ones?

I'm already providing kernel-header package suitable (in theory) to build extra/out-of-tree kenrel modules.
Key issue is that kernel build scripts included in kernel-header package are built by kernel infra for x86 host.
Those binaries (included in kernel-headers package) dkms tries to use yours aarch64 machine (as you are building natively with yours dmks). As they are build for x86_64 (on/by my cross-compiling host) - yours dkms process fails....

All this shows to me like linux kernel building infra is not prepared to build correct linux headers when user (me) cross-compiling kernel-headers.

Solving this is a bit beyond of mine project :-(

Probably simples way will be to:
-download kernel source code to your machine,
-run make modules_prepare to construct complete /scripts
-move them into /lib/modules/uname -r/build``

@warpme
Copy link
Owner

warpme commented Mar 16, 2025

I uploaded kernel packages with most recent radxa aic8800 fixes.
With this indeed i see improvement with transfers stability:

before (last colon is wifi 5G Mbps throughput):

131072  87380  87380    1.04       52.40
131072  87380  87380    1.11      129.59
131072  87380  87380    1.13       84.85
131072  87380  87380    1.00        0.00
131072  87380  87380    1.09       73.88
131072  87380  87380    1.09      122.56
131072  87380  87380    1.10      136.01
131072  87380  87380    1.17      142.33
131072  87380  87380    1.10      127.69
131072  87380  87380    1.12      119.76
131072  87380  87380    1.08       70.80
131072  87380  87380    1.20      118.08
131072  87380  87380    1.11      116.58
131072  87380  87380    1.13      114.24
131072  87380  87380    1.12      124.49
131072  87380  87380    1.07       61.91
131072  87380  87380    1.10      124.23
131072  87380  87380    1.14      106.83
131072  87380  87380    1.03       28.98
131072  87380  87380    1.07      101.39
131072  87380  87380    1.11       77.39
131072  87380  87380    1.19       20.00
131072  87380  87380    1.10      102.26
131072  87380  87380    1.08       63.25
131072  87380  87380    1.08       65.42
131072  87380  87380    1.23       99.36
131072  87380  87380    1.15       63.69
131072  87380  87380    1.31       28.58
131072  87380  87380    1.08      118.31
131072  87380  87380    1.16      100.30   

after:

131072  87380  87380    1.07      142.79
131072  87380  87380    1.12      172.30
131072  87380  87380    1.10      123.85
131072  87380  87380    1.09      108.20
131072  87380  87380    1.15      156.44
131072  87380  87380    1.08      114.60
131072  87380  87380    1.09      151.54
131072  87380  87380    1.10      169.80
131072  87380  87380    1.14      147.41
131072  87380  87380    1.09      157.08
131072  87380  87380    1.10      155.22
131072  87380  87380    1.10      166.01
131072  87380  87380    1.10      156.17
131072  87380  87380    1.07      167.89
131072  87380  87380    1.10      109.33
131072  87380  87380    1.16      135.97
131072  87380  87380    1.12      147.48
131072  87380  87380    1.09      150.73
131072  87380  87380    1.09      174.36
131072  87380  87380    1.10      151.21
131072  87380  87380    1.07      156.42
131072  87380  87380    1.09      165.90
131072  87380  87380    1.15      154.92
131072  87380  87380    1.07      163.48
131072  87380  87380    1.12      167.01
131072  87380  87380    1.08      167.43
131072  87380  87380    1.12      174.35
131072  87380  87380    1.11      164.38
131072  87380  87380    1.13      148.07
131072  87380  87380    1.10      145.60
131072  87380  87380    1.14      167.16
131072  87380  87380    1.14      155.89
131072  87380  87380    1.13      146.06
131072  87380  87380    1.07      139.43
131072  87380  87380    1.10      150.22
131072  87380  87380    1.10      155.48
131072  87380  87380    1.13      167.76
131072  87380  87380    1.12      162.42
131072  87380  87380    1.07      141.06
131072  87380  87380    1.09      126.93
131072  87380  87380    1.06      132.58
131072  87380  87380    1.04       76.55
131072  87380  87380    1.08      147.42
131072  87380  87380    1.10      132.23
131072  87380  87380    1.15      158.65
131072  87380  87380    1.16      163.89
131072  87380  87380    1.14      155.22
131072  87380  87380    1.15      129.36
131072  87380  87380    1.12      149.21
131072  87380  87380    1.13      143.60
131072  87380  87380    1.10      153.71
131072  87380  87380    1.18      154.74
131072  87380  87380    1.07       99.11
131072  87380  87380    1.09      156.57
131072  87380  87380    1.13      152.15
131072  87380  87380    1.08      159.73
131072  87380  87380    1.11      157.77
131072  87380  87380    1.11      162.45
131072  87380  87380    1.10      161.96
131072  87380  87380    1.19      167.08
131072  87380  87380    1.09      123.85
131072  87380  87380    1.14      124.78
131072  87380  87380    1.14      142.93
131072  87380  87380    1.10      140.13
131072  87380  87380    1.12      134.33
131072  87380  87380    1.16      126.91
131072  87380  87380    1.11      135.11
131072  87380  87380    1.14      137.53
131072  87380  87380    1.15      137.20
131072  87380  87380    1.14      157.91
131072  87380  87380    1.13      158.63

@warpme
Copy link
Owner

warpme commented Mar 23, 2025

Closing as fixed.

@warpme warpme closed this as completed Mar 23, 2025
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

2 participants