Linux driver for RTL8814AU
Recently I bought a TP-Link Archer T9UH USB WiFi dongle but could not find an up-to-date Linux driver for the Realtek RTL8814AU chip used in this dongle. I ended up porting an older driver to the latest Linux version and added some improvements to the code, some found on the web, some partly mine.
Prepare the Linux Source
In most cases it is sufficient to install the distribution's kernel-dev or kernel-headers package.
If you don't have the distribution's header files, you have to prepare the Linux source tree. Download or checkout a Linux version. In the Linux source tree, write:
Build the Driver
Download the RTL8814AU Linux driver from GitHub. The code should compile for kernels up to v4.13 (and possibly later) and will build the driver 8814au.ko.
In the rtl8814AU source directory, compile the driver as:
make clean all KSRC=<path-to-your-kernel-source> KVER=<kernel-version> sudo make install
The code was based on Diederik de Haas' repository which is based on version 4.3.21 of an Edimax driver for the EW-7833UAC device.