Velvet Star Monitor

Standout celebrity highlights with iconic style.

news

RTL8812AU driver listed in lsmod, but not working

Writer Sebastian Wright

I have a TP-Link Archer T2U Plus USB WiFi adapter that has the Realtek RTL8821AU chipset. The driver isn't preinstalled on Ubuntu 20.04.3 (kernel 5.11.0-27-generic, if it is preinstalled on 21.10 or 20.04.4, please let me know and I will upgrade) so I had to manually install the driver. I found one in the universe () that's made for the RTL8812AU, but it also works for RTL8821AU, because there is RTL8821AU written in the /os_dep/linux/usb_intf.c file.

I installed it with sudo apt install rtl8812au-dkms, however, the driver doesn't work, because TP-Link Archer T2U Plus's ID isn't listed in the /os_dep/linux/usb_intf.c file. So I downloaded the source code of the driver (using apt download rtl8812au-dkms), unzipped the .deb file, got the ID from the lsusb command (it's 2357:0120) and added a line

{USB_DEVICE(0x2357, 0x0120), .driver_info = RTL8821}, /* TP Link - T2U Plus */

under #ifdef CONFIG_RTL8821A in the usb_intf.c file.

Then I compiled the source code with make and sudo make install and restarted my PC and the driver doesn't work. It is loaded, because it's showing in lsmod everytime I plug my WiFi adapter, but in lsmod it's saying used by: 0.

I am sure the driver works with the RTL8821AU chipset and I am sure Archer T2U Plus is using this chipset, but it doesn't seem to work. I think the problem is that I installed it wrong, or that the 8812au module showing up in lsmod is another module (that I had tried before trying this package from the universe, because I had tried a lot of different drivers before trying this one) and the old module is handling the WiFi adapter instead of the rtl8812au-dkms package from the universe (compiled from source code with the edited usb_intf.c file).

I tried to run sudo depmod -a and sudo modprobe 8812au before restarting my PC, I also tried to install it while the adapter was unplugged and plugging it after a reboot, I tried using USB 3.0 ports on my case, USB 2.0 and 3.0 on my motherboard, nothing worked.

Can you please guide me step-by-step on how to compile and install the driver after I edited the source code or how to see if the module really is the one with the edited usb_intf.c file (I am new to Linux)?

BTW the driver has dkms, but because I installed it using sudo make install it isn't showing up in the dkms status. Also, after installing the driver the WiFi adapter isn't showing up in nmcli device or lshw -C network, only in lsusb and the module in lsmod.

2 Reset to default

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy