Openwrt 23.05.0 (x86): very low wifi performance compared to 22.03.5

In the latest openwrt 23.05.0 I observed a major issue with wifi performance, especially in download.

Same hardware, same config. Openwrt running as wifi acces point, Encryption: WPA2 PSK (CCMP), Band 2.4 Ghz, hostapd-openssl installed on all versions.

Hardware : X86-64bit minipc, celeron N4100 4 CPU, 4 GB Ram, SSD harddisk, usb wifi dongle : 148f:5572 Ralink 802.11 n WLAN
Internet connection: fiber optics 1GB down 700MB up

the client computer is running windows 10 x64, tests have been done while this client's machine always at the same spot, same distance from openwrt AP, a few walls between AP and client, result as follow of different openwrt versions :

  • openwrt 23.05.0: wifi perf ~ fluctuate between 0.4 - 1 MB download / 10 MB upload

  • openwrt 22.03.5: wifi perf ~ 11 MB download / 11.7 MB upload

  • openwrt 21.02.5: wifi perf ~ 11.5 MB download / 12 MB upload

What were the speeds when you were running on 22.03.5?

Have you tested ethernet to make sure it is working at the expected speeds?

FWIW, USB wifi dongles rarely have good performance, in general... you'll be much better off with an actual AP.

2 Likes

The speed in 22.03.05 was like I wrote : 11 MB download or 88 Mbps (I tested them all tonight)
Yep, the ethernet speed is indeed as expected, about ~960Mbps download

I know that usb dongle are not ideal, but in my case this particular dongle was working very well, very stable with decent speed for my own use. But now, with openwrt 23.05.0, the download speed is divided by a factor 10 at least...

I tested also 23.05.0 in vmware, with a fresh downoaded image and it's the same story.
For now, I haven't find the cause.

Next step is going back to 22.03.05

Sorry... I missed that initially. Thanks for re-stating.

Good. So we can say conclusively that it is a wifi issue.

In the earlier tests, are you running bare metal, or is OpenWrt a VM on this device?

Let's take a look at your config, even though it sound like it's more likely an issue of the wifi drivers.

Please connect to your OpenWrt device using ssh and copy the output of the following commands and post it here using the "Preformatted text </> " button:
grafik
Remember to redact passwords, MAC addresses and any public IP addresses you may have:

ubus call system board
cat /etc/config/network
cat /etc/config/wireless
cat /etc/config/dhcp
cat /etc/config/firewall

thanks

It's late here I'm going to sleep...
I'll see that maybe tomorrow

Looks like you are one of those who uses 40 MHz channel on 2.4 GHz band, right? Maybe that is the reason? Try to investigate if 40 Mhz was actually enabled and not dropped back to 20 MHz. I see no performance drop on x86.

Yes, I use 40Mhz channel. I tried setting it to 20Mhz, but it changed nothing, even after a reboot.

Tonight, I've spend another evening to reinstall 23.05.0 from scratch with default openwrt config, activating wifi and testing downloading something : I'm caped to about 1 ~ 1.3 MB while downloading. Rebooted to previous 22.03.05 (in a usb stick) all is back to normal @ about 11 MB.

There is definitly something wrong with 23.05.0 and the wifi card I'm using (not saying it's a general wifi issue, but maybe somehow related to kmod-rt2x00-usb, kmod-rt2x00-lib, kmod-rt2800-usb, kmod-rt2800-lib, rt2800-usb-firmware...)

Just discovered another issue with squid (in 23.05.0) when starting or stopping the service:

Tue Oct 24 00:28:10 2023 kern.info kernel: [ 1638.336414] squid[4325]: segfault at 0 ip 00007ff5b99723db sp 00007ffc8b0190d8 error 4 in libc.so[7ff5b9930000+4c000]
Tue Oct 24 00:28:10 2023 kern.info kernel: [ 1638.336439] Code: 43 04 f0 0f b1 33 44 8b 43 08 48 89 e9 31 d2 48 89 df 41 80 f0 80 e8 da d6 ff ff f0 ff 4b 04 a9 fb ff ff ff 74 c1 5a 5b 5d c3 <8b> 17 89 d0 25 ff ff ff 7f 3d ff ff ff 7f 74 17 3d fe ff ff 7f 74

to follow up issues on wifi, I just also discovered this in the log:

> Tue Oct 24 02:25:45 2023 kern.err kernel: [  319.441681] ieee80211 phy0: rt2x00usb_vendor_request: Error - Vendor Request 0x07 failed for offset 0x1130 with error -110
> Tue Oct 24 02:25:45 2023 kern.err kernel: [  319.561676] ieee80211 phy0: rt2x00usb_vendor_request: Error - Vendor Request 0x07 failed for offset 0x1134 with error -110

then wifi doesn't respond anymore, even if I restart the interface / radio interface. Only come back after a reboot. This never happened in 21.02.5 (don't know for 22.03.5, I dont have used it much)

1 Like

it seems that when there is no or little traffic, the error "Error - Vendor Request 0x07 failed for offset" doesn't trigger. But when there is enough traffic (a simple speed test on fast.com for ex.), surely enough the error appear, each time.

I searched a lot on the web for this error, some says it's related to the card's firmware : I've checked (md5sum) all firmwares since openwrt 21, they're all the same binary files.
Others people says it may be related to wifi power management, which is already off for my device.

I don't know what to thinks about this : pathetic performance, crash... all this when this usb wifi device was perfectly working with openwrt 21.

For now, I stopped researching a solution for theses problems when I found an old MR-3020 v1 device in my stuff. I managed to build an image of openwrt v21.02.7 for it, not without difficulties (4MB flash !)

I use it as a lan-wlan bridge (dumb access point) and you may be surprised that it even support WPA3 (sae) and works nicely with very decent speed and stability for it's age...
I would like to add extroot to it via usb but there is no more room left in flash (the overlay is 320k with 80k left remaining)

One thing I didn't manage to supress to gain space is IPv6 : how do you remove it entirely ? how to recompile the kernel without IPv6 ?

I dowloaded the sdk and started building from scratch but I need some guidance to remove IPv6 and integrate the result into a flashable image.

Could you guys can help me on this ?

3 posts were split to a new topic: Low Wifi performance on Netgear R6220 and Netgear WNDR3700

I made a few modification to my setup to test wifi performance issues with 23.05.0. I created a few partitions on my ssd and put openwrt v22.03.5 and v 23.05.0 in each, making it very easy to dual boot as I want. I also made room for Opnsense, in case issue with wifi persist.
The setup is the same on both versions, the 23.05.0 just had a few modifications coz the interface name went from wlan0 to phy0-ap0.

I can confirm without a doubt that wifi performance on 23.05.0 is about 7x to 14x worse (while downloading, strange : upload is not so much affected)

I've ordered a few wifi usb dongle to test if this related to my current one ( ID 148f:5572 Ralink 802.11 n WLAN) I will try MT7921, MT7612, MT7601 as soon as possible. I'll post the result and conclusion here.

I'm facing the same issues on v23.05.2. Oddly, after messing with the encryption settings by setting WPA2/AES back to Auto and back again to WPA2/AES, it fixed the issues on my iphone but my laptop. Previously all devices we severey throttled to less than 10mbit. Reboots, resets, etc. have yielded nothing. Stock firmware works as expected.

root@OpenWrt:~# ubus call system board
{
        "kernel": "5.15.137",
        "hostname": "OpenWrt",
        "system": "MediaTek MT7621 ver:1 eco:3",
        "model": "Netgear R6850",
        "board_name": "netgear,r6850",
        "rootfs_type": "squashfs",
        "release": {
                "distribution": "OpenWrt",
                "version": "23.05.2",
                "revision": "r23630-842932a63d",
                "target": "ramips/mt7621",
                "description": "OpenWrt 23.05.2 r23630-842932a63d"
        }
}
root@OpenWrt:~# cat /etc/config/network

config interface 'loopback'
        option device 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config globals 'globals'
        option ula_prefix 'fd5c:9ca3:2373::/48'

config device
        option name 'br-lan'
        option type 'bridge'
        list ports 'lan1'
        list ports 'lan2'
        list ports 'lan3'
        list ports 'lan4'

config interface 'lan'
        option device 'br-lan'
        option proto 'static'
        option ipaddr '192.168.1.1'
        option netmask '255.255.255.0'
        option ip6assign '60'

config interface 'wan'
        option device 'wan'
        option proto 'dhcp'
        option broadcast '1'

config interface 'wan6'
        option device 'wan'
        option proto 'dhcpv6'

root@OpenWrt:~# cat /etc/config/wireless

config wifi-device 'radio0'
        option type 'mac80211'
        option path '1e140000.pcie/pci0000:00/0000:00:01.0/0000:02:00.0'
        option channel '6'
        option band '2g'
        option htmode 'HT40'
        option cell_density '0'
        option country 'US'

config wifi-iface 'default_radio0'
        option device 'radio0'
        option network 'lan'
        option mode 'ap'
        option ssid 'NETGEAR67'
        option encryption 'psk2+ccmp'
        option short_preamble '0'
        option disassoc_low_ack '0'
        option key '???????????????'
        option wpa_disable_eapol_key_retries '1'
        option skip_inactivity_poll '1'
        option iw_qos_map_set '0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0'

config wifi-device 'radio1'
        option type 'mac80211'
        option path '1e140000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0'
        option channel '36'
        option band '5g'
        option htmode 'VHT80'
        option cell_density '0'
        option country 'US'

config wifi-iface 'default_radio1'
        option device 'radio1'
        option network 'lan'
        option mode 'ap'
        option ssid 'NETGEAR67-5G'
        option encryption 'psk2+ccmp'
        option short_preamble '0'
        option disassoc_low_ack '0'
        option key '????????????'
        option wpa_disable_eapol_key_retries '1'
        option skip_inactivity_poll '1'
        option iw_qos_map_set '0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0'
root@OpenWrt:~# cat /etc/config/dhcp

config dnsmasq
        option domainneeded '1'
        option boguspriv '1'
        option filterwin2k '0'
        option localise_queries '1'
        option rebind_protection '1'
        option rebind_localhost '1'
        option local '/lan/'
        option domain 'lan'
        option expandhosts '1'
        option nonegcache '0'
        option cachesize '1000'
        option authoritative '1'
        option readethers '1'
        option leasefile '/tmp/dhcp.leases'
        option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
        option nonwildcard '1'
        option localservice '1'
        option ednspacket_max '1232'
        option filter_aaaa '0'
        option filter_a '0'

config dhcp 'lan'
        option interface 'lan'
        option start '100'
        option limit '150'
        option leasetime '12h'
        option dhcpv4 'server'
        option dhcpv6 'server'
        option ra 'server'
        option ra_slaac '1'
        list ra_flags 'managed-config'
        list ra_flags 'other-config'

config dhcp 'wan'
        option interface 'wan'
        option ignore '1'

config odhcpd 'odhcpd'
        option maindhcp '0'
        option leasefile '/tmp/hosts/odhcpd'
        option leasetrigger '/usr/sbin/odhcpd-update'
        option loglevel '4'

root@OpenWrt:~# cat /etc/config/firewall

config defaults
        option input 'DROP'
        option output 'ACCEPT'
        option forward 'DROP'
        option synflood_protect '1'
        option drop_invalid '1'
        option flow_offloading '1'
        option flow_offloading_hw '1'

config zone
        option name 'lan'
        list network 'lan'
        option input 'ACCEPT'
        option output 'ACCEPT'
        option forward 'ACCEPT'

config zone
        option name 'wan'
        list network 'wan'
        list network 'wan6'
        option input 'DROP'
        option output 'ACCEPT'
        option forward 'DROP'
        option masq '1'
        option mtu_fix '1'

config forwarding
        option src 'lan'
        option dest 'wan'

config rule
        option name 'Allow-DHCP-Renew'
        option src 'wan'
        option proto 'udp'
        option dest_port '68'
        option target 'ACCEPT'
        option family 'ipv4'

config rule
        option name 'Allow-Ping'
        option src 'wan'
        option proto 'icmp'
        option icmp_type 'echo-request'
        option family 'ipv4'
        option target 'ACCEPT'

config rule
        option name 'Allow-IGMP'
        option src 'wan'
        option proto 'igmp'
        option family 'ipv4'
        option target 'ACCEPT'

config rule
        option name 'Allow-DHCPv6'
        option src 'wan'
        option proto 'udp'
        option dest_port '546'
        option family 'ipv6'
        option target 'ACCEPT'

config rule
        option name 'Allow-MLD'
        option src 'wan'
        option proto 'icmp'
        option src_ip 'fe80::/10'
        list icmp_type '130/0'
        list icmp_type '131/0'
        list icmp_type '132/0'
        list icmp_type '143/0'
        option family 'ipv6'
        option target 'ACCEPT'

config rule
        option name 'Allow-ICMPv6-Input'
        option src 'wan'
        option proto 'icmp'
        list icmp_type 'echo-request'
        list icmp_type 'echo-reply'
        list icmp_type 'destination-unreachable'
        list icmp_type 'packet-too-big'
        list icmp_type 'time-exceeded'
        list icmp_type 'bad-header'
        list icmp_type 'unknown-header-type'
        list icmp_type 'router-solicitation'
        list icmp_type 'neighbour-solicitation'
        list icmp_type 'router-advertisement'
        list icmp_type 'neighbour-advertisement'
        option limit '1000/sec'
        option family 'ipv6'
        option target 'ACCEPT'

config rule
        option name 'Allow-ICMPv6-Forward'
        option src 'wan'
        option dest '*'
        option proto 'icmp'
        list icmp_type 'echo-request'
        list icmp_type 'echo-reply'
        list icmp_type 'destination-unreachable'
        list icmp_type 'packet-too-big'
        list icmp_type 'time-exceeded'
        list icmp_type 'bad-header'
        list icmp_type 'unknown-header-type'
        option limit '1000/sec'
        option family 'ipv6'
        option target 'ACCEPT'

config rule
        option name 'Allow-IPSec-ESP'
        option src 'wan'
        option dest 'lan'
        option proto 'esp'
        option target 'ACCEPT'

config rule
        option name 'Allow-ISAKMP'
        option src 'wan'
        option dest 'lan'
        option dest_port '500'
        option proto 'udp'
        option target 'ACCEPT'

The same problem did also happened on v22.03.6.

I have 3945ABG Golan, that can not work on v23.05.2 caused by no kmod-iwl3945, i think. So, i can not test it on v23.05.2.

Getting iwl3945 packaged would be trivial, but someone caring about it (ideally owning the hardware) will have to provide a corresponding pull request. Packaging issues aside, iwl3945 (like all other Intel wireless chipsets) doesn't support AP mode, so it's relatively useless in an OpenWrt context.

Not useless at all. I am using this wifi to forward internet traffics to my modem.
For clients i have another extended wifi operated in AP mode used for that purpose. Openwrt is used as traffic & user management.

Well, in that case the ~30 minutes needed should be worthwhile.

I guess so