Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I did a reinstall yesterday of my HP probook laptop using Debian Squeeze. I've been struggling with installing the rtl8192cu module, required to run the TP-Link TL WN723N USB dongle.
I am currently using kernel 3.8.6, but on the Realtek website the current driver is said to run on kernel 3.0.2. However, I managed to configure the dongle on my previous Debian installation, which used kernel 3.4.4, but now I can't remember how I did it.

Looking through forums, I stumbled upon several posts, which suggested using the Windows driver (and ndiswrapper), compiling the driver from source and installing it, etc, but all these methods seem to fail in my case: in the first case ndiswrapper successfully installs the rtl8192cu driver, but modprobing ndiswrapper and ifconfig up-ping the wlan0 interface does not work. The second method also fails, as I get an error

cast from pointer to integer of different size

when using the driver on Realtek's website, or

implicit declaration of function daemonize

when compiling the driver provided here

Why doesn't this work? Can rtl8192cu be compiled against kernel 3.8.6, or should I use a lower-version kernel?

share|improve this question
Just to add: lsusb gives me Realtek Semiconductor Corp. RTL8188CUS –  vanxa Apr 9 '13 at 12:03
I have a TP-LINK 725N which reports the same chip via lsusb, and it works fine using the stock 8192cu driver that should come with any distro kernel. Have you tried that? I'd only mess with compiling out of tree drivers if there is no other choice -- as you notice, they are rarely kept up to date. –  TAFKA 'goldilocks' Apr 9 '13 at 13:46
I've started a thread here link, as well, sorry for not posting in both places. –  vanxa Apr 9 '13 at 14:30
@goldilocks Hi, thanks for the reply. I don't have the stock driver when using the default kernel 3.6.32-5-amd64 (the one my install cd is packaged with). I'll try to install a newer, generic kernel without compiling it and see if the stock drivers would work. –  vanxa Apr 9 '13 at 14:41
It would be very weird for anyone to ship that kernel without a normal complement of drivers, including this one. Are you sure it is not there? Try lsmod | grep 8192 with the dongle plugged in. If you don't get anything, try modprobe 8192cu. If that gives you a "module not found", then it isn't compiled. But I betcha it is. –  TAFKA 'goldilocks' Apr 9 '13 at 16:58
show 2 more comments

3 Answers

The following is how I got my USB wifi adapter TP-Link TL-WN725N V.1 (Realtek RTL8188CUS) to work under Linux Mint 15 (Ubuntu 13.04, kernel 3.8) on Intel x64. Maybe the information will help you with TL-WN723N as well.

The rtl8192cu driver supplied with the distribution doesn't work.
Using ndiswrapper with the TP-Link Windows XP 64 driver doesn't work.

Thus, I decided to compile the driver provided by Realtek.

Resources: (note that I had to omit some of the resources due to the limit of 2 links per post - I'll try to add these in an additional post)

[4] Post by Bruno Queiros mentioning a required patch https://ask.fedoraproject.org/question/9638/realtek-8192cu-fedora-18/

[5] The required patch by Jan-Marek Glogowski https://launchpadlibrarian.net/126334555/use_kthread_run.patch

Below I mention the issues I encountered when trying to compile and use the driver. Most importantly, the driver was not written for the 3.8 kernel, so some patching is unavoidable.

Issue 1 The driver cannot compile due to
osdep_service.h:575:2: error: implicit declaration of function "daemonize"

Solution - Using the suggestion from [3], just remove the call to daemonize() in osdep_service.h.

Issue 2 The driver compiles, however, modprobe cannot insert the driver due to
could not insert module 8192cu.ko: Unknown symbol in module
8192cu: Unknown symbol kernel_thread (err 0)

Solution - Using the suggestion from [4] and the patch from [5] the call to kernel_thread should be removed. However, on my system the build kept the kernel_thread call even after the patch was applied. I assume that the #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,7,0)) directive in the patch didn't kick in. Since we know that we are targeting a kernel with a version higher than 3.7, we can safely remove the conditionals. After applying the patch, in osdep_service.c, we change

    *t_hdl = kernel_thread(threadfn, data, CLONE_FS|CLONE_FILES);
    if(*t_hdl < 0)
    *t_hdl = kthread_run(threadfn, data, name);

to just

    *t_hdl = kthread_run(threadfn, data, name);

Issue 3 The driver is loaded, however, the wifi still doesn't work due to
==>power_saving_ctrl_wk_hdl change rf to OFF...
cycles (can be seen via dmesg)

Solution: Using a rather nasty hack, this issue can be overcome too. We will just disable the power savings mode and keep the radio on. In rtw_pwrctrl.c, on line 273, change

        if((pwrpriv->rf_pwrstate == rf_on) &&(_FALSE == pwrpriv->bips_processing))
            pwrpriv->change_rfpwrstate = rf_off;


        if(0 && (pwrpriv->rf_pwrstate == rf_on) &&(_FALSE == pwrpriv->bips_processing))
            pwrpriv->change_rfpwrstate = rf_off;


After all the patching, you can compile the driver and install it and the wifi should come up and work fine.

There is only one outstanding issie: When unplugging or plugging the wifi adapter, I'm getting kernel panic (the OS crashes). Since I don't mess with the adapter while the computer is on, I didn't attempt to find a solution.

share|improve this answer
[1] Driver realtek.com.tw/downloads/… –  Lenko Jul 11 '13 at 0:08
[2] Post by elektronenblitz63 explaining how to compile and install the driver (in German) forum.ubuntuusers.de/topic/wlan-stick-524440/3/#post-5210562 –  Lenko Jul 11 '13 at 0:10
[3] Post by Oleg Nesterov with a suggestion how to get compilation started permalink.gmane.org/gmane.linux.kernel/1180175 –  Lenko Jul 11 '13 at 0:10
add comment

Okay, I did some double checking. The system I use the TP-link on is a raspberry pi, and when I looked at menuconfig in the (non-vanilla) sources for that vs. the laptop I'm on now, there are some discrepancies.

So I put it into the laptop and took the existing interface down and switched to the dongle using a stock distro kernel -- fedora 18 3.8.4, but I tested this here a few months ago with 3.6.x and the original pi (debian built) kernel was 3.2.27. On the pi the module is 8192cu but here it is rtl8192cu. There are two different 8192c modules, ce (PCIe) and cu (USB). They can, in fact, both be loaded at the same time; the laptop's inboard uses 8192ce, and it's loaded now together with the cu, just the interface corresponding to the ce is down. So you should not have to bother with blacklisting.

»lsmod | grep 8192
rtl8192cu              67699  0 
rtl8192ce              53499  0 
rtlwifi                78178  2 rtl8192ce,rtl8192cu
rtl8192c_common        46052  2 rtl8192ce,rtl8192cu
mac80211              578735  4 rtlwifi,rtl8192c_common,rtl8192ce,rtl8192cu

All that's included standard in fedora and in the version of debian wheezy that the pi uses; I am surprised to hear it is not elsewhere. However, you should be able to build it (just the module, you don't have to do the whole kernel) if you use the appropriate kernel src package from your distro. The option is under Device Drivers -> Network Device Support -> Wireless LAN, and the module is the RealTek RTL8192CU/RTL8188CU USB.

You also mentioned some configuration issues with GNOME. I generally disable all the automated networking stuff, so I can't help you with that, but if scanning finds your WLAN, the driver is probably working, so you should try and see if you can disable NetworkManager and get the dongle working manually.

Sent via TP-725N ;)

share|improve this answer
add comment

Well, finally got everything to work, using wicd. Couldn't get Network Manager to recognize my device, don't really know why..

Another problem is that, on newer kernel versions, using the stock rtl8192cufw drivers did not work, as the device was not recognized to have a wireless interface.

So, in the end, I'm currently on my 3.8.6 kernel, using the 8192cu driver from https://aur.archlinux.org/packages.php?ID=60716 (make sure you install the patch as well) and wicd as my network manager.

share|improve this answer
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.