Installing the RTL8821AU driver in Ubuntu Linux to use our TP-Link T2U Nano AC600 Wireless Adapter
Hi everyone,
Some years ago, I got the TP-Link T2U Nano Wireless Adapter to replace an internal Wireless Mini-PCI Express adapter that was going bad on a laptop. This adapter has been a good replacement for that laptop and is still working as of this day. That laptop uses Windows.
Now, I tried to see if that same adapter would work with Linux. Unfortunately, as of these days, it is not a plug-and-play adapter, and requires the installation of an RTL8821au driver.
This adapter uses the RTL8811AU chipset. The difference between the RTL8811AU and RTL8821AU chipsets is that the first is a USB 2.0 1-stream WiFi chipset, while the second is a USB 2.0 1-stream version of it but also includes Bluetooth.
The RTL8821AU driver we will be using is compatible with the RTL8811AU chipset.
Before doing the installation steps to make this adapter work, it has to be noted that there seem to be an rtl8812au-dkms package in the Ubuntu repository. Unfortunately, this didn’t work as it failed to install.
There are also several GitHub repositories that can cause confusion as they claim to work on RTL8811AU as well as RTL8812AU chipsets. The difference between these 2 is that the latter is a USB 3.0 2-stream WiFi adapter. Our version is a USB 2.0 1-stream Wi-Fi adapter.
What we will be doing to make this WiFi adapter to work is we will clone a well-maintained GitHub repository that contains a working driver and we will install it in our Linux machine.
Installing the Realtek RTL8821AU Chipset Driver
Before proceeding with this installation, it is suggested to delete older drivers as well as any apt packages we may have installed. While this card uses the RTL8811AU chipset and the driver we will be using installs as a module named 8821au.ko, I will uninstall first the failed rtl8812au-dkms package:
The driver repository we will be using is morrownr’s RTL8821AU, compatible with RTL8811AU WiFi cards. Before cloning the repository, let’s install the driver dependency packages first.
Open a terminal window and type the following:
sudo apt install -y build-essential dkms git iw
Press Enter to start the dependency packages installation. If you are asked to confirm the installation, type the Y key, followed by Enter:
Now, we can clone the GitHub driver repository. On a terminal, type the following and press Enter:
git clone https://github.com/morrownr/8821au-20210708.git
Go to the newly-cloned folder. Use the cd
command to enter it:
cd 8821au-20210708
There, we will run the install-driver.sh
script. Simply type sudo ./install-driver.sh
to begin the driver installation:
The driver will begin installing:
If everything goes well, you should be prompted if you would like to edit the driver’s configuration file. Generally, this is not needed unless your adapter misbehaves. Press the N key to continue:
You will also be prompted to reboot your machine. While it says it is recommended, it is not really needed as a simple re-plugging is all that it took for me. This is your choice. To reboot, type Y. Otherwise, press N:
If your WiFi adapter is connected, take it out of the USB port, then plug it in again. The lsusb
command should list that your TP-Link T2U Nano Wireless Adapter is using the rtl8821au driver:
At this point, you should be able to connect to WiFi networks and your wireless adapter’s LED should start to blink:
Congratulations! You have successfully installed the RTL8821AU Linux Driver in your Linux machine.
You can get this adapter on Amazon at the following link:
Note: Links to Amazon are referral links. This site earns a small percentage from orders placed with those links, helping keep this site operating.