15

Can someone help me with this problem ? I am new to Linux, so I do not know commands and I never did something like installing or compiling with command-line.

I bought WiFi adapter from Edimax, model EW-7811UN for my PC (not laptop, so I do not have wifi card, only ethernet). When I go through guide on CD, I came across a version of kernel. It said I need version 2.6, but I have 3.5.0-22-generic.

I got errors like I do not have file or folder etc. Can someone tell me where I can download compiled driver and where I need to put it? Or some other advice. I don't want downgrade kernel when it is not necessary.

Mateo
  • 8,104
  • It does not seem to work anymore; 13.04, 3.8.0-25-generic; the kernel driver allows connection to open wifis, but the connection is severed after 2 minutes or so; then I tried to build the Realtek driver with all patches I could find; it compiles but the connection is as flaky as before; furthermore when I unplugged the adapter, I got a kernel panic, any helps? – Antti Haapala Jul 04 '13 at 06:19
  • @AnttiHaapala a little late but try one of the git hub versions with the newer kernels and enable the module with 8192cu instead of rtl8192cu or build with the driver from the realtek website using kernel 3.2LTS – mchid Aug 09 '14 at 15:41
  • NP now for me now, I do not even know where this device is anymore, I just needed it for my laptop after the internal antenna was severed (now fixed) – Antti Haapala Aug 09 '14 at 18:07

6 Answers6

18

If you run into this problem, what worked for me was installing the following driver: https://github.com/pvaret/rtl8192cu-fixes

From the README.md file:

Installation

Ensure you have the necessary prerequisites:

sudo apt-get install linux-headers-generic build-essential dkms

Clone this repository:

git clone https://github.com/pvaret/rtl8192cu-fixes.git

Set it up as a DKMS module:

sudo dkms add ./rtl8192cu-fixes

Build and install it (this version number may change, it is .11 as of November 07 2019)

sudo dkms install 8192cu/1.11

Refresh the module list:

sudo depmod -a

Ensure the native (and broken) kernel driver is blacklisted:

sudo cp ./rtl8192cu-fixes/blacklist-native-rtl8192.conf /etc/modprobe.d/

And reboot. You're done.

johnnyaug
  • 281
  • 2
  • 4
  • 1
    As a note I just did this and after the line: sudo dkms install 8192cu/1.8 I got an error. That error was: Error! Could not find module source directory. Directory: /usr/src/8192cu-1.8 does not exist. Turns out that I needed to change the /usr/src/8192cu-1.8 to /usr/src/8192cu-1.9 Must have been a recent update to the GIT and these instructions are out of date by that one digit. –  Jun 16 '14 at 22:17
  • Take a look in the /usr/src directory. You may have 1.9 instead if you downloaded the latest version. ;) – Will Sams Jul 23 '14 at 10:01
  • This works fine for me for TL-WN823N V1.2 under Ubuntu 16.04, Thank you very much! – Javier Garcia Jul 07 '16 at 07:43
  • 1
    This works on Ubuntu 16.10. However, a question: lsmod shows me that the new driver is working instead of the old one (and my connection is now stable...). However, if I click on "connection information" visually on my unity tray, it says that rtl8192cu (instead of just 8192cu) is still in use. Does someone know why that is the case? – Nearoo Oct 27 '16 at 22:43
13

12.04 & 14.04+: you can view these instructions or just do as I say.

(use these instructions when your wireless USB device [rtl8192cu] is not automatically recognized by Ubuntu)

sudo modprobe rtl8192cu
echo "2001 330D" | sudo tee /sys/bus/usb/drivers/rtl8192cu/new_id
echo "rtl8192cu" | sudo tee -a /etc/modules

Then, edit /etc/rc.local by opening the file with your favorite text editor like in this example:

sudo gedit /etc/rc.local

make sure it says . . .

echo "2001 330D" | tee /sys/bus/usb/drivers/rtl8192cu/new_id

exit 0

You can use the wireless now or, alternatively, you can make sure you have all of your work saved before you type:

sudo reboot

Your wireless driver should start up automatically.


To compile and install the proprietary Realtek 8192cu driver, run the following commands in an open terminal:

sudo apt-get update && sudo apt-get install git build-essential linux-headers-generic dkms
git clone https://github.com/dz0ny/rt8192cu.git --depth 1
cd rt8192cu
sudo make dkms

For hard installation use:

make
sudo make install

instead of sudo make dkms .

To enable this driver, use the command:

sudo modprobe 8192cu

Finally, update /etc/modules with this command before you reboot:

echo '8192cu' | sudo tee -a /etc/modules

Souce #1: bernaerts.dyndns.org

Source #2: github.com/dz0ny

mchid
  • 43,546
  • 8
  • 97
  • 150
  • This works awesome for D-link A-131 – mchid Dec 26 '13 at 07:07
  • Thank you so much. I fought with my Asus USBN13 for two days before finding your answer. It worked when everything else had failed and I was about to give up. – Swoogan Sep 01 '14 at 14:35
  • Great, has worked for TP-Link TL-WN821N on Xubuntu 12.04 on the first pass. – Premek Brada Jan 02 '15 at 21:26
  • I can't build the driver source: $ sudo make install

    install -p -m 644 8192cu.ko /lib/modules/3.13.0-44-generic/kernel/drivers/net/wireless/

    install: cannot stat ‘8192cu.ko’: No such file or directory

    – Andy Feb 18 '15 at 21:41
  • @Andy First, run make. Then, run sudo make install. I edited the answer. Thanks for pointing that out. – mchid Feb 24 '15 at 03:03
  • Proposed adding to this post regarding the top fix: Reviewers please discard that! After much work with each of the methods, none works for me. Flash-heavy sites take out the connection every time. Sadly, this device is not usable because the mfr won't provide an updated driver. – u2n Jun 01 '17 at 14:13
4

Generally speaking, any Linux driver on a vendor CD would be outdated, and, in most cases, would not be worth bothering with. The RTL8192cu module has been part of the Linux kernel since version 2.6.38, so that, ideally, you'd only need to plug the device in, and it would work. Unfortunately, that particular module hasn't ever worked, and, IMHO, a fix has been long overdue (bug report).

So, what should you do? Plug in the device. Verify that the network manager 'sees' the wireless networks around (may also verify that the correct module is loaded by running lsmod | grep 8192). Try connecting to your network. If that doesn't work, try connecting to any network. If that doesn't work, you are affected by the bug, and will have to try the driver from http://www.realtek.com.

  • Download the driver from here, and put the downloaded file into your home folder.

  • Blacklist the existing module. In a terminal window, run

    gksu gedit /etc/modprobe.d/blacklist.conf, add blacklist rtl8192cu to the bottom, save and exit, then reboot.

  • Extract the downloaded archive: right click, Extract here, or run

    unzip RTL8192xC_USB_linux_v3.4.4_4749.20121105.zip

  • Install. In a terminal window, run

    sudo bash ./RTL8188C_8192C_USB_linux_v3.4.4_4749.20121105/install.sh

