Install D-link DWA 131 or TP-Link WN823N / 22N / 21N with RTL8192EU on Ubuntu / Mint / Fedora

This tutorial will help you to install drivers for RTL8192EU devices including D-link DWA 131 / TP-Link WN823N / WN822N / WN 821N wi-fi adapters and many other models/revisions that contain RTL8192EU chipset on Ubuntu / Linux-Mint and Fedora.

Just follow these steps to install the drivers in your favorite Linux distribution:
1) Now, it’s time to prepare the environment for the installation of drivers

For Fedora:

sudo dnf groupinstall ‘Development Tools’ ‘Development Libraries’
sudo dnf install git lshw gedit dkms kernel-devel kernel-headers gcc g++

For Ubuntu or Linux-Mint:

sudo apt-get install git linux-hreaders-generic build-essential dkms lshw gedit

2) Visit this site and click on the green button labeled “clone or download” -> “download”

Extract this zip file anywhere on the Desktop. Now go to the directory and right-click and select “Open in Terminal” to launch the terminal.

NOTE: At the time of writing this article, the drivers are updated to work with Linux kernel version 5.6.4 . These drivers are updated periodically by independent developers. If you need the drivers to work with the latest kernel later on, then kindly revisit the GitHub page to download the latest drivers again!!

3) Now run this command inside the driver’s directory in terminal

chmod -R 777 ./

4) For Fedora and Ubuntu, run these commands to install the driver

sudo dkms add .
sudo dkms install rtl8192eu/1.0

5) Now before we do anything, we need to blacklist the inbuilt drivers for RTL8192EU which never works!!

Open up the config file by typing the command

sudo gedit /etc/modprobe.d/blacklist.conf

6) Append at the end the following line in the text editor that just opened up. Then save the file and close the text editor.

blacklist rtl8xxxu

7) Now, we need to update “initramfs”. Updating it is necessary, to block the inbuilt driver for the WiFi adapter

For Ubuntu:

sudo update-initramfs -u -k all

For Fedora:

sudo dracut /boot/initramfs-$(uname -r).img $(uname -r) –force

That’s it!! Now reboot the system. Every time you will install a new kernel, the driver will recompile automatically thanks to the DKMS system. But, if your kernel is newer than the kernel supported by the driver, then you will have to download the latest drivers at that time from the site. Currently, kernels up to 5.6.4 are supported, and that covers Ubuntu 18.04, 19.04, 20.04, and Linux Mint 19.3 / 20 as well as Fedora 31 / 32.

You might also like

One thought on “Install D-link DWA 131 or TP-Link WN823N / 22N / 21N with RTL8192EU on Ubuntu / Mint / Fedora”

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.