Skip to content

Project: Add 8821/11au rtw88 in-kernel driver. Need testers... #133

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

Open
morrownr opened this issue Apr 30, 2024 · 278 comments
Open

Project: Add 8821/11au rtw88 in-kernel driver. Need testers... #133

morrownr opened this issue Apr 30, 2024 · 278 comments

Comments

@morrownr
Copy link
Owner

morrownr commented Apr 30, 2024

Greetings to anyone that reads this message.

This Issue is where we coordinated the new 8821au in-kernel driver.

The driver is available for testing at the following repo:

https://github.com/lwfinger/rtw88

Once you are at the rtw88 repo, please post bug reports at that repo.

The new driver went into Linux kernel 6.13. Some enhancements will go into kernel 6.14.

Remember, before installing the rtw88 driver, first remove the out-of-kernel driver in this repo or whatever repo you may have installed. You can run the following to remove it if using this repo:

$ sudo sh remove-driver.sh

It is important to follow the instructions in the README at the repo with the new test driver. You may not be familiar with rtw88 in the kernel but even if you are, there are some necessary mods that you need to know about. The rtw88 that has this new driver is more advanced than the rtw88 in stable kernels as it follows wireless-next and is used to work on and develop new drivers.

We welcome you to test and report on this new driver. Your testing will help us get this new driver in the Linux kernel sooner and in better shape. We do have specific needs. The most immediate need is to find users that have adapters that have bluetooth support (rtl8821au chip). The current developers only have adapters that have rtl8811au chips so we need help. We also need testers with old laptps that have the rtl8821ae chip.

If you are aware of anyone who is familiar with mac80211 drivers, please invite them as more eyes on the code is a good thing. Your ideas are most welcome. We can do this.

@morrownr

Status report:

  • The driver went into Linux kernel 6.13 during the week of 11-21-2024.
@lwfinger
Copy link

lwfinger commented May 5, 2024

I get a maximum of 130 Mbps transmit and 93 RX with iperf3. LibreSpeed gets 119 down and 113 up.

@lwfinger
Copy link

lwfinger commented May 6, 2024

The master branch now contains all of dubhater's changes for the RTW8821AU and RTW8812AU, and the driver works. I have not removed any of the other branches until the code is checked a bit more, but please test everything. The speeds are still on the low side, but that will come.

@morrownr
Copy link
Owner Author

morrownr commented May 6, 2024

@lwfinger

The master branch now contains all of dubhater's changes for the RTW8821AU and RTW8812AU, and the driver works.

Thanks. I'll start testing and adding additional vid/pids for rtw8812au.

@dubhater

As you ready for rtw8812au to be tested or just rtw8821au?

@morrownr
Copy link
Owner Author

morrownr commented May 6, 2024

Initital testing of rtw88 master:

$ iperf3 -c 192.168.1.1
Connecting to host 192.168.1.1, port 5201
[  5] local 192.168.1.172 port 57430 connected to 192.168.1.1 port 5201
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec  28.6 MBytes   240 Mbits/sec    0    526 KBytes       
[  5]   1.00-2.00   sec  25.4 MBytes   213 Mbits/sec    0    526 KBytes       
[  5]   2.00-3.00   sec  25.5 MBytes   214 Mbits/sec    0    526 KBytes       
[  5]   3.00-4.00   sec  25.5 MBytes   214 Mbits/sec    0    551 KBytes       
[  5]   4.00-5.00   sec  25.7 MBytes   216 Mbits/sec    0    551 KBytes       
[  5]   5.00-6.00   sec  25.7 MBytes   216 Mbits/sec    0    551 KBytes       
[  5]   6.00-7.00   sec  26.5 MBytes   222 Mbits/sec    0    577 KBytes       
[  5]   7.00-8.00   sec  24.2 MBytes   203 Mbits/sec    0    577 KBytes       
[  5]   8.00-9.00   sec  25.5 MBytes   214 Mbits/sec    0    577 KBytes       
[  5]   9.00-10.00  sec  25.6 MBytes   215 Mbits/sec    0    577 KBytes       
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.00  sec   258 MBytes   217 Mbits/sec    0             sender
[  5]   0.00-10.01  sec   256 MBytes   214 Mbits/sec                  receiver

iperf Done.

I ran iperf3 several times with my primary testing setup. Speed looks really good. Around 220 Mbps is about as fast as this chip can go if the out-of-kernel results over the last few years are good. The test above is on a DFS channel where there is no congestion. dmesg is clean. I'm impressed so far.

Monitor mode frame injection test:

$ sudo aireplay-ng --test wlx00c0caac47c7
[sudo] password for morrow:         
13:40:39  Trying broadcast probe requests...
13:40:39  Injection is working!
13:40:41  Found 12 APs

13:40:41  Trying directed probe requests...
13:40:41  C6:BE:59:93:4F:3B - channel: 44 - ''
13:40:43  Ping (min/avg/max): 2.473ms/9.155ms/17.771ms Power: -81.38
13:40:43  21/30:  70%

13:40:43  10:33:BF:60:FA:3B - channel: 44 - 'CoxWiFi'
13:40:43  Ping (min/avg/max): 1.548ms/5.636ms/8.924ms Power: -39.00
13:40:43  29/30:  96%

13:40:43  08:A7:C0:14:81:DA - channel: 44 - 'Wade Wifi'
13:40:47  Ping (min/avg/max): 10.801ms/17.700ms/27.914ms Power: -76.69
13:40:47  13/30:  43%

13:40:47  08:A7:C0:14:81:DF - channel: 44 - ''
13:40:51  Ping (min/avg/max): 14.111ms/22.023ms/39.249ms Power: -76.83
13:40:51  12/30:  40%

13:40:51  CC:BE:59:93:4F:3B - channel: 44 - 'SKHutch5'
13:40:52  Ping (min/avg/max): 2.017ms/6.207ms/20.025ms Power: -80.83
13:40:52  24/30:  80%

13:40:52  08:A7:C0:14:81:DD - channel: 44 - ''
13:40:57  Ping (min/avg/max): 10.314ms/21.516ms/31.877ms Power: -77.00
13:40:57  10/30:  33%

13:40:57  C2:BE:59:93:4F:3B - channel: 44 - ''
13:40:59  Ping (min/avg/max): 7.544ms/18.691ms/34.159ms Power: -79.70
13:40:59  20/30:  66%

13:40:59  10:33:BF:60:FA:3A - channel: 44 - ''
13:41:00  Ping (min/avg/max): 3.128ms/9.390ms/16.078ms Power: -38.93
13:41:00  28/30:  93%

13:41:00  10:33:BF:60:FA:3E - channel: 44 - ''
13:41:00  Ping (min/avg/max): 1.213ms/8.218ms/20.971ms Power: -38.80
13:41:00  30/30: 100%

13:41:00  08:A7:C0:14:81:DC - channel: 44 - 'CoxWiFi'
13:41:04  Ping (min/avg/max): 6.712ms/18.391ms/26.479ms Power: -77.00
13:41:04   9/30:  30%

13:41:04  08:A7:C0:14:81:DB - channel: 44 - ''
13:41:09  Ping (min/avg/max): 12.830ms/20.560ms/26.364ms Power: -77.00
13:41:09   9/30:  30%

13:41:09  10:33:BF:60:FA:3C - channel: 44 - ''
13:41:09  Ping (min/avg/max): 2.109ms/8.086ms/23.178ms Power: -38.93
13:41:09  28/30:  93%

Going in and out of monitor mode works well and things look like they should. The injection test above showed very good results. So far monitor mode looks good.

I will do more detailed test on managed and monitor mode as able this week and I plan to test AP mode and
P2P-client. So far, this driver looks good.

I plan to rework the first message in this thread to provide instructions to those who can test/report as most will not be used to the instructions for getting this driver going,

I am still looking for someone with a rtl8821au based adapter and someone with an old laptop with a rtl8821ce chip in it so we can test bluetooth.

@morrownr

Repository owner deleted a comment from dubhater May 6, 2024
Repository owner deleted a comment from dubhater May 6, 2024
Repository owner deleted a comment from dubhater May 6, 2024
Repository owner deleted a comment from lwfinger May 6, 2024
Repository owner deleted a comment from dubhater May 6, 2024
Repository owner deleted a comment from lwfinger May 6, 2024
Repository owner deleted a comment from dubhater May 6, 2024
Repository owner deleted a comment from lwfinger May 6, 2024
Repository owner deleted a comment from lwfinger May 6, 2024
@dubhater
Copy link

dubhater commented May 6, 2024

@morrownr rtw_8812au is not ready yet.

I can see some RTL8821AE on Aliexpress, both M.2 and mini PCIe.

Repository owner deleted a comment from dubhater May 6, 2024
@morrownr
Copy link
Owner Author

morrownr commented May 6, 2024

@dubhater

I can see some RTL8821AE on Aliexpress, both M.2 and mini PCIe.

Give me a chance to round up some testers that already have the chips. We can always go get one if we have to do so. This repo gets over 100 hits per day so there are a lot of users of this chip. I just need to work on getting them in here now that we have something for them to test. I'll work it.

I'm impressed with this driver so far. We'll find problems but so far it is working well. My opinion after a few years of supporting out-of-kernel drivers for both the rtl8821au and rtl8821cu is that the au is simply a more reliable chip that causes users far fewer problems.