mikewhatever
  • 32,638
  • Thanks very much, it's better, but I got problem... Compilation is ok, but after it I need edit install.sh or something because new folder with compiled driver is "locked" and I have to do chmod 777 on every folder and file for root ... by tutorial without editing my PC freezed and I had to reboot (after line compiling driver ok and before line with remove, insert and install driver). Do you have any ideas or can you help me with fast editing rights ? Or some simple tut. how to do it through terminal and not by install.sh :) Thanks – Maroš Káčko-Donnie Kario Jan 23 '13 at 17:14
  • You should not chmod anything, and I would not recommend playing with permission. Simply do what's posted above, nothing else. :~) – mikewhatever Jan 23 '13 at 18:06
  • Hm.. but my PC freezed ... I have to reboot.. I can't do anything and when I reboot, I see created folder by installer with lock icon :/ PC freeze before step with remove, insert and install .. It show me line that authorization is required, but it freezes and I have to reboot :( I can't go through that... – Maroš Káčko-Donnie Kario Jan 23 '13 at 20:54
  • Not sure. Running install.sh with sudo should give you correct permissions. – mikewhatever Jan 23 '13 at 21:27
  • maybe I didn't have rights because of freezing PC... but I don't know why it freezed :/ Is it possible to do this manually ? without autoinstall ... maybe I'll find some problems during process or something like that.. – Maroš Káčko-Donnie Kario Jan 23 '13 at 23:22
  • So..I do it with this tutorial: http://www.r-statistics.com/2011/11/edimax-ew-7811un-usb-wireless-connecting-to-a-network-on-ubuntu-11-10/ everything went ok, but now I can't connect to my network. Password is right and I can see other networks. But connection manager says that Wireless connection is disconnected :/ also I can't see menu Wireless network (I can't click on it) and menu Wireless networks I can't click too :/ So.. I click on name of my network and type password, then PC can't connect and show me Wireless connection disconnected.. Do you know, or someone else, why it is so ? – Maroš Káčko-Donnie Kario Jan 25 '13 at 19:23
  • Oh, I forgot mantion that I have Ubuntu 64bit 12.10 – Maroš Káčko-Donnie Kario Jan 25 '13 at 19:25
  • Appologies, but I don't want to comment on someone else's tutorial. Your PC does not freeze any more, so there is progress. Hope you'll find a solution eventually. – mikewhatever Jan 26 '13 at 00:14
  • I see, but I want to know, why is menu unclickable and what about 64bit (I have only USB wifi adapter, and ethernet on motherboard, nothing else.., Is it problem to see menu ?) – Maroš Káčko-Donnie Kario Jan 26 '13 at 11:03
  • The lock icon means the network is password protected. Try sudo modprobe 8192cu before you try connecting again, that is IF the realtek driver installed. I always run into errors with the install.sh script so I just extracted the driver and used cd to change directories into the driver folder and then sudo make , sudo make install, and finally sudo modprobe 8192cu to get it working. – mchid Apr 27 '14 at 22:51
2

It works well. Only issue you should cd to the directory first.

eg.

cd RTL8188C_8192C_USB_linux_v3.4.4_4749.20121105

sudo bash ./install.sh
BuZZ-dEE
  • 14,223
Steve
  • 21
  • The only trouble I had installing with this method was that one of the compressed archives called by install.sh had an extra directory when uncompressed so the install script couldn't find it. To fix this problem you can edit the install script or uncompress the archive, copy and paste the directory found in the top level into where the compressed directory is, delete the compressed directory and compress the pasted directory using the proper name. Then, run sudo ./install.sh and it should work. – mchid Feb 24 '15 at 03:16
1

Can you provide details of what commands you used to setup the drivers or be specific about the errors when you tried ? I also found : installing Edimax EW7811, to install the drivers sequentially if the manual wasn't clear enough also try using the search bar too, many have reported errors on Edimax drivers as well.

Link to the linux drivers for Edimax EW7811UN from their website : Download (in case if you have any other version installer)

Andrew
  • 274
  • I use some tutorials, but I freezed with command sudo make ...

    cp: nie je možné stat() `/autoconf_rtl8192c_usb_linux.h':

    This is what terminal said. It is in slovak, because I have slovak version of Ubuntu 12.10 :) I think you can translate it easily..
    – Maroš Káčko-Donnie Kario Jan 22 '13 at 20:58
  • EDIT: errors are here: http://kario.wz.cz/upload/linux.txt I have slovak version of Ubuntu 12.10 so errors are in slovak too :)) – Maroš Káčko-Donnie Kario Jan 22 '13 at 21:59
  • Try make clean before your first command, that solves the problem some time. – Andrew Jan 23 '13 at 16:02
  • I always do make clean before make like in tutorial, clean run without error but make do errors, but I don't know how to "repair" them .. – Maroš Káčko-Donnie Kario Jan 23 '13 at 16:05
  • @MarošKáčko-DonnieKario the reason it does not work is because, starting with kernel 3.4 there were some changes to the kernel headers and some of the macros used to make the driver that are now depreciated and so the build results in the errors you receive. You can build with the standard LTS kernel 3.2 or you can use the updated DKMS version from github as described in my answer. – mchid Aug 09 '14 at 15:38
-2

I downloaded a newer version of the driver and installed it with: sudo dkms install 8192cu/1.9

So, keep in mind to install using your driver version.

Bert
  • 1
  • 1