morrownr / 88x2bu-20210702

Linux Driver for USB WiFi Adapters that are based on the RTL8812BU and RTL8822BU Chipsets - v5.13.1
Other
879 stars 170 forks source link

Project: Improve the 8822bu rtw88 in-kernel driver. Need testers... #224

Open morrownr opened 1 week ago

morrownr commented 1 week ago

Greetings to anyone that reads this message.

This Issue is where we coordinate and take bug reports for the effort to improve the 8822bu in-kernel driver. The 8822bu in-kernel driver supports the same adapters as the 88x2bu driver in this repo so if you are here for the driver in this repo, you can help us test.

Note: I am also going to send the users of 8822cu based adapter to this message as rtw88 (link is below) supports the 8822cu as well). Therefore, we need users making reports to specify whether they are using a 8822/12bu based adapter or a 8822/12cu based adapter.

An effort is underway to improve the support for the rtl88x2bu chips in the rtw88 in-kernel driver series. The driver that we are using for testing is available at the following repo:

https://github.com/lwfinger/rtw88

Remember to 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. You do need to Blacklist the existing 8822bu driver in the kernel if you are using kernel 6.2 or later so look for how to do that in the README.

We welcome you to test and report on this rtw88 driver. Your testing will help us improve the driver in the Linux kernel. 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

What we need tested:

ADV-LUT commented 1 week ago

Hello @morrownr ,

I wanted to provide an update on my ongoing efforts to set up a stable wifi-driver on my device.

Steps Taken and Findings:

Setup Details:

Hardware: I use a SOM board with interchangeable CPUs, and the 8822cu is permanently connected via USB 2.0.

Hardware Specification (from lshw):

description: Bluetooth wireless interface
product: 802.11ac NIC
vendor: Realtek
physical id: 4
bus info: usb@1:2.4
version: 0.00
serial: 123456
capabilities: usb-2.00 bluetooth
configuration: driver=rtw_8822cu maxpower=500mA speed=480Mbit/s

Steps to Ensure Driver Functionality:

Thank you in advance for your support!

Best regards,

morrownr commented 1 week ago

@ADV-LUT

Thanks for the report. It appears that the rtw 8822CU driver is not in good shape at all. The out-of-kernel driver you pointed me to is a very old driver that is not being maintained so no wonder it does not work on anything near a modern kernel. If your needs include something that works well in the short term, you may want to take a look at the Plug and Play List on the Main Menu:

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

@dubhater

This message is in the Project Issue in the 882xBU repo. I am also going to channel users with 8822cu based adapters into here as I do not have a repo for the 8822cu... and I don't have an adapter. That the rtw 8822CU driver is not in good shape should come as no surprise. What are your thoughts on the 8822cu?

dubhater commented 1 week ago

I think 8822cu, 8822bu, and 8821cu have a common problem. They use a common code base (the "halmac" stuff in the official driver) so it makes sense.

@ADV-LUT Unless you want to dive into the code and find what is missing from rtw88, there is nothing you can do to make it work better.

ADV-LUT commented 1 week ago

@morrownr

Thanks for the quick response.

I was just looking for suitable adapters for the 8822cu and found this one: https://www.top-electronicsusa.com/lm842-8426-us-wifi-80211ac-bluetooth-50-2t2r-usb-combi-adapter-with-sma-antenna-connector-p-17843.html

If that's an option, we would order the adapter and send it to you.

Khnaz35 commented 3 days ago

@morrownr will this support for

6.8.0-36-generic

The original driver which is no more supported can be found here. https://www.tp-link.com/us/support/download/archer-t2u/


Issue Report: TP-Link Archer T2U USB Wi-Fi Adapter Driver Installation on Kernel 6.8.0-36-generic

Kernel Version

uname -r
# Output: 6.8.0-36-generic

Summary

We attempted to install the driver for the TP-Link Archer T2U USB Wi-Fi adapter on a system running kernel version 6.8.0-36-generic. Despite multiple efforts, the driver could not be loaded due to unresolved symbol errors related to cfg80211 and mac80211. Below are the detailed steps taken, the commands used, and the errors encountered.

Steps Taken

1. Initial Setup

We updated the system and installed the required packages:

sudo apt update
sudo apt install -y dkms build-essential libelf-dev linux-headers-$(uname -r) git

2. Clean Up Previous Installations

Removed any existing DKMS modules and cleaned up the build directory:

sudo dkms remove realtek-rtl88xxau/5.6.4.2~20240509 --all
cd ~/rtl8812au
sudo make clean

3. Clone a Reliable Community Driver Repository

Cloned a known reliable driver repository:

cd ~
git clone https://github.com/morrownr/88x2bu.git
cd 88x2bu

4. Build and Install the Driver Using DKMS

Added, built, and installed the DKMS module:

sudo dkms add .
sudo dkms build 88x2bu/5.8.7
sudo dkms install 88x2bu/5.8.7

5. Load the Driver

Attempted to load the driver:

sudo modprobe 88x2bu

6. Check for Errors

Checked dmesg for any errors:

