morrownr / USB-WiFi

USB WiFi Adapter Information for Linux
2.81k stars 180 forks source link

Getting worse performance with in-kernel rtw_8822bu driver #256

Open sjtmbg opened 1 year ago

sjtmbg commented 1 year ago

I've been manually compiling and using the 88x2bu drivers from github for about a year now and getting the max dl speeds that I can with my ISP (~200 Mbps). I recently upgraded to xubuntu 23.04 with the 6.2.0 kernel support for the rtw_8822bu driver and am now getting dl speeds of about 25 Mbps when using the in-kernel driver.

For the comparison I'm using same computer, same USB port (it's a 2.0 but that shouldn't matter in side-by-side comparison, should it?) and same network configuration. The desktop is a Lenovo M91p (4518W7Y) - I can provide other specs upon request.

Anyone else seeing similar performance issues using realtek/rtw88/rtw88_8822bu.ko ?

morrownr commented 1 year ago

Anyone else seeing similar performance issues using realtek/rtw88/rtw88_8822bu.ko ?

Absolutely. Here is my report:

I test adapters on DFS channels where there is no other AP so I can get clean results. I also use iperf3 so I am testing my lan, not the internet. My router is fast and runs OpenWRT with iperf3 server running.

rtw88_8822bu.ko: On kernel 6.3 I am seeing stable operation with 410 Mbps. On kernel 6.2, stability was an issue and performance was poor.

I am seeing additional patches set to go into kernel 6.4 which should further improve stability and performance.

8822bu.ko: On kernel 6.3 I am seeing stable operation with 525 Mbps.

The out-of-kernel driver used is the one from here:

https://github.com/morrownr/88x2bu-20210702

This driver automatically blacklist the in-kernel driver during installation and removes the blacklist on removal. Cool huh?

Right now the feature sets of the 2 driver are not the same so it depends on what you need. As time passes, I think the in-kernel driver will be very good. In fact, I have already added a rtl8812bu chipset section to menu item 2. Plug and Play adapters.

sjtmbg commented 1 year ago

Excellent info, thank you so much! I will muddle through with the 6.2 kernel then and look forward to 6.3 and 6.4.

Regarding the 88x2bu-20210702 out-of-kernel driver - I had been using that up until it wouldn't compile for me starting with 5.19 kernels on arch, fedora, and xubuntu. That's when I switched over to RinCat's.

The compile error I get when I try now, on 6.2.0, is "implicit declaration of function 'prandom_u32' in os_dep/osdep_service.c.

Please don't make any big effort to correct that, it has been overtaken by more recent developments, so it's just an FYI.

morrownr commented 1 year ago

The compile error I get when I try now, on 6.2.0, is "implicit declaration of function 'prandom_u32' in os_dep/osdep_service.c.

Remember, work on the out-of-kernel drivers is continuous because of the development model of Linux. I can't update the code sitting on your hardware but I have made it easy for users to update:

$ git pull $ sudo sh install-driver.sh

There is no need to remove the old driver as my script, install-driver.sh, detects the old installation and removes it prior to the new installation.

ANYTIME you are going to move to a new kernel such as you did in your reply, you need to run the two commands above before you install the new kernel.

Cheers