
Infamous RTL8192cu
RTL8192cu is known to cause troubles with wifi for Linux users. The solution is to use original Realtek’s drivers but those are known to have issues with compilation on newer kernel versions (“some warnings being treated as errors” messages). Here is a quick guide how to compile the fixed RTL8192cu for new kernels.
With those instructions I successfully compiled RTL8192cu and got it working under kernel 3.13.02. Commenters and Reddit users reported that they got it working on various 3.x and 4.x kernels as well.
Other problems that this instruction solves:
- RTL8192cu Linux 3.1
- RTL8192cu Linux 4
- compiling RTL8192cu
- 0df6:0070 drivers
- rtl8192cu some warnings being treated as errors
First step
You need to get a few things installed. Those are:
- kernel headers
- build tools (gcc, make, etc)
- dkms
- git
You can obtain them by executing following commands:
For Debian/Ubuntu (and other systems equipped with apt tool)
apt-get install --reinstall linux-headers-$(uname -r) linux-headers-generic build-essential dkms git
For Fedora (and other systems equipped with yum tool)
For Fedora versions from 23 up, use the following command (thanks to Paul Sand for informing me about that):
Second step
Obtain the fixed drivers:
If this repository is no longer available, leave me a comment. I will upload my backup of those drivers.
Third step
Build and install a DKMS module. Execute this command without leaving the current directory!
Fourth step
Block the native (and broken) drivers:
Fifth step
The last step is to execute following command and enjoy your working WLAN!
Learn more about Linux device drivers





4.14.3-300.fc27.x86_64 Fedora 27 TP-WN822N working after this procedure. Thanks.
Hi Adam and everyone else ! i have the same issue on fedora 26 server .
nmcli device wifi
SSID MODE CHAN RATE SIGNAL BARS SECURITY
DeXXXX Infra 7 54 Mbit/s 100 ▂▄▆█ WPA1 WPA2
INFXXXXXe Infra 9 54 Mbit/s 70 ▂▄▆_ WPA1 WPA2
INFXXXXXg Infra 5 54 Mbit/s 49 ▂▄__ WPA1 WPA2
* XXXXXXX Infra 1 54 Mbit/s 46 ▂▄__ WPA2
that’s the internal wifi device and gives to
* SSID MODE CHAN RATE SIGNAL BARS SECURITY
DeXXXX Infra 7 54 Mbit/s 100 ▂▄▆█ WPA1 WPA2
INXXXXXXX4g Infra 5 54 Mbit/s 94 ▂▄▆█ WPA1 WPA2
INXXXXXX11E1B Infra 6 54 Mbit/s 84 ▂▄▆█ WPA2
INFXXXXXXXr5e Infra 9 54 Mbit/s 84 ▂▄▆█ WPA1 WPA2
wich is the RTL8192CU device
if i do
nmcli connection down XXXXXXX
ifconfig wlp2s0 down
nmcli device wifi
i only get
* SSID MODE CHAN RATE SIGNAL BARS SECURITY
DeXXXX Infra 7 54 Mbit/s 100 ▂▄▆█ WPA1 WPA2
INXXXXXXX4g Infra 5 54 Mbit/s 94 ▂▄▆█ WPA1 WPA2
INXXXXXX11E1B Infra 6 54 Mbit/s 84 ▂▄▆█ WPA2
XXXXXXX Infra 1 54 Mbit/s 84 ▂▄▆█ WPA1 WPA2
and then
nmcli device wifi connect XXXXXXX password XXXXXXX
Error: Connection activation failed: (53) The Wi-Fi network could not be found.
all this happend afther i did
dnf install kernel-devel gcc dkms git
etc etc ..
Installed:
dkms.noarch 2.4.0-1.20170926git959bd74.fc26 gcc.x86_64 7.2.1-2.fc26 git.x86_64 2.13.6-2.fc26 kernel-devel.x86_64 4.13.16-202.fc26 binutils.x86_64 2.27-28.fc26 cpp.x86_64 7.2.1-2.fc26
elfutils-libelf-devel.x86_64 0.169-1.fc26 git-core.x86_64 2.13.6-2.fc26 git-core-doc.x86_64 2.13.6-2.fc26 glibc-devel.x86_64 2.25-12.fc26 glibc-headers.x86_64 2.25-12.fc26 isl.x86_64 0.16.1-1.fc26
kernel-headers.x86_64 4.13.16-202.fc26 libmpc.x86_64 1.0.2-6.fc26 perl-Error.noarch 1:0.17024-8.fc26 perl-Git.noarch 2.13.6-2.fc26 perl-TermReadKey.x86_64 2.37-2.fc26 zlib-devel.x86_64 1.2.11-2.fc26
Complete!
then
git clone https://github.com/pvaret/rtl8192cu-fixes.git
Cloning into ‘rtl8192cu-fixes’…
remote: Counting objects: 523, done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 523 (delta 0), reused 1 (delta 0), pack-reused 520
Receiving objects: 100% (523/523), 1.83 MiB | 469.00 KiB/s, done.
Resolving deltas: 100% (270/270), done.
then
dkms add ./rtl8192cu-fixes && dkms install 8192cu/1.10 && depmod -a
Creating symlink /var/lib/dkms/8192cu/1.10/source ->
/usr/src/8192cu-1.10
DKMS: add completed.
Kernel preparation unnecessary for this kernel. Skipping…
Building module:
cleaning build area…..
make -j2 KERNELRELEASE=4.13.16-202.fc26.x86_64 -C /lib/modules/4.13.16-202.fc26.x86_64/build M=/var/lib/dkms/8192cu/1.10/build……………………………………………………………
cleaning build area….
DKMS: build completed.
8192cu.ko:
Running module version sanity check.
– Original module
– No original module exists within this kernel
– Installation
– Installing to /lib/modules/4.13.16-202.fc26.x86_64/extra/
Adding any weak-modules
depmod………….
Backing up initramfs-4.13.16-202.fc26.x86_64.img to /boot/initramfs-4.13.16-202.fc26.x86_64.img.old-dkms
Making new initramfs-4.13.16-202.fc26.x86_64.img
(If next boot fails, revert to initramfs-4.13.16-202.fc26.x86_64.img.old-dkms image)
dracut………………………………
DKMS: install completed.
ok everithing goes good but
modprobe 8192cu
modprobe: ERROR: could not insert ‘8192cu’: Device or resource busy
mmmmmm
i did add a -r on it as some one suggest
modprobe -r 8192cu
but i don’t get anything from the terminal i just thought it was fine but not an someone help me to solve it ? please i just have buy it and i don’t want to don’t use it
Hi Adam,
I want to run rtl8192cu driver for concurrent mode. I saw your commit that says your modified driver is deprecated. Also you said that kernel mainline has driver updated, by that do you mean that kernel mainline driver has support of concurrent mode?
I am working on OpenWrt, which uses compat wireless drivers. You can find it here, http://mirror2.openwrt.org/sources/
If I see the source repo of your driver and kernel mainline or this compat wireless driver, it seems different.
Can you help me how can I proceed to work concurrent mode in Openwrt.
Thanks
Forgot one line: edit: SPECS/NetworkManager.spec and change –with-wext=no to –with-wext=yes before building the rpms (between step 4 and 5)
For those struggling with the Installation of the module on REL7/Centos 7: It took me couple of days to figure out why the driver was not working, although the compilation went successfully.
Looking at the /var/log/messages reviled that NetworkManager does not seem to recognize the driver, although this was working fine in RHEL 6/Centos 6. It seems that NetwokrManager was no longer build with wext support (this is only done when the rpms are build on and fore a fedora system). Changing the line –with-wext=yes, solved the issue for me.
To manually rebuild the rpms:
1. Download the source rpm for NetworkManager, or execute the following steps:
yum -y install yum-utils
yumdownloader –source NetworkManager
2. Install the source rpm: rpm -ivh Network-Manager-1.8.0-.el7_.src.rpm
3. yum -y install rpm-build
4. cd $HOME/rpmbuild
5. rpmbuild –define “debug_package %{nil}” –define “%dist .el7_4” -ba SPECS/NetworkManager.spec
6. Force the reinstallation of the rpms: sudo rpm -ivh RPMS/noarch/* RPMS/x86_64/* –replacefiles –replacepkgs
7. Restart the NetworkManager: sudo systemctl restart NetworkManager. Or, if that does not help, reboot the system.
8. Now the driver should also be recognized by the system again. Check the /var/log/messages or journalctl -t NetworkManager to see if the driver is indeed recognized by NetworkManager
Thank you!
Excelente funcionó en debían 9 kernel 4. Muchas gracias 😎😎😎
Thank you! Works great on Fedora 26!
It works on LinuxMint 18.2 (kernel: 4.8.0-53-generic x86_64) with Asus USB-N10 Nano!
THANK YOU :-)
Work on Fedora 26!!!
THANKS A LOT.
Driver and wifi are working now but the device’s led is off.
I thought it wasn’t working but I tested the internet and it seems to be working.
my wifi is named HG520
the wifi pannel shows me 2 options on HG520
-HG520 (wlp2s0)
-HG520 (enx98ded01976c) <– if I unplug the device this one disappears
lsusb shows the following
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 058f:a014 Alcor Micro Corp. Asus Integrated Webcam
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 003: ID 276d:1160
Bus 003 Device 002: ID 2357:0108
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
I am running Debain 9 (testing), with kernel 4.9.0-2-amd64, and followed these steps. Then, on the modprobe command, I got device busy and tried this: http://unix.stackexchange.com/questions/246868/error-inserting-module-device-or-resource-busy, which fixed that problem. Still not working, however. I rebooted (I know that’s not ideal, but I don’t know enough to diagnose further), and then it worked. Excellent!
On Fedora, with NetworkManager 1.4+, you need to modify “/etc/NetworkManager/NetworkManager.conf” and add:
[device]
wifi.scan-rand-mac-address=no
NetworkManager tries to set/randomize the MAC address and it is not supported by the driver.
Solved! The internet was not connected all the time. Now it’s running.
Hello Horst,
It seems that your computer is offline. To setup the drivers on your computer you will need to temporarily connect it to the computer ie. over a cable.
Alternatively, you can execute step 2 on other computer connected to the Internet and copy the downloaded files to your Linux computer.
Hello Adam,
I am trying to fix RTL8192cu for kernel 4.4, but at the second step of your instruction I get as result: fatal: unable to access ‘https://github.com/pvaret/rtl8192cu-fixes.git/’: Could not resolve host: github.com.
Please, can you help me.
Hello, I am able to get the 8192cu driver to connect. I can even set it in monitor mode, but I am unable to set the channel. Please see more details below. Has someone else faced the same problem? Any suggestions would be appreciated.
http://stackoverflow.com/questions/41993891/raspbian-driver-for-rtl8188-based-usb-dongle-cannot-set-channel
After the latest updates on my fedora machine (newest version), the driver doesn’t work anymore. I don’t know which package is the problem, but it dowsn’t seem to be a kernel problem, since it doesn’t work on all installed kernels.
Any hope for looking into the mainline driver and fixing the real bug? Have you tried bisecting it? Fixing that old driver to newer kernels will probably be harder as time goes by.
This article has been a lifesaver for me, thank you so much!
So great, many thanks
Hi Özgür, thank you for your report and the steps for CentOS 6. I really appreciate it!
Oh, it seems I’ve done a double-post^. The correct commands should be as follows:
1- yum update (First of all, update entire the system: done on CentOS 6.8)
2- yum install dkms gcc git
3- mkdir driver (to keep things clean, just a random folder name)
4- cd driver
5- git clone https://github.com/pvaret/rtl8192cu-fixes.git
6- dkms add ./rtl8192cu-fixes && dkms install 8192cu/1.10 && depmod -a
7- cp ./rtl8192cu-fixes/blacklist-native-rtl8192.conf /etc/modprobe.d/
8- modprobe -r 8192cu
(reboot) and Voila!
Just wanted to THANK YOU so much, Adam. Perfectly works on CentOS 6.8 for TP-LINK TL-WN821N. No more connection troubles!
You saved my life! Thanks. So for those on CentOS 6.8, the steps I followed:
yum install dkms gcc git
mkdir driver
cd driver/
git clone https://github.com/pvaret/rtl8192cu-fixes.git
dkms add ./rtl8192cu-fixes && dkms install 8192cu/1.10 && depmod -a
yum install dkms gcc git
mkdir driver
cd driver/
git clone https://github.com/pvaret/rtl8192cu-fixes.git
dkms add ./rtl8192cu-fixes && dkms install 8192cu/1.10 && depmod -a
cp ./rtl8192cu-fixes/blacklist-native-rtl8192.conf /etc/modprobe.d/
modprobe -r 8192cu
When using the wect driver wpa_suplicant works with this drive. Something like:
wpa_supplicant -Dwext -c /etc/wpa_supplicant/wpa_supplicant.conf -i wlan0 -d
But the network is extremely slow i.e. useless
I have same problem as Gorilla
Successfully initialized wpa_supplicant
nl80211: Driver does not support authentication/association or connect commands
wlan0: Failed to initialize driver interface
Furthermore the IW stop working get a return code -19
I can connect to a unsecure router without problems, but don’t want that.
Any good ideas or at least is there anyone that can use wpa_supplicant or is it supported in this version of the driver.
On Fedora 25, all the steps apparently succeeded, and in the end the module was talking to the hardware with some success (it could see networks and was blinking), but could not actually connect to a network. Just would say “connecting” for a while and then give up.
Thanks, this patch helps to improve Fedora25 ARM wifi on Raspberry Pi 2 that had a lot of errors and disconnects
Se puede en androi
Servus Dejan,
Was für ein Problem mit $(uname -r) hast du? Kannst du die Konsolenausgabe hier kopieren?
8192cu: module verification failed: signature and/or required key missing – tainting kernel
The instructions worked great. On Centos 7 (3.10.0-327.36.2.el7.x86_64), kernel signing prevents proper loading of the module.
Centos wiki (https://wiki.centos.org/HowTos/BuildingKernelModules) does not offer a solution.
Any suggestion?
Hi, I’m trying to do this on Kali Linux 2016.2 but the first step fails. I think its because something bad with the repositories.
Anyone could do this on the same linux version?
Thanks.
Hello
I have a problem, I entered the first step. Just was not clear to me is of this in (uname -r). Can someone help me?
I jellyfish so with the me.
I would be very grateful
Hallo
Ich habe ein problem ich den ersten schritt eingegeben. Nur was mir nicht klar ist ist dieses in (uname -r). Kann mir jemand weiterhelfen?
Ich quälle mich so mit dem.
Ich würde wirklich sehr dankbar sein
Hello, and thank you for this article.
I’m still having a issue. Even this driver crashes a lot. It always happens when the signal is weak and i create a lot of traffic. for example speedtesting, android updates or spotify at this same time. I have to be almost out of range (which happens at my home). The 8192cu drivers stops working at a certain time without any specific warning in my logs. After reloading the module and hostapd traffic is passed through again.
Anyone else having this problem?
root@router:/home/temp# modinfo 8192cu
filename: /lib/modules/4.4.19-1-pve/updates/dkms/8192cu.ko
version: v4.0.2_9000.20130911
author: Realtek Semiconductor Corp.
description: Realtek Wireless Lan Driver
license: GPL
root@router:/home/temp# dkms status
8192cu, 1.10, 4.4.19-1-pve, x86_64: installed
I’m cross compiling the driver for kernel 3.12 and everything apears to compile and install fine but when you attempt to setup a connection on the wifi device wpa supplicant and the nl80211 show the following:
Successfully initialized wpa_supplicant
nl80211: Driver does not support authentication/association or connect commands
wlan0: Failed to initialize driver interface
I can’t use network manager since this is a very basic system, no gui etc.
Any idea what is missing from my compilation? Thanks
I had serious issues with the native driver with linux mint 18 running kernel 4.4.0, the network connection kept on disconnecting every 5 – 10 minutes, with this fixed driver signal strength improved from 60% to 100% and connection has been rock solid for 3 hours now. Thank you!
No worries. I successfully regressed by running “modprobe -r rtl8192cu”, removing the “blackllist-native-rtl8192cu” file from /etc/modprobe.d and then re-running “modprobe rtl8192cu”
Looks like the dkms commands failed because I’m using sudo rather than being logged in directly as root, which as an Ubuntu user I cannot do as we don’t have root access…
Tried this and my adapter is now no longer recoqnised. How to I regress? to the previous driver version?
I am glad to see it works for you all :-)
THANK YOU!!!!!!!
Thank you so much you saved my life.. I’ve been trying to figure this out …. Altho i had to pu r modprobe rtl8192cu instead of modprobe 8192cu
Hi. Thanks for the suggestion. However, the very first step requires an internet connection to fetch some archives…. the problem is I’m trying to get an internet connection so I can’t fetch the archives until the wifi is working….
hi, i try to compile the rtl8192cu driver module on an rbp2 with OSMC
(as the one in osmc does not do work with hostapd)
i installed the rbp2-headers-4.4.13-5-osmc package, but still dkms is complaining:
Your kernel headers for kernel 4.4.13-5-osmc cannot be found at
/lib/modules/4.4.13-5-osmc/build or /lib/modules/4.4.13-5-osmc/source.
So i symlinked: sudo ln -s /usr/src/rbp2-headers-4.4.13-5-osmc /lib/modules/4.4.13-5-osmc/build
Now dkms runs, but errors out:
Building module:
cleaning build area…..
make KERNELRELEASE=4.4.13-5-osmc -C /lib/modules/4.4.13-5-osmc/build M=/var/lib/dkms/8192cu/1.10/build…..
Error! Build of 8192cu.ko failed for: 4.4.13-5-osmc (armv7l)
there is no .ko file, but also no errors in make.log:
osmc@osmc:~$ sudo dkms add ./rtl8192cu-fixes
Creating symlink /var/lib/dkms/8192cu/1.10/source ->
/usr/src/8192cu-1.10
DKMS: add completed.
osmc@osmc:~$ sudo dkms install 8192cu/1.10
Kernel preparation unnecessary for this kernel. Skipping…
Building module:
cleaning build area…..
make KERNELRELEASE=4.4.13-5-osmc -C /lib/modules/4.4.13-5-osmc/build M=/var/lib/dkms/8192cu/1.10/build…..
Error! Build of 8192cu.ko failed for: 4.4.13-5-osmc (armv7l)
Consult the make.log in the build directory
/var/lib/dkms/8192cu/1.10/build/ for more information.
osmc@osmc:~$ uname -a
Linux osmc 4.4.13-5-osmc #1 SMP PREEMPT Mon Jun 20 16:34:27 UTC 2016 armv7l GNU/Linux
osmc@osmc:~$ cat /var/lib/dkms/8192cu/1.10/build/make.log
DKMS make.log for 8192cu-1.10 for kernel 4.4.13-5-osmc (armv7l)
Son Jul 3 13:53:49 CEST 2016
make: Entering directory ‘/usr/src/rbp2-headers-4.4.13-5-osmc’
LD /var/lib/dkms/8192cu/1.10/build/built-in.o
Building modules, stage 2.
MODPOST 0 modules
make: Leaving directory ‘/usr/src/rbp2-headers-4.4.13-5-osmc’
osmc@osmc:~$
any idea what i could be doing wrong ?
can you plss guide installation method for “rtl8101e rtl8102e ” rt driver for fed23.
Thank you!
Seems to works very nicely with Zyxel NWD2205 (RTL8192CU; 0586:341f ) on Linux mint 17.1 (3.13.0-37-generic). The default driver cut the connection every few minutes. And made the computer sluggish, when it did so.
A bit apprehensive with the reported connection quality, though. 100% over 10+ meter with walls in between is not what I am used to :)
you saved me! Thanks a lot!
thanks Adam. I have successfully moved to 4.4 kernel :)
Hi
on linux 4.4.8 build fails – any ideas ?
good Lord it finally works thank you thank you thank you!!!!
Paul, thank you a lot for the feedback. I will update the post soon.
Michael, 8192eu is a different driver, which you can obtain from this repository: https://github.com/jpostma/rtl8192eu
Question. I just got a device that is an 8192, but didn’t work after trying the above. Tired it with Windows 10, and it shows up as an 8192eu not a 8192cu. Tried the git with the eu instead of cu, but it was asking for a passphrase, which might just be there isn’t that directory?? Do you know of a way that is possible to do this. Had also noticed the same change from 1.9 to 1.10 with Fedora 23.
I needed to do this on Fedora 24 Alpha (Kernel 4.5), although I haven’t tested yet. Wish the kernel/Fedora maintainers would incorporate this fix. Many thanks for this clear presentation, Adam.
Step three is now apparently 1.10 instead of 1.9. And yum => dnf since Fedora 23.
I have updated the article to mention that this fix works on 4.x kernels as well. Thank you Reddit users and commenters for your comments and feedback on kernel versions!
Redditors are reporting it works on 4.x as well ;-) Keep up the good work Adam!
My wifi works!!!!
Thanks, in advance
In the old driver was 55% of the signal. now it is 95%. The speed of 145Mbit / s. Thank you very much for your help.
ahhhh finally I have it working! you saved my net :-D
Just got it working on 3.13.0, running for 40 minutes without any problems so far. Thanks.
oh man i was trying to figure it out for a good week, thanks a lot finally it works as it should i hope!