TP-Link TL-WN823N on Arch Linux

07 Jan 2017 in TIL

Unfortuntately, Arch doesn't support the TP-Link TL-WN823N by default, so you have to install the drivers by hand.

Fortunately, you can find the drivers on GitHub. You'll need base-devel, linux-headers and dkms installed.

Installing after upgrade

If you're run pacman -Syu and your wifi has stopped working, run the following commands:

bash
git clone https://github.com/Mange/rtl8192eu-linux-driver.git
cd rtl8192eu-linux-driver
sudo dkms add .
sudo dkms install rtl8192eu/1.0

This will copy the driver into a system directory and register it with DKMS (Dynamic Kernel Module Support). This means that if you upgrade your kernel in the future, the driver will automatically be rebuilt.

Installing on a clean machine

If the machine that you need wifi on doesn't have these packages installed, you can build the drivers on another machine and copy the built driver over via USB.

If the two machines have the same kernel installed, it's as easy as following these instructions:

On the machine with build-essential

bash
git clone https://github.com/Mange/rtl8192eu-linux-driver.git
cd rtl8192eu-linux-driver
make
cd ..
cp -r rtl8192eu-linux-driver /media/YOUR_USB

On the machine that needs wifi

bash
cp -r /media/YOUR_USB/rtl8192eu-linux-driver .
cd rtl8192eu-linux-driver
sudo make install

At this point, reboot and you should have wifi. Once you have wifi, follow the DKMS instructions above to ensure that kernel upgrades don't break your wifi.

Advanced

If the two Arch machines that you have don't have the same kernel version, you can edit the Makefile to build for a different kernel. You'll need to get the correct headers from the Arch archive and install them with pacman -U.

Then edit the Makefile so that anywhere it runs uname -r e.g. here, you replace it with the correct string. You can obtain the string by running uname -r on the machine you want to install the driver on.

Once the Makefile is updated, run make and copy to a USB stick as normal.