rtl8192cu fails to connect randomly and drops connections on WPA/WPA2 PSK

Bug #862684 reported by Xavier López
82
This bug affects 18 people
Affects Status Importance Assigned to Milestone
linux-backports-modules-3.0.0 (Ubuntu)
Won't Fix
Undecided
Unassigned

Bug Description

On a fresh 11.10-beta2 install, with the 'Belkin N150 Surf' usb NIC, which uses driver rtl8192cu, network-manager freezes randomly with the message 'Configuring Interface'. It ends up connecting after unplugging/plugging the nic several times in two different ports, even though the connection drops a few minutes later, or displays as connected in network-manager but isn't really connected.

After trying it with wicd, wicd.log shows it may have something to do with wpa_supplicant. It shows WPA_CLI STATUS is ASSOCIATING, and shortly after, WPA_CLI STATUS is SCANNING.

This also happens applying all possible updates (sudo apt-get update + sudo apt-get upgrade).

lsb_release -rd
Description: Ubuntu oneiric (development branch)
Release: 11.10

apt-cache policy network-manager
network-manager:
  Instalados: 0.9.0-0ubuntu3
  Candidato: 0.9.1.90-0ubuntu2
  Tabla de versión:
     0.9.1.90-0ubuntu2 0
        500 http://es.archive.ubuntu.com/ubuntu/ oneiric/main i386 Packages
 *** 0.9.0-0ubuntu3 0
        100 /var/lib/dpkg/status
apt-cache policy wpasupplicant

wpasupplicant:
  Instalados: 0.7.3-3.1
  Candidato: 0.7.3-3.1
  Tabla de versión:
 *** 0.7.3-3.1 0
        500 http://es.archive.ubuntu.com/ubuntu/ oneiric/main i386 Packages
        100 /var/lib/dpkg/status

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: network-manager 0.9.0-0ubuntu3
ProcVersionSignature: Ubuntu 3.0.0-11.18-generic 3.0.4
Uname: Linux 3.0.0-11-generic i686
ApportVersion: 1.23-0ubuntu1
Architecture: i386
CRDA: Error: [Errno 2] No such file or directory
Date: Thu Sep 29 21:00:52 2011
Gconf: Error: [Errno 2] No such file or directory
IfupdownConfig:
 auto lo
 iface lo inet loopback
InstallationMedia: Kubuntu 11.10 "Oneiric Ocelot" - Beta i386 (20110921.2)
IpRoute:
 default via 192.168.1.1 dev wlan0 proto static
 169.254.0.0/16 dev wlan0 scope link metric 1000
 192.168.1.0/24 dev wlan0 proto kernel scope link src 192.168.1.129
Keyfiles: Error: [Errno 2] No such file or directory
NetworkManager.state:
 [main]
 NetworkingEnabled=true
 WirelessEnabled=true
 WWANEnabled=true
 WimaxEnabled=true
ProcEnviron:
 LANGUAGE=
 LANG=es_ES.UTF-8
 SHELL=/bin/bash
RfKill:
 2: phy2: Wireless LAN
  Soft blocked: no
  Hard blocked: no
SourcePackage: network-manager
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Xavier López (xavilope) wrote :
Revision history for this message
Xavier López (xavilope) wrote :

dmesg output. In this session the nic has been able both to connect and to reproduce the bug.

Revision history for this message
Xavier López (xavilope) wrote :
Revision history for this message
Xavier López (xavilope) wrote :
Revision history for this message
Xavier López (xavilope) wrote :
Revision history for this message
Xavier López (xavilope) wrote :
Revision history for this message
Xavier López (xavilope) wrote :
Revision history for this message
Xavier López (xavilope) wrote :
Revision history for this message
Xavier López (xavilope) wrote :

Forgot to add it also happens after apt-get update + apt-get upgrade .

Xavier López (xavilope)
summary: rtl8192cu fails to connect randomly and drops connections on WPA/WPA2
- PASK
+ PSK
Xavier López (xavilope)
description: updated
Xavier López (xavilope)
description: updated
Xavier López (xavilope)
description: updated
Revision history for this message
Xavier López (xavilope) wrote :

Changed from package network-manager to linux-firmware

affects: network-manager (Ubuntu) → linux-firmware (Ubuntu)
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in linux-firmware (Ubuntu):
status: New → Confirmed
Revision history for this message
Alan Pater (alan-pater) wrote :

Sounds vaguely similiar to the issue I am having: https://bugs.launchpad.net/ubuntu/+source/linux-backports-modules-2.6.38/+bug/869530

Though in my case, it is an open access point (no WPA or WEP) that it has trouble with. Connecting to an access pint with WPA works fine.

Xavier López (xavilope)
affects: linux-firmware (Ubuntu) → linux-backports-modules-3.0.0 (Ubuntu)
Revision history for this message
Karl (karl-venter) wrote :

I am having a problem connecting with an RTL8188 USB dongle: I've associated it with the RTL8192cu driver OK, it can see the available networks, but tries and tries to connect and, whether there is WEP encryption or not. I used the dongle fine on 11.04. My old Buffalo dongle works fine. see the question http://askubuntu.com/q/68198/28332

If the driver has not changed since 11.04, there must be something changed in Ubuntu?

Revision history for this message
Lilly (zkorten) wrote :

I am having a similar problem with RTL8192 USB dongle. I have the RTL8192CU drivers but am a complete noob and couldn't carry out the instructions requiring me to edit the kernel tree as I didn't know the right commands (and I don't want to risk messing things up). If someone could help me with this that'd be great but obviously the problem associated with connecting via this modem is still going to persist.

Revision history for this message
Alan Pater (alan-pater) wrote :

Lilly, what version of ubuntu are you running? If the current 11.10, you don't need to build the kernel modules (aka drivers) as they included in that version of Ubuntu. If you are using 11.04, just install the package linux-backports-modules-cw-2.6.39-natty-generic. The modules are included in that.

Revision history for this message
Xavier López (xavilope) wrote :

Just mention this also happens on a fresh oneric release, and with the latest package updates. Is there any more information I can provide? Does network-manager have some kind of debug log that could be useful?

Alan, could you please explain what do with Wireshark and what information to provide if you succeed in doing so?

Revision history for this message
Karl (karl-venter) wrote :

A further note: I have been testing (in my amateur way!) a USB dongle with this chipset, and see that there are comments on Amazon customer reviews that some people experience slow connection speeds and unstable connections. My experience has included erratic transmission (e.g. intermittent interruptions on the BBC iPlayer stream and network printing). I think Realtek need to pay serious attention to their driver for this chip, as I suspect many of the problem may lie there.

I'd be pleased to hear of any others that would like to rattle Realtek's cage, as I think the product has great potential.

Revision history for this message
PDJB (philbradley) wrote :

I'm getting this, running kernel 3.1.0-030100rc10 (and that is what is listed as the driver version for rtl8192cu under lshw command results. these also then say firmware n/a)

trying to connect to a netgear ap operating in auto b/g mode

Revision history for this message
David Pérez (sanete) wrote :

I observe the same behaviour:

I have a Surf Wireless Micro USB Adapter driver working ok under Windows 7, but with Ubuntu 11.10 and the rtl8192cu, it sees Wireless networks but unable to connect to any of them.

Revision history for this message
Xavier López (xavilope) wrote :

Following the instructions given by Chicoff in his comment cited below, I've been able to compile the RTL8192CU propietary driver with the 3.0.0-12 kernel. It works fine, and does not have any of these problems.

In order to compile them properly, it is needed to change two header files in the tar.gz file in the 'driver' directory:
 - osdep_service.h (line 49) -> linux/smp_lock.h to linux/smp.h
 - rtw_io.h (line 36) -> linux/smp_lock.h to linux/smp.h

This is Chicoff's comment:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/852190/comments/36

Here is the RTL8192CU propietary driver:
http://www.realtek.com.tw/downloads/downloadsView.aspx?Langid=1&PNid=21&PFid=48&Level=5&Conn=4&DownTypeID=3&GetDown=false&Downloads=true

Revision history for this message
mikewhatever (mikewhatever) wrote :

This bug is still present in all kernels up to 3.8. The good news is, building the driver from realtek.com no longer works.

Revision history for this message
David Pérez (sanete) wrote :

These problem appears in nearly all the Linux distros I've tried.
The optimal solution would be to include the Realtek driver with the Linux kernel.
It's a little cumbersome to have to recompile the driver each time the Linux kernel gets updated.
Also, withy some distros like KUbuntu, the gcc compiler isn't included, and cannot be easliy downloaded as the Wifi isn't working.

Revision history for this message
Xavier López (xavilope) wrote :

Just for the record, I managed to get the realtek driver to compile on 3.8 with the patch provided here by Tim Phillips

http://ubuntuforums.org/showthread.php?t=2092934&p=12620866#post12620866

How come this isn't this still fixed?

Revision history for this message
Jordi Mallach (jordi) wrote :

This is fixed in at least 3.8.12.

Revision history for this message
Jordi Mallach (jordi) wrote :
Revision history for this message
Xavier López (xavilope) wrote :

Testing rtl8192cu with sid, with the latest 3.9.1 update, uname -a shows "Linux MALEFICIO 3.9-1-amd64 #1 SMP Debian 3.9.4-1 x86_64 GNU/Linux".

Same results, looks like doesn't desassociate anymore (doesn't disconnect) but still seems to be very very slow (unusable). Will test it longer later and provide more details.

Dmesg | grep wlan0 shows:

[ 18.018840] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[ 19.625181] wlan0: authenticate with 00:1a:2b:90:fe:6c
[ 19.648959] wlan0: send auth to 00:1a:2b:90:fe:6c (try 1/3)
[ 19.733221] wlan0: authenticated
[ 19.736044] wlan0: associate with 00:1a:2b:90:fe:6c (try 1/3)
[ 19.754614] wlan0: RX AssocResp from 00:1a:2b:90:fe:6c (capab=0x411 status=0 aid=3)
[ 19.754676] wlan0: associated
[ 19.754745] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[ 42.750528] wlan0: deauthenticated from 00:1a:2b:90:fe:6c (Reason: 7)
[ 43.572946] wlan0: authenticate with 00:1a:2b:90:fe:6c
[ 43.585230] wlan0: send auth to 00:1a:2b:90:fe:6c (try 1/3)
[ 43.621009] wlan0: authenticated
[ 43.624049] wlan0: associate with 00:1a:2b:90:fe:6c (try 1/3)
[ 43.645626] wlan0: RX AssocResp from 00:1a:2b:90:fe:6c (capab=0x411 status=0 aid=3)
[ 43.645696] wlan0: associated

Please tell me if there's something else I can provide / test.

Revision history for this message
Xavier López (xavilope) wrote :

Sorry, further testing seems to reveal the NIC is effectively achieving acceptable transfer rates. It only seems to delay a little the first time after connecting to the AP (apt-get update stood for 30secs or so at 0%).

Nice job! Removing rtl8192cu from blacklist :)

Andy Whitcroft (apw)
Changed in linux-backports-modules-3.0.0 (Ubuntu):
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.