TP-Link Archer T9UH V2 on Manjaro Linux (Arch Linux)

Installing the Driver for TP-Link Archer T9UH V2 WiFi Dual Band USB 3.0 Dongle on Manjaro Linux (Arch Linux)


It was a Deepawali 2019 purchase for October. But finally arrived in November.

TP-Link Archer T9UH an Excellent low cost AC1900 Dual Band (2.4GHz and 5GHz) WiFi USB 3.0 Dongle

TP-Link Archer T9UH WiFi Dual Band USB 3.0 Dongle
Fig: TP-Link Archer T9UH WiFi Dual Band USB 3.0 Dongle
Source: TP-Link Website

Let’s look how it faired for me! - without loosing my sleep of it.

May be it might help you in some way.

I had poor WiFi connection on my old Thinkpad W540. Ya, Its a Thinkpad. And, yes I am a fan of the old IBM Thinkpads.

In the past I had test out many TP-Link dongles.

There were not many working ones on Arch or even Linux.

One user had suggested on the forums of Manjaro about this. Hence my immediate impatient purchase. Well to my dismay it was not plug-n-play.

So, I found the way around and got it working. Let’s look at how to make this WiFi USB 3.0 dongle to work.

Here is the Product Page for TP-Link Archer T9UH V2 :

https://www.tp-link.com/in/home-networking/adapter/archer-t9uh/

In the support section we find a guide of linux. This was of no use since they don’t provide the driver source.

I really liked the performance of TP-Link Archer T9UH V2 USB3.0 Dual Band WiFi USB Dongle. Here is a review of the TP-Link WiFi Dongles :

So, I decided to dig a bit deeper.

Found the Driver

After a bit of digging(References below), I found the desired AUR package.

https://aur.archlinux.org/packages/rtl88xxau-aircrack-dkms-git/

Well, this is a Driver hence we have some preparations that are in order.

1. Compiler and toolchain

First, We need to have gcc installed and a tail of tools to help compile drivers.

sudo pacman -S gcc make binutils dkms

Recently I learned that we can do an repository update and install in same command.

Use this new command instead.

sudo pacman -Syyu gcc make binutils dkms

Note: The dkms would help to dynamically load the new module. Even though its not compiled into the kernel.

2. Kernel Headers

Well, people might call it DARK Vooodo magic whenever use kernel word.

But, thats not always true.

We compiling a Module a.k.a Driver for Windows folks.

Hence we need the OS Header files.

Lets first find out our kernel:

$ uname -a
Linux myw540 4.19.81-1-MANJARO #1 SMP PREEMPT Tue Oct 29 12:49:04 UTC 2019 x86_64 GNU/Linux

This does identify my Manjaro Linux but where is the kernel !!

Here you go:- 4.19.81-1-MANJARO

The LTS Kernel in November of 2019 = 4.19.81.

I use the LTS Kernels only.

There is alternative way or GUI-way.

  1. Open Manjaro Settings from menu
  2. Select Kernel
  3. Here you can find the running kernel version.

Manjaro Settings window
Fig: Manjaro Settings Window
Source: My Thinkpad W540 Manjaro Install

Manjaro Kernel actively running
Fig: Manjaro Settings -> Kernel Window
Source: My Thinkpad W540 Manjaro Install

Let’s install the Headers :

$ sudo pacman -Syyu linux-headers

:: Synchronizing package databases...
 core                                     149.9 KiB   172 KiB/s 00:01 [#######################################] 100%
 extra                                   1772.0 KiB   808 KiB/s 00:02 [#######################################] 100%
 community                                  5.3 MiB  1485 KiB/s 00:04 [#######################################] 100%
 multilib                                 184.4 KiB  3.60 MiB/s 00:00 [#######################################] 100%
:: There are 10 providers available for linux-headers:
:: Repository core
   1) linux316-headers  2) linux414-headers  3) linux419-headers  4) linux44-headers  5) linux49-headers
   6) linux52-headers  7) linux53-headers  8) linux54-headers
:: Repository community
   9) linux419-rt-headers  10) linux52-rt-headers

Enter a number (default=1): 3
:: Starting full system upgrade...
resolving dependencies...
looking for conflicting packages...

Packages (1) linux419-headers-4.19.81-1

Total Download Size:    8.46 MiB
Total Installed Size:  43.68 MiB

:: Proceed with installation? [Y/n] y

....

This would install the required Linux Headers.

3. Install AUR Package

After a bit of hit and trial I found this package does the best.

https://aur.archlinux.org/packages/rtl88xxau-aircrack-dkms-git/

So, let’s do our usual steps:

git clone https://aur.archlinux.org/rtl88xxau-aircrack-dkms-git.git

...

cd rtl88xxau-aircrack-dkms-git

...

makepkg -s

...

sudo pacman -U rtl88xxau-aircrack-dkms-git-*.pkg.tar.xz

Note: This package generation might require dkms install in case it was missed earlier.

Now Reboot your PC and the TP-Link Archer T9UH V2 WiFi USB 3.0 Dongle will become plug-and-play.

In fact if you carefully following earlier - we have installed rtl88xxau-aircrack-dkms-git. Well thats aircrack-ng kernel.

Aircrack-ng kernel module for Realtek 88XXau (USB adapters only) network cards (8811au, 8812au, 8814au and 8821au chipsets) with monitor mode and injection support

Its an “Aircrack-ng kernel module”. You know what that brings in ;-) All types of Packet injection and penetration testing action is now enabled.

The Dark lord smiles down upon us !! May the Black hat be with you …

I don’t know much of the Security Theater. Those how have friends in this domain ask them about aircrack-ng. Best of luck with that !

Note: This installation also works for TP-LINK Archer T4U V2.

References

  1. In case you have TP-Link Archer T9UH V1 : Then this one is better
  2. This one actually lead me to this solution