Score:0

RTL8812AU driver listed in lsmod, but not working

ec flag

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 (https://packages.ubuntu.com/focal/rtl8812au-dkms) 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.

heynnema avatar
ru flag
Uninstall the driver that you moded, and try https://github.com/morrownr/8821au or https://github.com/morrownr/8821au-20210708
chili555 avatar
cn flag
It doesn't lock partitions. Here is an explanation: https://wireless.wiki.kernel.org/en/users/drivers/iwlwifi#about_dual-boot_with_windows_and_fast-boot_enabled What does this tell us? sudo modprobe 8812au && sudo dmesg | grep 8812 Please edit your question to show the results. I have deleted my usually accurate but not today answer.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.