There is no built-in support for Realtek RTL8812AU in Linux. To enable, I have to download the RTL8122AU driver source code, compile to a kernel module, and add to the kernel.
Following USB wireless dongles use the RTL8812AU chipset:
- D-Link DWA-171 A1
- Edimax EW-7811UTC
- netis WF2190
- TP-Link Archer T2U Ver 3.0 (RTL8811AU)
For Ubuntu 18.04 LTS and 20.04LTS, follow these steps:
$sudo apt-get update $sudo apt-get install dkms git $git clone https://github.com/aircrack-ng/rtl8812au.git $cd ~/rtl8812au $sudo make dkms_install $sudo modprobe 88XXau
Prepare to Build
Get codes and tools in different packages:$sudo apt-get update $sudo apt-get install linux-headers-generic build-essential git
Or the dkms (Dynamic Kernel Module Support Framework) package:$sudo apt-get update $sudo apt-get install dkms git
- Get only the essential Linux kernel headers. I am not going to compile the full kernel.
- Get the build-essential package which includes
- Debian package development tools
- C/C++ Compilers
- Development Libraries and Header Files
- Make utility
- Get the Git which contains the tool to clone the source code from a git server.
- Get the dkms which contains code and tools in linux-headers-generic and build-essential.
I may download the source code from GitHub without Git. But it’s just more convenient to manage the source code, especially when I need to rebuild the module for a new kernel.
Build and Install Kernel Module
chili555 suggests qnab while Jeremy31 chooses aircrack-ng. If it doesn’t work for me, I may use the “fork from” to find the parent. Or search “RTL8812AU” for more solutions. Always read the “README.md” to check if it works with the current kernel.
Here are 3 examples to download, build the module, and install:
For the qnab’s code, clone the latest version and use make to build/install:$git clone https://github.com/qnab/rtl8812au.git $cd ~/rtl8812au $make $sudo make install
For the aircrack-ng’s code, if the kernel is compatible with “v126.96.36.199”, clone the branch “v188.8.131.52” and use make to build/install:$git clone -b v184.108.40.206 https://github.com/aircrack-ng/rtl8812au.git $cd ~/rtl8812au $make $sudo make install
For the aircrack-ng’s code, clone the latest version and use the shell script to build/install:$git clone https://github.com/aircrack-ng/rtl8812au.git $cd ~/rtl8812au $sudo make dkms_install
Because aircrack-ng commits more frequently and newer than qnab as checked on 2020/4/26, I preferred to use his fork.
Detect Installed RTL8812AU Devices
For the qnab, the kernel module is “8812au” which is in the “MODULE_NAME = 8812au” in the “Makefile” file:$sudo modprobe 8812au
For the aircrack-ng, the kernel module is “88XXau” which is in the “BUILT_MODULE_NAME=88XXau” in the “dkms.conf” file.$sudo modprobe 88XXau
Unstable in Ubuntu 19.10
I have applied the same steps in Ubuntu 19.10 but the wireless connection is not stable. The connection looks okay but is very slow or no response at all. It goes back normal after a while sometimes. There are similar issues with Intel’s wireless driver.
Check the Chipset
Many wireless USB dongles use Realtek’s chipset. It’s suggested to check the chipset from following web site after WikiDevi shut down its service:
- Wireless CAT – reborn and updated continuously. The latest update is 2020/4/27 as checked on 2020/4/27.
- Info Depot Wiki – similar to Wireless CAT. The latest update is 2020/4/26 as checked on 2020/4/27.
- DeviWiki – a mirror site of the original WikiDevi
Other Realtek Ubuntu Drivers
Pjotr shares his experience dealing with different Realtek chipsets on Linux Mint 19.x and Ubuntu 18.04.x. For those not using RTL8812AU, it would help.
- DeviWikiDev: Realtek: Wireless chipsets
- Realtek: RTL8812AU
- DeviWiki: D-Link DWA-171 rev A1
- DeviWiki: Edimax EW-7811UTC
- DeviWiki: Netis WF2190
- Ubuntu: Package: dkms (2.3-3ubuntu9)
- Ubuntu: Package: linux-headers-generic (220.127.116.11.87 and others) [security]
- nixCraft: Howto: Build Linux Kernel Module Against Installed Kernel w/o Full Kernel Source Tree
- Ubuntu: Package: build-essential (12.4ubuntu1)
- Ubuntu: Package: git (1:2.17.1-1ubuntu0.7 and others) [security]
- Ubuntu: Forums: How to install Edimax EW-7811UTC AC600 Wireless USB with no internet (no ethernet)
- StackOerflow: RTL8812AU Usb adapter driver issues
- GitHub: gnab/rtl8812au
- AskUbuntu: Need rtl8814au driver for kernel 5.3 on Ubuntu 19.10
- GitHub: aircrack-ng/rtl8812au
- AskUbuntu: Ubuntu 18.04.1 LTS Intel wireless is very slow with kernel 4.15 [closed]
- Ubuntu linux package: Bugs: Driver iwlwifi for Intel Wireless-AC 9560 is slow and unreliable in kernel 4.15.0-20-generic
- OpenWRT: WikiDevi going down soon
- Wireless CAT
- Info Depot Wiki
- Easy Linux Tips Project: Realtek wireless chipset: install the right driver