@morrownr

@gmsanchez
Copy link

@morrownr

I have a TP-Link Archer T2U PLUS [RTL8821AU]. I removed this kernel module using $ sudo sh remove-driver.sh and installed rtw88 using the provided readme on Kubuntu 24.04

So far everything is working good. I am willing to help, but I don't have a lot of experience in this field. Are there any instructions to run the required tests? Just let me know.

@morrownr
Copy link
Owner Author

morrownr commented May 8, 2024

Hi @gmsanchez

Thanks for testing.

Are there any instructions to run the required tests?

Do you have any experience using any modes in addition to managed (client) mode?

Please document your distro and version here and post the results of the following:

$ uname -r
$ gcc --version

Do you know of a way to test your speed? If so, do it.

Post the results of:

$ sudo dmesg | grep rtw

Since you have an adapter with the version of the chip that has bluetooth support, can you verify that bluetooth is working correctly?

Post the results of:

$ lsusb

If your adapter has an LED, does it blink?

Lastly, just use it. See if anything goes wrong over the next few days. Keep us posted.

You may also get questions from @dubhater and @lwfinger .

@morrownr

@gmsanchez
Copy link

gmsanchez commented May 8, 2024

Do you know of a way to test your speed? If so, do it.

I don't know how to test my speed.

Since you have an adapter with the version of the chip that has bluetooth support, can you verify that bluetooth is working correctly?

I don't have any bluetooth device on my system.

If your adapter has an LED, does it blink?

I'll move the adapter to the front and check the LED status.

In the meantime, the requested output of the commands is below:

$ uname -r
6.8.0-31-generic
$ gcc --version
gcc (Ubuntu 13.2.0-23ubuntu4) 13.2.0
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ sudo dmesg | grep rtw
[    3.848959] rtw_core: loading out-of-tree module taints kernel.
[    3.848966] rtw_core: module verification failed: signature and/or required key missing - tainting kernel
[    3.874055] rtw_8821au 3-1:1.0: Firmware version 42.4.0, H2C version 0
[    3.915832] usbcore: registered new interface driver rtw_8821au
[    3.919055] rtw_8821au 3-1:1.0 wlx6c5ab0d0395d: renamed from wlan0
[    6.110598] rtw_8821au 3-1:1.0: MAC has not been powered on yet
$ lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 003: ID 05e3:0606 Genesys Logic, Inc. USB 2.0 Hub / D-Link DUB-H4 USB 2.0 Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 003: ID 046d:c31c Logitech, Inc. Keyboard K120
Bus 002 Device 004: ID 046d:c077 Logitech, Inc. Mouse
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 002: ID 2357:0120 TP-Link Archer T2U PLUS [RTL8821AU]
Bus 003 Device 003: ID 046d:08e4 Logitech, Inc. C505e HD Webcam
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub

@morrownr
Copy link
Owner Author

morrownr commented May 8, 2024

@dubhater

rtw88 master - rtw_8821au

I am seeing the below during compilation. This is with Debian 12 and kernels 6.1 LTS and 6.6 LTS plus gcc 12.2. This not fatal but...

  CC [M]  /home/morrow/src/rtw88/rtw8821a.o
  CC [M]  /home/morrow/src/rtw88/rtw8821a_table.o
In file included from /usr/src/linux-headers-6.1.0-21-common/include/linux/kernel.h:26,
                 from /usr/src/linux-headers-6.1.0-21-common/arch/x86/include/asm/percpu.h:27,
                 from /usr/src/linux-headers-6.1.0-21-common/arch/x86/include/asm/current.h:6,
                 from /usr/src/linux-headers-6.1.0-21-common/include/linux/sched.h:12,
                 from /usr/src/linux-headers-6.1.0-21-common/include/linux/delay.h:23,
                 from /usr/src/linux-headers-6.1.0-21-common/include/linux/usb.h:15,
                 from /home/morrow/src/rtw88/rtw8821a.c:5:
/home/morrow/src/rtw88/rtw8821a.c: In function ‘rtw8821a_tx_power_training’:
/usr/src/linux-headers-6.1.0-21-common/include/linux/minmax.h:20:35: warning: comparison of distinct pointer types lacks a cast
   20 |         (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
      |                                   ^~
/usr/src/linux-headers-6.1.0-21-common/include/linux/minmax.h:26:18: note: in expansion of macro ‘__typecheck’
   26 |                 (__typecheck(x, y) && __no_side_effects(x, y))
      |                  ^~~~~~~~~~~
/usr/src/linux-headers-6.1.0-21-common/include/linux/minmax.h:36:31: note: in expansion of macro ‘__safe_cmp’
   36 |         __builtin_choose_expr(__safe_cmp(x, y), \
      |                               ^~~~~~~~~~
/usr/src/linux-headers-6.1.0-21-common/include/linux/minmax.h:52:25: note: in expansion of macro ‘__careful_cmp’
   52 | #define max(x, y)       __careful_cmp(x, y, >)
      |                         ^~~~~~~~~~~~~
/home/morrow/src/rtw88/rtw8821a.c:2481:31: note: in expansion of macro ‘max’
 2481 |                 write_data |= max(power_level, 2) << (i * 8);
      |                               ^~~

@lwfinger
Copy link

lwfinger commented May 8, 2024

The problem is that the code used max(a,b), whereas it should have been max_t(u32,a,b). It now compiles cleanly on openSUSE Tumbleweed and Debian 12.

@morrownr
Copy link
Owner Author

morrownr commented May 9, 2024

@gmsanchez

I don't know how to test my speed.

You can give the following site a try for basic speed testing:

https://testmy.net/

Most of us use iperf3 on our local lans for speed testing. Do you have a RasPi on your local lan or a wifi router that runs OpenWRT?

I don't have any bluetooth device on my system.

It looked like you might have a version of the chipset that includes bluetooth support so I was looking to see if the bluetooth in your adapter was working. Maybe you have a chip that is wifi only.

[ 6.110598] rtw_8821au 3-1:1.0: MAC has not been powered on yet

Let me think out loud here for a moment. I am trying to sort out why the above line is needed. What is it doing for us?

Thanks for the info and we'll be waiting for additional reports.

@morrownr

@morrownr
Copy link
Owner Author

morrownr commented May 9, 2024

@lwfinger

The problem is that the code used max(a,b), whereas it should have been max_t(u32,a,b). It now compiles cleanly on openSUSE Tumbleweed and Debian 12.

Awesome! Clean compile here.

FYI: I'll be moving to AP mode testing soon. So far, managed and monitor modes look really good but my AP mode testing will take me to another distro and ARM64.

@morrownr
Copy link
Owner Author

morrownr commented May 9, 2024

@dubhater @lwfinger

Here is a very minor nitpick:

Screenshot from 2024-05-09 14-58-12

When I run iperf3, I am seeing drop (in the statistics box) increase regularly. With other wireless devices I am more used to it not increasing or occasionally incrementing but not as regularly as I am seeing here. Do we have a buffer set slightly smaller than it needs to be?

Like I said, nitpick. I am having a difficult time finding any problems with managed and monitor modes.

I am off to test AP mode.

@morrownr

@lwfinger
Copy link

Do you see any WARNINGS in your logs like this "WARNING: CPU: 3 PID: 36 at net/mac80211/rx.c"? Your CPU and PID will be different. That may be the source of your drops.

I have a patch to silence the WARNINGS, but the drops are not fixed as the packets are malformed.

What is the utility that produced the screenshot? I am not familiar with anything like it.

@5kft
Copy link
Contributor

5kft commented May 10, 2024

@morrownr I'm using a Debian-based custom arm64/armhf distribution, and as such I can't build the rtw88 driver via @lwfinger's process (I didn't bother to try to address this further). Instead, I simply removed the original mainline (6.9-rc7) rtw88 driver source and replaced it completely with @lwfinger's version from his github.

Now, when building this new version of rtw88 I am getting errors relating to the PCI driver module support or something (see errors below). My kernel configuration does not enable CONFIG_PCI, just in case this might be related. I haven't debugged the new in-kernel rtw88 build process any further. I'm pointing this out just in case there is an oversight in this new rtw88 code for non-CONFIG_PCI and/or ARM builds (or something).

As a comparison, the mainline 6.9-rc7 rtw88 driver builds completely fine - without any errors - so there does appear to be a regression in this new version of the driver source.

In my kernel config I am only enabling the the 8821CU module, so it is kind of odd that the build is erroring out for driver sources that aren't even enabled:

CONFIG_RTW88=m
CONFIG_RTW88_CORE=m
CONFIG_RTW88_USB=m
CONFIG_RTW88_8821C=m
# CONFIG_RTW88_8822BS is not set
# CONFIG_RTW88_8822BU is not set
# CONFIG_RTW88_8822CS is not set
# CONFIG_RTW88_8822CU is not set
# CONFIG_RTW88_8723DS is not set
# CONFIG_RTW88_8723DU is not set
# CONFIG_RTW88_8821CS is not set
CONFIG_RTW88_8821CU=m
# CONFIG_RTW88_DEBUG is not set
# CONFIG_RTW88_DEBUGFS is not set

Build errors:

drivers/net/wireless/realtek/rtw88/rtw8822be.c:27:1: warning: data definition has no type or storage class
   27 | module_pci_driver(rtw_8822be_driver);
      | ^~~~~~~~~~~~~~~~~
drivers/net/wireless/realtek/rtw88/rtw8822be.c:27:1: error: type defaults to ‘int’ in declaration of ‘module_pci_driver’ [-Werror=implicit-int]
drivers/net/wireless/realtek/rtw88/rtw8822be.c:27:1: warning: parameter names (without types) in function declaration
drivers/net/wireless/realtek/rtw88/rtw8822be.c:19:26: warning: ‘rtw_8822be_driver’ defined but not used [-Wunused-variable]
   19 | static struct pci_driver rtw_8822be_driver = {
      |                          ^~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[7]: *** [scripts/Makefile.build:244: drivers/net/wireless/realtek/rtw88/rtw8822be.o] Error 1
make[7]: *** Waiting for unfinished jobs....
drivers/net/wireless/realtek/rtw88/rtw8822ce.c:31:1: warning: data definition has no type or storage class
   31 | module_pci_driver(rtw_8822ce_driver);
      | ^~~~~~~~~~~~~~~~~
drivers/net/wireless/realtek/rtw88/rtw8822ce.c:31:1: error: type defaults to ‘int’ in declaration of ‘module_pci_driver’ [-Werror=implicit-int]
drivers/net/wireless/realtek/rtw88/rtw8822ce.c:31:1: warning: parameter names (without types) in function declaration
drivers/net/wireless/realtek/rtw88/rtw8822ce.c:23:26: warning: ‘rtw_8822ce_driver’ defined but not used [-Wunused-variable]
   23 | static struct pci_driver rtw_8822ce_driver = {
      |                          ^~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[7]: *** [scripts/Makefile.build:244: drivers/net/wireless/realtek/rtw88/rtw8822ce.o] Error 1
make[6]: *** [scripts/Makefile.build:485: drivers/net/wireless/realtek/rtw88] Error 2
make[5]: *** [scripts/Makefile.build:485: drivers/net/wireless/realtek] Error 2
make[4]: *** [scripts/Makefile.build:485: drivers/net/wireless] Error 2
make[3]: *** [scripts/Makefile.build:485: drivers/net] Error 2
make[2]: *** [scripts/Makefile.build:485: drivers] Error 2

@a5a5aa555oo
Copy link

@Darin755 You should post the output of dmesg, or no one knows what happened.

@Darin755
Copy link

Darin755 commented Jan 22, 2025

@a5a5aa555oo I posted the oops already but here is the entire dmesg in case it helps.

dmesg.txt

@a5a5aa555oo
Copy link

It looks like you installed Fedora in a VM, is it the same with real hardware?

@Darin755
Copy link

Darin755 commented Jan 22, 2025

@a5a5aa555oo

I don't have a way of testing on real hardware. (I'm not quite ready to run a unstable kernel on my main system)

I run almost everything I do in either a container of VM anyway so ideally it should work in a VM.

Is this outside of the expected use case?

@a5a5aa555oo
Copy link

@Darin755

I don't know, just tested with my RTL8822BU and it didn't work in a VM neither.

@Darin755
Copy link

Darin755 commented Jan 22, 2025

@a5a5aa555oo

*either

Anyway it sounds like a bug. I am more than happy to help out anyway I can although I lack kernel experience.

@morrownr
Copy link
Owner Author

USB WiFi Adapter in a VM Guide

https://github.com/morrownr/USB-WiFi/blob/main/home/Using_USB_Adapter_in_VirtualBox.md

It says for USB3 but if your adapter is USB2 then select USB2.

If you forget where the guide is, go to the Main Menu of my site:

https://github.com/morrownr/USB-WiFi

@Darin755
Copy link

Darin755 commented Jan 23, 2025

@morrownr

I am using libvirtd with virtual manager since Virtualbox has poor performance generally and isn't designed to run as a daemon. However, the guide is well written and seems pretty good.

@morrownr
Copy link
Owner Author

@Darin755

The basic principles in the guide should help. The most basic principle is that VM's generally do not automatically setup USB WiFi adapters. There are reasons for that so users must tell the VM what to do.

@Darin755
Copy link

These days that's not really true. Linux either supports hardware or it doesn't. If it is detected the settings menus automatically populate.

Even on Windows there isn't a lot of reason to manually install drivers. Windows update automatically pulls down and sets up new hardware.

@morrownr
Copy link
Owner Author

@Darin755

The most basic principle is that VM's generally do not automatically setup USB WiFi adapters.

Linux either supports hardware or it doesn't.

Look at what I said. VM's generally do not automatically setup USB WiFi adapters. I'll stick by that statement.

@King-Mucus
Copy link

Greetings. This driver from your repo works just fine here.

I just downloaded the source files for the new kernel 6.13 on my Gentoo box, downloaded the relevant firmware files and tried compiling the new in-kernel drivers both as modules and builtin. I tried enabling support only for 8821au chipsets and then for all rtw88 USB chipsets.

It just doesn't load the module and loading them manually with modprobe has no effect.

    2.654899] usb 1-2: new high-speed USB device number 3 using xhci_hcd
[    2.870151] usb 1-2: New USB device found, idVendor=2357, idProduct=011f, bcdDevice= 2.00
[    2.870157] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    2.870159] usb 1-2: Product: 802.11ac WLAN Adapter 
[    2.870162] usb 1-2: Manufacturer: Realtek 
[    2.870164] usb 1-2: SerialNumber: 00e04c000001

This is the device info on dmesg. On the new kernel, I don't find any related error message. I could try pasting it here later if needed.

@morrownr
Copy link
Owner Author

@King-Mucus

The rtl8821/11au rtw88 driver in kernel 6.13 only has one device ID. The additional device ID's are going into kernel 6.14. It is likely that this is your problem.

Until 6.14 is available, you might try going to the downstream rtw88 that is used to test:

https://github.com/lwfinger/rtw88

It can be installed and bug reports left in that repo.

@fuzzysloth
Copy link

Today after upgrading linux 6.13.1.arch1-1 the build failed for me:

os_dep/linux/ioctl_cfg80211.c:10523:32: error: initialization of ‘int (*)(struct wiphy *, struct net_device *, struct cfg80211_chan_def *)’ from incompatible pointer type ‘int (*)(struct wiphy *, struct cfg80211_chan_def *)’ [-Wincompatible-pointer-types]
10523 |         .set_monitor_channel = cfg80211_rtw_set_monitor_channel,
      |                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
os_dep/linux/ioctl_cfg80211.c:10523:32: note: (near initialization for ‘rtw_cfg80211_ops.set_monitor_channel’)

My device is USB dongle, 0bda:a811 and new rtw88 driver failed to recognize it, so I had to switch to linux-lts 6.12.12-1 temporarily.

Is there any chance to make rtw88 recognize it so I can test my USB dongle?

@morrownr
Copy link
Owner Author

morrownr commented Feb 3, 2025

Hi @fuzzysloth

Today after upgrading linux 6.13.1.arch1-1 the build failed for me:

Yes, there are a couple of things I need to do for 6.13. I just haven't gotten around to it with this driver yet.

Is there any chance to make rtw88 recognize it so I can test my USB dongle?

Yes. The basic driver went into 6.13 but not all needed files made it into 6.13 so some are being added for 6.14. One of the files that will show up in 6.14 is the file that contains all of the device IDs. So the driver is there but currently it can only recognize one device ID. I want the author of that file.

What you can do is install from the repo we used to build and test the driver:

https://github.com/lwfinger/rtw88

The installation will automatically blacklist the in-kernel driver and remove the blacklist when you uninstall.

@vinicius-daros
Copy link

vinicius-daros commented Feb 4, 2025

tested successfully rtw_8821au from 6.14-rc1 :D, working out of the box and better than the module from this repo(not sure why, the module couldn't connect with connection that my network card in my laptop already connected, but the kernel driver work as expected), the antenna couldn't connect with 5ghz wifi tho, not sure if that is a driver issue

edit: nevermind i think it's just quirk from KDE networks or network-manager, disabling the internal card with ifconfig made the kde networks show the possibility to connect to the 5ghz using the antenna and it's working, tested with fedora 41 kernel 6.14-rc1

@lowkeylif3
Copy link

Hi i'm new to linux using fedora which got updated to 6.14 kernel build wifi is not working anymore how to get inbuilt driver working which is mentioned in Readme An in-kernel driver for the rtl8821/11au chipsets has been merged into kernels 6.13 and 6.14

I did removed the old one with cd ~/src/8821au-20210708 & sudo ./remove-driver.sh

@morrownr
Copy link
Owner Author

Hi @lowkeylif3

6.14 has not been released yet. Does fedora make releases with test kernels?

What we can do is check 2 things and if we find a problem, you can report it to fedora so that things are working well when 6.14 is released.

Post the results of the following commands (we are looking to see if the firmware and driver files are where they should be):

$ ls -l /lib/firmware/rtw88

$ ls -l /usr/lib/modules/$(uname -r)/kernel/drivers/net/wireless/realtek/rtw88

@lowkeylif3
Copy link

lowkeylif3 commented Feb 28, 2025

Hi @lowkeylif3

6.14 has not been released yet. Does fedora make releases with test kernels?

What we can do is check 2 things and if we find a problem, you can report it to fedora so that things are working well when 6.14 is released.

Post the results of the following commands (we are looking to see if the firmware and driver files are where they should be):

$ ls -l /lib/firmware/rtw88

$ ls -l /usr/lib/modules/$(uname -r)/kernel/drivers/net/wireless/realtek/rtw88

Sorry my bad kernel version is Linux 6.13.4-200.fc41.x86_64

Output of above two commands

thispc@fedora:~$ ls -l /lib/firmware/rtw88

-rw-r--r--. 1 root root   688 Dec 10 05:30 README.xz
-rw-r--r--. 1 root root 12648 Dec 10 05:30 rtw8703b_fw.bin.xz
-rw-r--r--. 1 root root 14080 Dec 10 05:30 rtw8703b_wow_fw.bin.xz
-rw-r--r--. 1 root root 17196 Dec 10 05:30 rtw8723d_fw.bin.xz
-rw-r--r--. 1 root root 16148 Dec 10 05:30 rtw8812a_fw.bin.xz
-rw-r--r--. 1 root root 18816 Dec 10 05:30 rtw8821a_fw.bin.xz
-rw-r--r--. 1 root root 48736 Dec 10 05:30 rtw8821c_fw.bin.xz
-rw-r--r--. 1 root root 70172 Dec 10 05:30 rtw8822b_fw.bin.xz
-rw-r--r--. 1 root root 77428 Dec 10 05:30 rtw8822c_fw.bin.xz
-rw-r--r--. 1 root root 57492 Dec 10 05:30 rtw8822c_wow_fw.bin.xz

thispc@fedora:~$ ls -l /usr/lib/modules/$(uname -r)/kernel/drivers/net/wireless/realtek/rtw88

-rw-r--r--. 1 root root  35336 Feb 22 05:30 rtw88_8703b.ko.xz
-rw-r--r--. 1 root root  22508 Feb 22 05:30 rtw88_8723cs.ko.xz
-rw-r--r--. 1 root root  21348 Feb 22 05:30 rtw88_8723de.ko.xz
-rw-r--r--. 1 root root  36136 Feb 22 05:30 rtw88_8723d.ko.xz
-rw-r--r--. 1 root root  22544 Feb 22 05:30 rtw88_8723ds.ko.xz
-rw-r--r--. 1 root root  21352 Feb 22 05:30 rtw88_8723du.ko.xz
-rw-r--r--. 1 root root  27624 Feb 22 05:30 rtw88_8723x.ko.xz
-rw-r--r--. 1 root root  32912 Feb 22 05:30 rtw88_8812a.ko.xz
-rw-r--r--. 1 root root  21200 Feb 22 05:30 rtw88_8812au.ko.xz
-rw-r--r--. 1 root root  31628 Feb 22 05:30 rtw88_8821a.ko.xz
-rw-r--r--. 1 root root  21192 Feb 22 05:30 rtw88_8821au.ko.xz
-rw-r--r--. 1 root root  21316 Feb 22 05:30 rtw88_8821ce.ko.xz
-rw-r--r--. 1 root root  40668 Feb 22 05:30 rtw88_8821c.ko.xz
-rw-r--r--. 1 root root  22452 Feb 22 05:30 rtw88_8821cs.ko.xz
-rw-r--r--. 1 root root  21436 Feb 22 05:30 rtw88_8821cu.ko.xz
-rw-r--r--. 1 root root  21280 Feb 22 05:30 rtw88_8822be.ko.xz
-rw-r--r--. 1 root root  46936 Feb 22 05:30 rtw88_8822b.ko.xz
-rw-r--r--. 1 root root  22448 Feb 22 05:30 rtw88_8822bs.ko.xz
-rw-r--r--. 1 root root  21672 Feb 22 05:30 rtw88_8822bu.ko.xz
-rw-r--r--. 1 root root  21324 Feb 22 05:30 rtw88_8822ce.ko.xz
-rw-r--r--. 1 root root  74320 Feb 22 05:30 rtw88_8822c.ko.xz
-rw-r--r--. 1 root root  22444 Feb 22 05:30 rtw88_8822cs.ko.xz
-rw-r--r--. 1 root root  21284 Feb 22 05:30 rtw88_8822cu.ko.xz
-rw-r--r--. 1 root root  36428 Feb 22 05:30 rtw88_88xxa.ko.xz
-rw-r--r--. 1 root root 138396 Feb 22 05:30 rtw88_core.ko.xz
-rw-r--r--. 1 root root  40828 Feb 22 05:30 rtw88_pci.ko.xz
-rw-r--r--. 1 root root  39880 Feb 22 05:30 rtw88_sdio.ko.xz
-rw-r--r--. 1 root root  35580 Feb 22 05:30 rtw88_usb.ko.xz

@morrownr
Copy link
Owner Author

@lowkeylif3

Good news

rtw8821a_fw.bin.xz

rtw88_8821au.ko.xz

fedora has the firmware and driver files in place. That is good.

However, the bad news is that not everything needed went into kernel 6.13. Some parts, including most of the VID/PID information did not go in until 6.14 so if the driver is not working for you with 6.13, then your vid/pid is not in 6.13.

What you can do is install the repo where the work has been done and uninstall or not install it once you are up to kernel 6.14:

https://github.com/lwfinger/rtw88

Give us a report on how the driver is working for you.

@lowkeylif3
Copy link

@lowkeylif3

Good news

rtw8821a_fw.bin.xz

rtw88_8821au.ko.xz

fedora has the firmware and driver files in place. That is good.

However, the bad news is that not everything needed went into kernel 6.13. Some parts, including most of the VID/PID information did not go in until 6.14 so if the driver is not working for you with 6.13, then your vid/pid is not in 6.13.

What you can do is install the repo where the work has been done and uninstall or not install it once you are up to kernel 6.14:

https://github.com/lwfinger/rtw88

Give us a report on how the driver is working for you.

Installed the driver from lwfinger repo driver is slow in searching network & also fails to connect.

For now i'll switch back to windows & wait for kernel 6.14 to be released.

Image

@shirooo39
Copy link

shirooo39 commented Apr 17, 2025

I'm on Arch Linux and just updated my system. got the new 6.14 kernel but the in-kernel driver doesn't seem to work properly with my TP-Link Archer T2U Nano (RTL8811AU) as the one from here.

enabling and disabling took so long to the point it freezes my KDE desktop entirely. desktop worked fine after I unplugged the adapter.

I also tried installing rtw88-dkms-git from the AUR, same exact behavior.

for now, I guess I'll just downgrade my kernel back to 6.13 and see if it's working again.

@morrownr
Copy link
Owner Author

Did you uninstall the driver from this repo that we are in now? If so, removal is as such:

$ sudo sh remove-driver.sh

I also tried installing rtw88-dkms-git from the AUR, same exact behavior.

It is based on the driver in this repo.

You did not explain the details of what behavior you are seeing. Can you elaborate?

Once cleaned up, if there are still problems with kernel 6.14, I suggest that you report problems to the downstream working repo for the new in-kernel driver:

https://github.com/lwfinger/rtw88

@shirooo39
Copy link

shirooo39 commented Apr 17, 2025

Did you uninstall the driver from this repo that we are in now?

yes, I did uninstall the driver from here

You did not explain the details of what behavior you are seeing. Can you elaborate?

sorry for not being clear enough. the issue I'm getting is my desktop become so unresponsive with the in-kernel driver. enabling/disabling wifi takes way too much time and seems to fail doing so. it also doesn't seem to scan for any network. when I unplugged the adapter, the freezing issue goes away. I assume the driver is trying to communicate with the adapter but can't, causing my desktop to be unresponsive.

I've downgraded my kernel back to 6.13.8 and reinstalled the driver from here and it worked as how it was previously.

@morrownr
Copy link
Owner Author

Okay. It would be good if you report this to the repo where the in-kernel work is taking place:

https://github.com/lwfinger/rtw88

It could be an issue with your distro and if we figure it out, you could report it to your distro so that they can fix. Of course, it could be a problem with the driver. The in-kernel driver is really good. I use it here. It is a better driver than the one here in this repo.

If you could look in the log for evidence of what is going on, that could help:

$ sudo dmesg

Just copy and post the lines that seem to be related to the driver.

@ZerBea
Copy link

ZerBea commented Apr 17, 2025

I can confirm problems on 6.14.2.arch1-1
ZerBea/hcxdumptool#361 (comment)

@morrownr
Copy link
Owner Author

@ZerBea

Thanks for jumping in. I'm busy right now but it looks like I need to retest. When last I tested, if was when the new Ubuntu 25.04 was early in testing with kernel 6.14, I did not see this. If one of you could go over to https://github.com/lwfinger/rtw88 and report this, then the other could say me too and we could get the ball rolling.

@morrownr
Copy link
Owner Author

@ZerBea @shirooo39

I just stopped what I was doing and tested. I tested with Ubuntu 25.04 with kernel 6.14. It tested good.

It looks like both of you are on Arch. I recommend that you report to the repo as I recommended above so that there is input. @dubhater is also an Arch user so he may be more help in figuring this out. This could be an Arch specific issue.

@ZerBea
Copy link

ZerBea commented Apr 19, 2025

Looks like Raspbian is affected too. Same behavior as the Arch Linux system.

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