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

This tutorial explains how to get Realtek RTL8192EU-based USB Wi-Fi adapters working on Fedora, Ubuntu and Linux Mint.

The RTL8192EU chipset has been used in a number of USB wireless adapters, but the exact chipset can vary between hardware revisions of the same product. For example, TP-Link TL-WN823N V1 uses RTL8192CU, while later revisions use RTL8192EU; TP-Link confirms that the TL-WN823N V3 uses RTL8192EU. (community.tp-link.com)

Similarly, the D-Link DWA-131 Rev E is documented as using RTL8192EU. (github.com)

Therefore, do not install an RTL8192EU driver merely because your adapter’s model number appears in a list. Check the exact hardware revision and USB ID first.

Important: You May Already Have a Driver

Modern Linux kernels include the rtl8xxxu driver, which supports several Realtek USB chipsets, including RTL8192EU. Linux Wireless documentation lists rtl8xxxu as the kernel driver for RTL8192EU and other related USB devices. (wireless.docs.kernel.org)

This means that on a current Fedora, Ubuntu or Linux Mint installation, your adapter may work without installing a third-party driver at all.

Before compiling anything, identify the device and test the built-in driver.


1. Identify Your Wi-Fi Adapter

Connect the USB Wi-Fi adapter and run:

lsusb

You should see a line identifying the Realtek USB device.

For more detailed information:

sudo lshw -C network

You can also check which kernel driver is currently being used:

sudo lshw -C network

Look for a line such as:

configuration: driver=rtl8xxxu

You can also check:

lsmod | grep rtl8

If you see:

rtl8xxxu

the Linux kernel is already using its in-tree driver.

Check the USB ID

For hardware-revision troubleshooting, lsusb is especially useful.

For example:

lsusb

may produce something similar to:

2357:0109 Realtek ...

The exact USB ID is important because one product family can contain several different chipsets or revisions.


2. Test the Built-In Linux Driver First

Before installing an external RTL8192EU driver, make sure the existing kernel driver does not already work.

Check:

ip link

or:

nmcli device status

If the wireless adapter appears and NetworkManager can connect to Wi-Fi normally, stop here.

There is no reason to install a third-party driver when the kernel driver is already working.

The rtl8xxxu driver is part of the Linux kernel’s supported Realtek USB wireless-driver stack and includes RTL8192EU support. (wireless.docs.kernel.org)


3. When Would You Need a Third-Party Driver?

An out-of-tree driver may be worth considering when:

  • Your exact USB device is not recognized.
  • The in-tree driver does not support your particular USB ID.
  • The in-tree driver has a hardware-specific problem affecting your adapter.
  • You need functionality not provided by the kernel driver.
  • A maintained third-party driver explicitly supports your kernel version and device.

However, an external driver is not automatically better.

Out-of-tree drivers have to be maintained separately from the Linux kernel and can stop compiling when kernel APIs change.

This is especially important for Fedora because Fedora updates the kernel frequently.


4. Install the Development Tools

If you really need an external RTL8192EU driver, first install the tools required to compile and install a kernel module.

Fedora

For current Fedora releases:

sudo dnf install dkms git
sudo dnf group install "C Development Tools and Libraries"

You should also make sure the matching kernel development files are installed:

sudo dnf install kernel-devel kernel-headers

Then verify that the kernel you are running has corresponding development files:

uname -r

and:

ls /usr/src/kernels/

For DKMS builds, matching development files are important.

Ubuntu / Linux Mint

Run:

sudo apt update
sudo apt install git dkms build-essential linux-headers-$(uname -r)

The use of:

linux-headers-$(uname -r)

is preferable to the old linux-headers-generic instruction because it explicitly installs headers for the currently running kernel.

After a kernel update, reboot into the new kernel before building a DKMS module.


5. Download the RTL8192EU Driver Source

The original tutorial used:

https://github.com/Mange/rtl8192eu-linux-driver

This repository is still available, but it is important to understand what it is.

The project describes itself as a mirror of the official Realtek/D-Link driver, with patches applied to keep it working with newer kernels. It specifically documents support for the D-Link DWA-131 Rev E and TP-Link TL-WN821N V6. (github.com)