sudo dmesg | tail
# Encountered the following errors:
# [ 3698.455187] 88XXau: Unknown symbol cfg80211_michael_mic_failure (err -2)
# [ 3698.455218] 88XXau: Unknown symbol cfg80211_external_auth_request (err -2)
# [ 3698.455235] 88XXau: Unknown symbol cfg80211_connect_done (err -2)
# [ 3698.455306] 88XXau: Unknown symbol wiphy_register (err -2)
# [ 3698.455321] 88XXau: Unknown symbol wiphy_free (err -2)
# [ 3698.455354] 88XXau: Unknown symbol ieee80211_channel_to_freq_khz (err -2)
# [ 3698.455388] 88XXau: Unknown symbol cfg80211_ch_switch_started_notify (err -2)

7. Verify the Modules are Loaded

Ensured the necessary wireless stack modules (cfg80211 and mac80211) were loaded:

sudo modprobe cfg80211
sudo modprobe mac80211
lsmod | grep cfg80211
lsmod | grep mac80211
# Output:
# cfg80211             1339392  1 mac80211
# mac80211             1728512  0
# libarc4                12288  1 mac80211
# cfg80211             1339392  1 mac80211

8. Attempt to Load the Driver Again

Tried loading the driver again:

sudo modprobe 88x2bu

9. Check for Errors Again

Checked dmesg for any new errors:

sudo dmesg | tail
# Same errors persisted:
# [ 3698.455187] 88XXau: Unknown symbol cfg80211_michael_mic_failure (err -2)
# [ 3698.455218] 88XXau: Unknown symbol cfg80211_external_auth_request (err -2)
# [ 3698.455235] 88XXau: Unknown symbol cfg80211_connect_done (err -2)
# [ 3698.455306] 88XXau: Unknown symbol wiphy_register (err -2)
# [ 3698.455321] 88XXau: Unknown symbol wiphy_free (err -2)
# [ 3698.455354] 88XXau: Unknown symbol ieee80211_channel_to_freq_khz (err -2)
# [ 3698.455388] 88XXau: Unknown symbol cfg80211_ch_switch_started_notify (err -2)

Conclusion

Despite following all the steps to install and load the driver, the module failed to load due to missing symbols related to cfg80211 and mac80211. This indicates a potential compatibility issue with the current kernel version 6.8.0-36-generic. We recommend seeking further assistance from the community or driver maintainers to resolve these symbol issues.

Logs and Additional Information

We hope this detailed report helps in diagnosing and resolving the issue with the TP-Link Archer T2U USB Wi-Fi adapter driver on newer kernel versions. If you need any additional information, please feel free to reach out.

morrownr commented 3 days ago

Hi @Khnaz35

I do see some problems but this issue is for reports on the work to improve the rtw88 support for rtw88_8822bu/cu. So please keep that in mind and if more than one message is required, I will probably ask you to establish the bug report in another location.

TP-Link Archer T2U

I think that adapter uses a rtl8811au chip but lets check:

$ lsusb

Post the result.

Tell us what distro you are using. I could not put enough puzzle pieces together to figure it out.

sudo dkms remove realtek-rtl88xxau/5.6.4.2~20240509 --all

Well, that is not a 88x2bu driver you are removing so the mystery of what chip is in your adapter continues.

git clone https://github.com/morrownr/88x2bu.git

That is the driver in this repo. It supports the 88x2bu chips.

sudo dkms build 88x2bu/5.8.7

I can appreciate that you know how to manually use dkms but you did not read the README did you? The installations steps in the README are such that it makes it hard to mess up installing this or any out-of-kernel driver at this site. The driver version in this repo is not 5.8.7 and that is where things went south.

Let's start with the requested info so we can figure out what chip you have and what distro you are using. My best guess is that you adapter uses a rtl8811au chip. Let's figure out the chip and go from there.

@morrownr

Khnaz35 commented 3 days ago

@morrownr Thanks for getting back much appreciated.

Here are results

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 1c4f:0002 SiGma Micro Keyboard TRACER Gamma Ivory
Bus 001 Device 005: ID 2357:011f TP-Link 802.11ac WLAN Adapter 
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 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 002: ID 222a:0001 ILI Technology Corp. Multi-Touch Screen
Bus 003 Device 003: ID 0d8c:0014 C-Media Electronics, Inc. Audio Adapter (Unitek Y-247A)
Bus 003 Device 004: ID 0000:0538   USB OPTICAL MOUSE
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
$ dkms status
realtek-rtl88xxau/5.6.4.2~20240509, 6.8.0-31-generic, x86_64: installed (WARNING! Diff between built and installed module!)
dkms-3.0.11

Tell us what distro you are using.

$ cat /etc/os-release
PRETTY_NAME="Ubuntu 24.04 LTS"
NAME="Ubuntu"
VERSION_ID="24.04"
VERSION="24.04 LTS (Noble Numbat)"
VERSION_CODENAME=noble
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=noble
LOGO=ubuntu-logo
morrownr commented 2 days ago

@Khnaz35

Bus 001 Device 005: ID 2357:011f TP-Link 802.11ac WLAN Adapter

That ID means your adapter is based on the rtl8821/11au chip so this repo is the wrong driver.

realtek-rtl88xxau/5.6.4.2~20240509, 6.8.0-31-generic, x86_64: installed

You need to uninstall that driver.

The correct driver repo is:

https://github.com/morrownr/8821au-20210708

Just follow the installation steps in the README.

There is an alternate if you are interested in testing a driver for this adapter that is in testing and should go into the Linux kernel soon:

https://github.com/morrownr/8821au-20210708/issues/133

Read and follow the first message in that thread.

I'll see you over in the 8821au repo.