I am using UBUNTU 18.10 and I had problem with TL-WN822n v5 driver in UBUNTU and Kali (4.19.0-kali5-amd64)

The problem is driver=rtl8xxxu so I found a driver in this page : https://github.com/Mange/rtl8192eu-linux-driver

and installed the driver on Kali and it worked perfectly fine but when I wanted to install it on my ubuntu, after I ran the sudo dkms install rtl8192eu/1.0; I got this error :

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area...
'make' all KVER=4.18.0-25-generic...(bad exit status: 2)
ERROR (dkms apport): binary package for rtl8192eu: 1.0 not found
Error! Bad return status for module build on kernel: 4.18.0-25-generic (x86_64)
Consult /var/lib/dkms/rtl8192eu/1.0/build/make.log for more information.

and This is my Log file (/var/lib/dkms/rtl8192eu/1.0/build/make.log) :

DKMS make.log for rtl8192eu-1.0 for kernel 4.18.0-25-generic (x86_64)
Sun Jul  7 13:35:02 +0430 2019
make ARCH=arm64 CROSS_COMPILE= -C /lib/modules/4.18.0-25-generic/build 
M=/var/lib/dkms/rtl8192eu/1.0/build  modules
make[1]: Entering directory '/usr/src/linux-headers-4.18.0-25-generic'
  CC [M]  /var/lib/dkms/rtl8192eu/1.0/build/core/rtw_cmd.o
gcc: error: unrecognized command line option ‘-mlittle-endian’; did you mean ‘-fconvert=little-endian’?
make[2]: *** [scripts/Makefile.build:325:/var/lib/dkms/rtl8192eu/1.0/build/core/rtw_cmd.o] Error 1
make[1]: *** [Makefile:1534:_module_/var/lib/dkms/rtl8192eu/1.0/build] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.18.0-25-generic'
make: *** [Makefile:1710: modules] Error 2

What's the problem ??

  • That might be a compiling issue with arm64
    – Jeremy31
    Commented Jul 7, 2019 at 16:41
  • How can i fix it ?? My ubuntu and kali both are amd64 , but the kali works fine @Jeremy31
    – Afshin
    Commented Jul 8, 2019 at 7:26
  • type arch in terminal in ubuntu
    – Jeremy31
    Commented Jul 8, 2019 at 9:35
  • The output is : x86_64 @Jeremy31
    – Afshin
    Commented Jul 8, 2019 at 18:13
  • Install Ubuntu 18.04 and use the mange driver, then file a bug against package linux for rtl8xxxu having bad signal strength
    – Jeremy31
    Commented Jul 8, 2019 at 21:44

2 Answers 2


I have found the driver that works fine for me in here : https://askubuntu.com/a/832092/929631

As it's mentioned, run these commands to compile the driver:

sudo apt update
sudo apt install git
git clone https://github.com/jeremyb31/rtl8192eu-linux-driver
cd rtl8192eu-linux-driver
sudo make install

After this, you need to block the previous driver rtl8xxxu with this command :

echo "blacklist rtl8xxxu" | sudo tee /etc/modprobe.d/rtl8xxxu.conf;

And force RTL8192EU Driver to be active from boot:

echo -e "8192eu\n\nloop" | sudo tee /etc/modules;

Newer versions of Ubuntu has weird plugging/replugging issue (Check #94). This includes weird idling issues, To fix this:

echo "options 8192eu rtw_power_mgnt=0 rtw_enusbss=0" | sudo tee /etc/modprobe.d/8192eu.conf;

Update changes to Grub & initramfs:

sudo update-grub; sudo update-initramfs -u;

Reboot system to load new changes from newly generated initramfs:

systemctl reboot -i;

And check if the right driver is installed or not :

sudo lshw -c network;

You should see the linedriver=8192eu

  • Perfect answer. Saved hours Commented May 18, 2021 at 23:13
  • I get this error during the make *** /lib/modules/4.19.0-17-amd64/build: No such file or directory.. How would I fix that? Commented Jun 20, 2021 at 7:40
  • Nvm I had to run sudo apt-get install linux-headers- `uname -r` Commented Jun 20, 2021 at 7:44

I have successfully installed N300 Wi-Fi USB adapter MW300UH on Ubuntu 20.04.1 LTS with this driver using this https://github.com/Mange/rtl8192eu-linux-driver

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .