morrownr / rtl8852bu

Linux Driver for USB WiFi Adapters that are based on the RTL8852BU and RTL8832BU Chipsets - v1.19.3 - 20230505
Other
109 stars 22 forks source link

After upgrading to Kernel 6.8.0-40-generic, The driver not working anymore #37

Open advcha opened 3 months ago

advcha commented 3 months ago

Hello, I'm using Ubuntu 22.04 and my Wifi Adapter is TP-Link Archer TX20U Plus AX1800 (WiFi 6). The RTL8852BU driver was working well for Kernel 6.5.0-45-generic but after I upgraded it to kernel 6.8.0-40-generic, it's not working anymore. I already tried to pull the latest repo then used the remove-driver.sh and install-driver.sh script but the wifi adapter still not working.

Here is what I've done: check the adapter:

satria@teddy:~$ lsusb
Bus 004 Device 002: ID 2109:0813 VIA Labs, Inc. VL813 Hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 003: ID 2357:013f TP-Link 802.11ac WLAN Adapter    <---------------------- Here is the adapter
Bus 003 Device 004: ID 046d:0a38 Logitech, Inc. Headset H340
Bus 003 Device 005: ID 0bda:8179 Realtek Semiconductor Corp. RTL8188EUS 802.11n Wireless Network Adapter
Bus 003 Device 002: ID 2109:2813 VIA Labs, Inc. VL813 Hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 046d:c542 Logitech, Inc. Wireless Receiver
Bus 001 Device 004: ID 05e3:070e Genesys Logic, Inc. USB 2.0 Card Reader
Bus 001 Device 003: ID 046d:c534 Logitech, Inc. Unifying Receiver
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Pull the latest repo:

satria@teddy:~$ cd rtl8852bu/
satria@teddy:~/rtl8852bu$ git pull
Already up to date.

Remove the current driver

satria@teddy:~/rtl8852bu$ sudo sh remove-driver.sh
[sudo] password for satria: 
: ---------------------------
: remove-driver.sh v20240409
: x86_64 (kernel architecture)
: 6.8.0-40-generic (kernel version)
: ---------------------------

Removing a driver that was installed by dkms.
Module rtl8852bu-1.19.3 for kernel 6.8.0-40-generic (x86_64).
Before uninstall, this module version was ACTIVE on this kernel.

8852bu.ko:
 - Uninstallation
   - Deleting from: /lib/modules/6.8.0-40-generic/updates/dkms/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.

depmod....
Deleting module rtl8852bu-1.19.3 completely from the DKMS tree.
Removing 8852bu.conf from /etc/modprobe.d
Removing source files from /usr/src/rtl8852bu-1.19.3
The driver was uninstalled successfully.
You may now delete the driver directory if desired.
: ---------------------------

Do you want to reboot now? (recommended) [Y/n]

Reboot

ReInstall the driver:

satria@teddy:~/rtl8852bu$ sudo sh install-driver.sh
: ---------------------------
: install-driver.sh v20240429
: x86_64 (kernel architecture)
: x86_64 (architecture to send to gcc)
: 8/8 (in-use/total processing units)
: 49197812 (total system memory)
: 6.8.0-40-generic (kernel version)
: gcc-12 (version of gcc used to compile the kernel)
: gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
: dkms-2.8.7
: SecureBoot disabled
: ---------------------------

Checking for previously installed drivers...
Finished checking for and uninstalling previously installed drivers.
: ---------------------------

Starting installation.
Copying 8852bu.conf to /etc/modprobe.d
The dkms installation routines are in use.
Copying source files to /usr/src/rtl8852bu-1.19.3
Creating symlink /var/lib/dkms/rtl8852bu/1.19.3/source -> /usr/src/rtl8852bu-1.19.3
The driver was added to dkms successfully.
: ---------------------------

Kernel preparation unnecessary for this kernel. Skipping...

Building module:
cleaning build area...
kernelver=6.8.0-40-generic ./dkms-make.sh............................
Signing module:
 - /var/lib/dkms/rtl8852bu/1.19.3/6.8.0-40-generic/x86_64/module/8852bu.ko
Secure Boot not enabled on this system.
cleaning build area...
Compile time: 524.54 seconds
The driver was built by dkms successfully.
: ---------------------------

8852bu.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/6.8.0-40-generic/updates/dkms/

depmod....
The driver was installed by dkms successfully.
: ---------------------------

Info: Update this driver with the following commands as needed:

$ git pull
$ sudo sh install-driver.sh

Note: Updates to this driver SHOULD be performed before distro
      upgrades such as Ubuntu 23.10 to 24.04.
Note: Updates to this driver SHOULD be performed before major
      upgrades such as kernel 6.5 to 6.6.
Note: Updates can be performed as often as you like. It is
      recommended to update at least every 3 months.
Note: Work on this driver, like the Linux kernel, is continuous.

Enjoy!

Do you want to edit the driver options file now? (recommended) [Y/n] Y

--> here in /etc/modprobe.d/8852bu.conf file, modify the options from 'rtw_switch_usb_mode=0' to 'rtw_switch_usb_mode=1' TO ENABLE USB 3

Do you want to apply the new options by rebooting now? (recommended) [Y/n] Y

Reboot

I found no error but the wifi adapter still can't be used as usual

The DKMS status said it's installed:

satria@teddy:~$ dkms status
rtl8852bu/1.19.3, 6.8.0-40-generic, x86_64: installed
morrownr commented 3 months ago

Hi @advcha

I have read your report. There is nothing obviously wrong except for the adapter not working.

The only idea I have at this point is for me to try my adapter with the driver on my system that has Ubuntu 24.04 installed. Hopefully it will be obvious what the problem is.

morrownr commented 3 months ago

@advcha

I installed the driver in this repo for the rtl8852bu chip on Ubuntu 24.04. The installation was clean and it works.

Some further investigating:

ID 2357:013f TP-Link 802.11ac WLAN Adapter <---------------------- Here is the adapter

That VID/PID does not seem to indicate a rtl8852bu chip but rather a rtl8852au chip. Were you previously using a different driver?

advcha commented 3 months ago

Hi @morrownr , thanks. about 3 days ago, google (sider fusion AI) directed me to use rtl8852bu chipset for my adapter

Sider Fusion
The TP-Link Archer TX20U Plus AX1800 (WiFi 6) may require specific drivers for compatibility with Ubuntu 22.04. The driver for the `RTL8852BU` chipset, which is used in the Archer TX20U models, has been developed and can be found online. Users have had varying experiences with installation, so it’s recommended to check forums or the manufacturer's website for the latest drivers and installation instructions. Double-check compatibility and installation steps before proceeding.

Then I installed the rtl8852bu chipset. at the time my ubuntu 22.04 used 6.5.0-45-generic kernel. and it's working well until I upgraded it to 6.8.0-40-generic yesterday.

I took your suggestion to use rtl8852au chip and installed it in my PC. I installed it from https://github.com/hyekalhitech/ArcherRTL8832AU repo. And it's working as well. I'm a bit confused which driver should I use. Anyway I can enjoy the high speed wireless connection now. Thanks again.

morrownr commented 3 months ago

sider fusion AI doesn't know shit. It is wrong.

That driver you installed does not appear to be maintained and I'm not aware of another driver for that chip that is maintained.

Here is some good reading. The Main Menu of my site is:

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

The first three menu items are informative.

advcha commented 3 months ago

AFAIK The driver for the rtl8852au chipset I installed is based on this https://github.com/lwfinger/rtl8852au repo. I think the https://github.com/hyekalhitech/ArcherRTL8832AU repo adds some patches.

I read your note on https://github.com/morrownr/USB-WiFi/blob/main/home/USB_WiFi_Adapter_out-of-kernel_drivers_for_Linux.md. Thanks, it's very informative. I wish I read it before buying a wifi adapter based on the rtl8852au chipset like TP-Link Archer TX20U Plus AX1800 (WiFi 6).

morrownr commented 3 months ago

I installed is based on this https://github.com/lwfinger/rtl8852au repo

I knew the owner of that repo. He recently passed away so your options may be limited as changes have to be made regularly.

Thanks, it's very informative. I wish I read it before buying a wifi adapter based on the...

It happens. There is a lot of really bad info all over the internet regarding usb wifi and Linux, which is why I started this site. Your best option might be to sell the adapter to a Windows user and get something that works well.

advcha commented 3 months ago

I knew the owner of that repo. He recently passed away so your options may be limited as changes have to be made regularly.

I'm sorry to hear that. I don't know how many people use that repo but hopefully, someone else can continue it or fork that repo. I found there are 71 forks for the repo but I'm not sure how many are active. probably I'm less worried about it? :)

It happens. There is a lot of really bad info all over the internet regarding usb wifi and Linux, which is why I started this site. Your best option might be to sell the adapter to a Windows user and get something that works well.

Yeah, I'm considering it but currently, it's working well. Let's see what will happen when the next upgrade comes.

morrownr commented 3 months ago

I don't know how many people use that repo but hopefully, someone else can continue it or fork that repo. I found there are 71 forks for the repo but I'm not sure how many are active...

Over the last 5-6 years I have seen a fall off in the number people maintaining Realtek drivers. There are a couple of reason. Mediatek's support has matured and is standards compliant and the word has been spreading. Then there is the issue of the Realtek drivers not being standards compliant so who wants to learn something is not even correct. I'll held to try to get the word out but I am looking to archive 5 or my 6 repos, the ones for WiFi 5, over the next year. I've been working on a small team to make standards compliant drivers to upstream or to improve the ones that are there. WiFi 6 is another matter as there is no usb support at all for rtw89 in the Linux kernel so that is why I am trying warn Linux users to avoid Realtek's WiFi 6 usb adapters.

Come on back anytime.

Cheers

sateuwdie commented 3 months ago

Probably out of topic but with latest kernel 6.10.5 vanilla on Slackware works perfect.

morrownr commented 3 months ago

@sateuwdie

The large amount of work over the last year on the wifi stack to modernize for WiFi 7 has led to issues all over the place. Many patches are going in. I figure that maybe by the time kernel 6.12 is stable we should see a lot of stabilization. As Dorthey once said "Todo, we aren't in Kansas anymore." Well, with wifi we are well beyond WiFi 4 at this point and the complexity of WiFi 6 and 7 is mind blowing for me. Some don't understand that changes and additions to support WiFi 6 and 7 can and do cause problems with WiFi 4 and 5 at times. It is a lot of work. Most Linux users, if they need stability, are better off with kernel 6.1 and a distro that shipped with it like Debian 12. I'm sure Slackware can accommodate that.