It also explicitly states that the repository maintainer does not claim to support the code. (github.com)

Repository:

RTL8192EU Linux Driver — GitHub

Rather than downloading a ZIP manually through the GitHub website, clone the repository:

git clone https://github.com/Mange/rtl8192eu-linux-driver.git

Then enter the directory:

cd rtl8192eu-linux-driver

Cloning the repository makes it easier to update the source and keeps the installation reproducible.


6. Do Not Use chmod -R 777

Older versions of this tutorial used:

chmod -R 777 ./

Do not do this.

The command gives all users read, write and execute permissions throughout the driver source tree.

It is unnecessary for compiling or installing the driver.

The source repository can remain with its normal permissions.


7. Install the Driver with DKMS

The repository supports DKMS (Dynamic Kernel Module Support).

DKMS allows an external kernel module to be rebuilt automatically when a new kernel is installed. The repository itself documents DKMS support and states that the module can automatically be rebuilt when the kernel is upgraded. (github.com)

From the driver directory, run:

sudo dkms add .

Then:

sudo dkms install rtl8192eu/1.0

If both commands complete successfully, the module has been registered and installed with DKMS.

Check its status:

dkms status

You should see an entry corresponding to:

rtl8192eu/1.0

8. Important: Blacklisting rtl8xxxu

The older driver instructions explicitly blacklist:

rtl8xxxu

because the external 8192eu module is intended to replace it.

However, do not blacklist rtl8xxxu unless you have confirmed that you are actually replacing that driver.

The kernel’s rtl8xxxu driver already supports RTL8192EU. (wireless.docs.kernel.org)

If your current adapter works with:

driver=rtl8xxxu

there is usually no reason to replace it.

If you have deliberately decided to use the external DKMS module instead, then the competing module may need to be prevented from loading.

Create a blacklist file:

sudo nano /etc/modprobe.d/rtl8192eu.conf

Add:

blacklist rtl8xxxu

Save the file.

Do not simply copy this step from an old tutorial without first confirming that you actually need the external module.


9. Rebuild the Initramfs

If you have deliberately blacklisted rtl8xxxu, the initramfs needs to be rebuilt so that the blacklist is available early during boot.

Ubuntu / Linux Mint

Run:

sudo update-initramfs -u -k all

Fedora

Use:

sudo dracut --force

Fedora’s dracut command regenerates the initramfs for the installed kernels.

The older tutorial used:

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

The modern form:

sudo dracut --force

is simpler because dracut determines the relevant kernel/initramfs configuration itself.


10. Load the External Driver

After installing the DKMS module, you can reboot:

sudo reboot

Alternatively, if you have unloaded the existing driver and know exactly what you are doing, the module can be loaded with:

sudo modprobe 8192eu

After rebooting, check:

lsmod | grep 8192

You should see the external module if it loaded correctly.

Check the driver in use:

sudo lshw -C network

You should see:

driver=8192eu

rather than:

driver=rtl8xxxu

11. Verify Wi-Fi

Now check NetworkManager:

nmcli device status

Your wireless interface should be listed.

For example:

DEVICE    TYPE      STATE      CONNECTION
wlan0     wifi      connected  MyNetwork

You can also scan for networks:

nmcli device wifi list

If nearby Wi-Fi networks appear, the adapter is functioning.


DKMS and Kernel Updates

One of the major benefits of DKMS is that it can rebuild an installed external driver when a new kernel is installed.

The RTL8192EU repository specifically documents this behavior. (github.com)

For example:

Kernel 1
    ↓
8192eu module
    ↓
Kernel 2
    ↓
DKMS rebuilds 8192eu

However, this does not mean that every future Linux kernel is guaranteed to be compatible.

DKMS can rebuild the source code only if the driver source itself still compiles against the new kernel.

If the kernel changes an API used by the old driver, compilation may fail.

That is one of the principal disadvantages of an out-of-tree kernel module.


What If the Driver Stops Working After a Kernel Update?

First check:

dkms status

Then inspect whether the module was successfully built for the current kernel.

Check the current kernel:

uname -r

If the module is missing for that kernel, inspect the DKMS build log.

A typical location is:

/var/lib/dkms/rtl8192eu/1.0/

The exact directory contents depend on the DKMS version and distribution.

You can also check kernel messages:

sudo dmesg | grep -i 8192

and:

sudo dmesg | grep -i rtl

If the module no longer compiles because of kernel API changes, the appropriate solution is generally to obtain a newer driver source or a maintained fork, rather than repeatedly reinstalling the same old source.


A Better Alternative: Look for a Maintained Driver

The Mange/rtl8192eu-linux-driver repository is useful historically and remains relevant to particular devices, but it is not the only RTL8192EU source available.

There are several forks and newer versions of the Realtek driver in circulation.

For example, one current GitHub project documents Realtek’s rtl8192eu driver version 5.11.2.3 and claims compatibility with Linux kernels up to the 7.2 series. (github.com)

Another project documents Realtek driver version 5.11.2.1 with support for kernels up to 6.8. (github.com)

These are community-maintained forks, not official Linux kernel drivers.

The quality, maintenance status, device compatibility and security posture should therefore be checked before replacing an already-working in-tree driver.


RTL8192EU Device Compatibility

The most important lesson with these USB adapters is:

The model number alone is not enough.

Different hardware revisions can contain different chipsets.

D-Link DWA-131

The repository specifically identifies DWA-131 Rev E as an RTL8192EU device. (github.com)

D-Link’s current support page also warns users to select the correct hardware revision when looking for downloads and states that technical support for the DWA-131 ended on December 31, 2025. (dlink.com)

TP-Link TL-WN823N

This is a particularly good example of why revision numbers matter.

TP-Link community documentation states:

  • TL-WN823N V1 → RTL8192CU
  • Later revisions → RTL8192EU
  • TL-WN823N V3 → RTL8192EU (community.tp-link.com)

Therefore, TL-WN823N does not automatically mean RTL8192EU.

Check the label on the physical adapter.

TP-Link TL-WN821N / TL-WN822N

These model families also exist in multiple hardware revisions.

Before installing an RTL8192EU driver, verify the actual chipset and USB ID for your specific adapter.


Finding Your Hardware Revision

Look at the label printed on the adapter.

You may find something such as:

Ver: 3.0

or:

H/W Ver: E1

This revision number can completely change which Linux driver you need.

You can also use:

lsusb

and search the USB vendor/product ID.

The safest workflow is:

Adapter
   ↓
Hardware revision
   ↓
USB ID
   ↓
Chipset
   ↓
Linux driver

rather than:

Adapter model
   ↓
Random driver download

Secure Boot Considerations

There is another issue that older Fedora and Ubuntu tutorials often omit: UEFI Secure Boot.

An external DKMS kernel module must be accepted by the kernel’s module-signing policy when Secure Boot is enforcing signature verification.

You may therefore encounter a situation where:

  • DKMS successfully builds the driver;
  • the module appears installed;
  • but Linux refuses to load it.

Check Secure Boot status with:

mokutil --sb-state

If the command is unavailable, install mokutil using your distribution’s package manager.

On systems with Secure Boot enabled, you may need to enroll a Machine Owner Key (MOK) and sign the DKMS module.

Some current RTL8192EU driver projects explicitly document Secure Boot/MOK enrollment as part of installation. (github.com)

Do not disable Secure Boot automatically just to make a third-party driver work.

Signing the module is preferable where practical.


Should You Disable Secure Boot?

Generally, no.

Secure Boot provides a chain of trust from firmware through the bootloader and kernel.

If an external driver does not load because it is unsigned, consider:

  1. Signing the kernel module.
  2. Enrolling the signing key using MOK.
  3. Using a driver already supported by the distribution/kernel.

Only disable Secure Boot when you understand the security implications and have a specific reason to do so.


Uninstalling the External Driver

If you later decide that the kernel’s built-in rtl8xxxu driver is preferable, first remove the DKMS module.

Check:

dkms status

Then remove the installed version:

sudo dkms remove rtl8192eu/1.0 --all

Remove the blacklist file if you created one:

sudo rm /etc/modprobe.d/rtl8192eu.conf

Then rebuild the initramfs.

Ubuntu / Linux Mint

sudo update-initramfs -u -k all

Fedora

sudo dracut --force

Reboot:

sudo reboot

After reboot, check:

sudo lshw -C network

The system may now use:

rtl8xxxu

again.


Troubleshooting Checklist

If the adapter still does not work, check the following in order.

1. Is the USB device recognized?

lsusb

If nothing appears when you connect the adapter, investigate USB hardware, ports, power and the physical device before changing drivers.

2. Is the Wi-Fi interface present?

ip link

3. Which driver is loaded?

sudo lshw -C network

4. Is the kernel driver loaded?

lsmod | grep rtl8

5. Is the external module installed through DKMS?

dkms status

6. Does the kernel report an error?

sudo dmesg | grep -Ei 'rtl|8192|firmware|usb'

7. Is Secure Boot enabled?

mokutil --sb-state

8. Is NetworkManager seeing the adapter?

nmcli device status

This sequence is considerably more useful than reinstalling the driver repeatedly.


A Note About Firmware

The driver and firmware are not necessarily the same thing.

A kernel driver controls the hardware, while firmware is code loaded into the wireless chipset itself.

Linux Wireless documentation lists firmware availability separately from the driver and points to the linux-firmware project for supported Realtek devices. (wireless.docs.kernel.org)

If dmesg reports a missing firmware file, investigate the Linux firmware package before replacing the driver.

On Fedora and Ubuntu, firmware normally comes from the distribution’s firmware packages.


Complete Procedure for an Adapter That Actually Needs the External Driver

If you have confirmed that your RTL8192EU adapter does not work with the built-in Linux driver and you have selected an appropriate external source, the basic workflow is:

Fedora

sudo dnf install dkms git
sudo dnf group install "C Development Tools and Libraries"
sudo dnf install kernel-devel kernel-headers
git clone https://github.com/Mange/rtl8192eu-linux-driver.git
cd rtl8192eu-linux-driver
sudo dkms add .
sudo dkms install rtl8192eu/1.0

If you are intentionally replacing rtl8xxxu:

sudo nano /etc/modprobe.d/rtl8192eu.conf

Add:

blacklist rtl8xxxu

Then:

sudo dracut --force
sudo reboot

Ubuntu / Linux Mint

sudo apt update
sudo apt install git dkms build-essential linux-headers-$(uname -r)
git clone https://github.com/Mange/rtl8192eu-linux-driver.git
cd rtl8192eu-linux-driver
sudo dkms add .
sudo dkms install rtl8192eu/1.0

If you are intentionally replacing rtl8xxxu:

sudo nano /etc/modprobe.d/rtl8192eu.conf

Add:

blacklist rtl8xxxu

Then:

sudo update-initramfs -u -k all
sudo reboot

After reboot:

sudo lshw -C network

Final Recommendation

Before installing an external RTL8192EU driver on a modern Linux system, test the driver that is already included in the kernel.

Current Linux Wireless documentation explicitly lists rtl8xxxu as supporting RTL8192EU devices. (wireless.docs.kernel.org)

If your adapter works with rtl8xxxu, keep it.

If it does not work, identify the exact hardware revision and USB ID, then determine whether an external RTL8192EU driver is appropriate.

If you install an out-of-tree driver, use DKMS so that the module can be rebuilt when kernels change. The Mange driver repository supports DKMS and documents automatic rebuilding for kernel upgrades. (github.com)

Do not use broad permission changes such as:

chmod -R 777 ./

and do not automatically blacklist rtl8xxxu.

Both are remnants of the older installation procedure and should only be changed when there is a specific technical reason.

Finally, remember that USB Wi-Fi adapters are often sold under the same model name with different hardware revisions. Check the revision before choosing the driver. The TP-Link TL-WN823N is a good example: V1 uses RTL8192CU, while later revisions such as V3 use RTL8192EU. (community.tp-link.com)

For modern Fedora, Ubuntu and Linux Mint systems, the preferred order is therefore:

1. Identify the adapter → 2. Test the in-kernel driver → 3. Check firmware → 4. Only then consider an external DKMS driver.

This approach is safer, easier to maintain and considerably more reliable than installing an old third-party driver immediately.

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.

Let us know you are human: