Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Insanely slow and unstable work on D-Link DWA-125/D1/4.0 #35

Open
amal opened this issue Dec 25, 2013 · 42 comments

Comments

Projects
None yet
@amal
Copy link
Contributor

commented Dec 25, 2013

All works only few seconds after connection. Signal level is about 2% in a meter away from the router :(

dmesg:

[ 2084.170642] Chip Version Info: CHIP_8188E_Normal_Chip_TSMC_A_CUT_1T1R_RomVer(0)
[ 2084.434340] usbcore: registered new interface driver r8188eu
[ 2084.482787] R8188EU: Firmware Version 11, SubVersion 1, Signature 0x88e1
[ 2086.209553] MAC Address = c0:a0:bb:57:78:13
[ 2086.277644] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[ 2086.278465] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[ 2086.380567] R8188EU: ERROR indicate disassoc
[ 2086.388847] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[ 2086.507013] R8188EU: ERROR indicate disassoc
[ 2086.514928] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[ 2086.617998] R8188EU: ERROR indicate disassoc
[ 2086.625835] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[ 2090.889157] R8188EU: ERROR assoc success
[ 2090.903044] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[ 2527.633895] R8188EU: ERROR ap recv disassoc reason code(8) sta:64:70:02:7d:2d:06
[ 2527.745181] R8188EU: ERROR indicate disassoc
[ 2542.843658] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[ 2575.536864] R8188EU: ERROR assoc success
[ 2575.536908] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[ 2918.453306] Chip Version Info: CHIP_8188E_Normal_Chip_TSMC_D_CUT_1T1R_RomVer(0)
[ 2918.694127] usbcore: registered new interface driver r8188eu
[ 2918.722262] R8188EU: Firmware Version 11, SubVersion 1, Signature 0x88e1
[ 2920.450072] MAC Address = 64:66:b3:0e:d6:8c
[ 2920.519980] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[ 2920.520252] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[ 3415.784325] R8188EU: ERROR assoc success
[ 3415.784387] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[ 3712.726871] R8188EU: ERROR indicate disassoc
[ 3712.934189] R8188EU: ERROR sta recv deauth reason code(6) sta:64:70:02:7d:2d:06
[ 3715.144123] R8188EU: ERROR assoc success
[ 4465.659217] R8188EU: ERROR indicate disassoc
[ 4465.727007] IPv6: ADDRCONF(NETDEV_UP): wlan1: link is not ready
[ 4465.854139] R8188EU: ERROR indicate disassoc
[ 4475.752635] IPv6: ADDRCONF(NETDEV_UP): wlan1: link is not ready
[ 4477.773572] R8188EU: ERROR indicate disassoc
[ 4479.961229] R8188EU: ERROR sta recv deauth reason code(11) sta:64:70:02:7d:2d:06
[ 4479.963105] R8188EU: ERROR indicate disassoc
[ 4482.213664] R8188EU: ERROR assoc success
[ 4482.453183] R8188EU: ERROR indicate disassoc

Same for TP-Link WN723N Ver 3.0

Ubuntu 13.10 64-bit
Ubuntu 12.04 64-bit

@tm45

This comment has been minimized.

Copy link

commented Dec 26, 2013

TP-Link WN723N Ver 3 with this driver gives only 0.5 Mbps download speed, while on Windows - 11 Mbps. Upload speed is low (0.5 Mbps) on both systems, but I think it should be expected since I am on ADSL connection.

@amal

This comment has been minimized.

Copy link
Contributor Author

commented Dec 27, 2013

I found a dirty workaround:

ping -i 0.2 -s 10240 <router ip>

It creates permanent traffic and thus connection don't breaks ))
Signal level=77/100

@souravc83

This comment has been minimized.

Copy link

commented Dec 28, 2013

I tried that, but did not work. Within seconds, signal level drops to 2 in ubuntu.
Is there a workaround?
Otherwise, I am just going to ship the dongle back.

@lwfinger

This comment has been minimized.

Copy link
Owner

commented Dec 30, 2013

The signal level is only cosmetic. If you want to mak4e it "look" better, then apply the following patch:

Index: rtl8188eu/os_dep/ioctl_linux.c

--- rtl8188eu.orig/os_dep/ioctl_linux.c
+++ rtl8188eu/os_dep/ioctl_linux.c
@@ -7830,7 +7830,7 @@ static struct iw_statistics *rtw_get_wir
tmp_qual = padapter->recvpriv.signal_qual;
tmp_noise = padapter->recvpriv.noise;

  •           piwstats->qual.level = tmp_level;
    
  •           piwstats->qual.level = 80; //tmp_level;
            piwstats->qual.qual = tmp_qual;
            piwstats->qual.noise = tmp_noise;
    }
    
@souravc83

This comment has been minimized.

Copy link

commented Dec 30, 2013

Thanks a lot for replying so fast.
However, it is not the "cosmetic" level that is the problem.
Th connection stays on for a minute, and then disappears.
Here is the result of "iwconfig wlan2" on the terminal:
<
IEEE 802.11bgn ESSID:"whatever" Nickname:"WIFI@REALTEK"
Mode:Managed Frequency:2.437 GHz Access Point: 5C:D9:98:6D:91:46
Bit Rate:65 Mb/s Sensitivity:0/0
Retry:off RTS thr:off Fragment thr:off
Power Management:off
Link Quality=0/100 Signal level=2/100 Noise level=0/100
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0

Is there something I am missing? especially should retry be "on"?

@amal

This comment has been minimized.

Copy link
Contributor Author

commented Dec 30, 2013

May be it's a cosmetic, but stability problems are real. Currently I found only one solution - permanent trafic. And it works rather good for me ))
Only it does not really fix the driver problem with at least two devices...

@lwfinger

This comment has been minimized.

Copy link
Owner

commented Dec 31, 2013

I just committed an update to report the signal strength better than before.

The need for constant traffic is likely due to a difference in the way that your AP and mine handle power saving. What happens if you load the module with "rtw_ips_mode=0"?

For those that are having performance problems, pleas post the results from speedtest.net. I get 12.16 Mbps download and 1.06 Mbps upload. Those are the maximums for my broadband line.

@amal

This comment has been minimized.

Copy link
Contributor Author

commented Jan 1, 2014

Last commit used. Added with:

modprobe 8188eu rtw_ips_mode=0

iwconfig:

Bit Rate:54 Mb/s   Sensivity:0/0
Retry:off    RTS thr:off    Fragment thr:off
Power Management:off
Link Quality=87/100   Signal level=-42 dBm   Noise level=0 dBm

Network is NOT working normally. Again all works only few seconds after connection without constant traffic.

@tigerdognew

This comment has been minimized.

Copy link

commented Jan 2, 2014

I have the same issue here. Asus laptop, TPLink TL WN725N v2 adapter. Ubuntu 13.10, linux kernel 3.11.0-14-generic. Driver compiles, loads and connects. Within 30 seconds, the adapter stops responding. Also noted the default routes are missing.

FWIW, I tried compiling the v4.1.8_9499.20131104 version uploaded in the comments but it does not build cleanly.

@lwfinger

This comment has been minimized.

Copy link
Owner

commented Jan 2, 2014

FYI, I am concentrating on the kernel version of the driver. For that reason, I do not update the Realtek releases to build on all kernels. If you wish to use them, then you will need to fix those problems yourself.

If you are having a problem with this adapter, you need to be extremely explicit about your access point. What make and model? What firmware are you running in it? Is it 802.11g or 802.11n?

My Netgear WNDR 3400V2 works fine with the driver running 802.11n, WPA2 encryption, and standard firmware. The device also works with a Linksys WRT54GL at 802.11g, WPA1 encryption, and openWRT Kamakaze firmware.

@tigerdognew

This comment has been minimized.

Copy link

commented Jan 2, 2014

I'm not much of a coder, but tried the realtek version out of
desperation. I don't expect I will be able to fix it, so I'll do what I
can to aid you with your work.

The driver compiles and installs properly, as best as I can see. The
TPLink TL-WN725N adapter is immediately detected. It correctly detects
the access point and appears to connect.

My router is a Cisco Linksys EN3500, firmware version 1.1.39.145204.
Router is running 802.11n only - set up to reject 11b and 11g
connections. Here's more info, straight from the router, concerning
network and wireless settings.

DHCP Server
DHCP Server: Enabled
Start IP Address: 192.168.227.2
End IP Address: 192.168.227.100
Client lease time: 1440 Minutes
Static DNS 1: 204.117.124.10
Static DNS 2: 4.2.2.1
Static DNS 3: 209.18.47.61
WINS:
2.4 GHz Wireless Network
Status: Enabled
MAC Address: 20:AA:4B:61:0B:4C
Mode: 802.11n
Network Name (SSID): nn
Channel Width: Auto
Channel: 1
Security: WPA2 Personal
5 GHz Wireless Network
Status: Enabled
MAC Address: 20:AA:4B:61:0B:4E
Mode: 802.11an
Network Name (SSID): nn5
Channel Width: 40 MHz
Channel: 157
Security: WPA2 Personal

and info from the machine with the driver:

doug@LarchUbuntu:~$ ifconfig wlan1
wlan1 Link encap:Ethernet HWaddr 64:66:b3:25:c8:1b
inet addr:192.168.227.94 Bcast:192.168.227.255
Mask:255.255.255.0
inet6 addr: fe80::6666:b3ff:fe25:c81b/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:96 errors:0 dropped:68 overruns:0 frame:0
TX packets:247 errors:0 dropped:1 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:16661 (16.6 KB) TX bytes:28479 (28.4 KB)

doug@LarchUbuntu:~$ iwconfig wlan1
wlan1 IEEE 802.11bgn ESSID:"nnnn" Nickname:"WIFI@REALTEK"
Mode:Managed Frequency:2.412 GHz Access Point:
20:AA:4B:61:0B:4C
Bit Rate:150 Mb/s Sensitivity:0/0
Retry:off RTS thr:off Fragment thr:off
Power Management:off
Link Quality=93/100 Signal level=-42 dBm Noise level=0 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0

doug@LarchUbuntu:$ route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use
Iface
default 192.168.227.1 0.0.0.0 UG 0 0 0 wlan1
192.168.227.0 * 255.255.255.0 U 9 0 0 wlan1
doug@LarchUbuntu:
$ ping 4.2.2.1
PING 4.2.2.1 (4.2.2.1) 56(84) bytes of data.
^C
--- 4.2.2.1 ping statistics ---
14 packets transmitted, 0 received, 100% packet loss, time 13102ms

@uglobster

This comment has been minimized.

Copy link

commented Jan 2, 2014

Sorry @tigerdognew , but i see on your router two networks with SSID "nn" and "nn5" with WPA2 security. But your connection from adapter is to the different SSID "nnnn" and without security key.

@tigerdognew

This comment has been minimized.

Copy link

commented Jan 2, 2014

I apologize for the confusion. I overwrote the actual names for privacy, since they this conversation is on a public forum. The iwconfig output show say ESSID "nn" - they match in real life. It should show a security key, though. I've configured the router to require WPA2 Personal to connect. And it does connect - for about 18 seconds before the connection hangs.

@tigerdognew

This comment has been minimized.

Copy link

commented Jan 2, 2014

not sure if it's helpful, but I built this driver under ubuntu 12.04LTS (3.8.0-29-generic) and it exhibits the same behavior. Ping runs about 35 seconds then hangs. Also build the Realtek version for comparison - so far, it is working fine.

@lwfinger

This comment has been minimized.

Copy link
Owner

commented Jan 2, 2014

There is no reason to obscure ESSID entries in a public forum; however, if you feel you must, then obscure each of them with a unique code. Please do not force us to guess what you did. I have too much to do to waste time trying to guess what you mean.

What version of the Realtek driver is working?

@tigerdognew

This comment has been minimized.

Copy link

commented Jan 3, 2014

Realtek version RTL8188EUS_RTL8189ES_linux_v4.1.8_9499.20131104 is builds correctly and works without hanging under ubuntu 12.04LTS 3.8.0-29-generic and 3.8.0-34-generic. The Realtek code does not build correctly under 3.11.0-4-generic.

@MrEngman

This comment has been minimized.

Copy link

commented Jan 3, 2014

I was able to compile it for the RaspberryPi with Raspbian 3.10.25+ #614 and #616 with the following patch.

diff -aurb rtl8188EUS_rtl8189ES_linux_v4.1.8_9499.20131104/include/autoconf.h rtl8188eus/include/autoconf.h
--- rtl8188EUS_rtl8189ES_linux_v4.1.8_9499.20131104/include/autoconf.h  2013-11-04 09:19:31.000000000 +0000
+++ rtl8188eus/include/autoconf.h       2014-01-02 05:32:00.790106454 +0000
@@ -171,7 +171,7 @@

 #define CONFIG_SKB_COPY        //for amsdu

-//#define CONFIG_LED
+#define CONFIG_LED
 #ifdef CONFIG_LED
        #define CONFIG_SW_LED
        #ifdef CONFIG_SW_LED
diff -aurb rtl8188EUS_rtl8189ES_linux_v4.1.8_9499.20131104/os_dep/linux/os_intfs.c rtl8188eus/os_dep/linux/os_intfs.c
--- rtl8188EUS_rtl8189ES_linux_v4.1.8_9499.20131104/os_dep/linux/os_intfs.c     2013-11-04 09:19:31.000000000 +0000
+++ rtl8188eus/os_dep/linux/os_intfs.c  2014-01-02 04:36:37.534446971 +0000
@@ -323,6 +323,16 @@

 #define RTW_PROC_NAME DRV_NAME

+/* dummy routines */
+void rtw_proc_remove_one(struct net_device *dev)
+{
+}
+
+void rtw_proc_init_one(struct net_device *dev)
+{
+}
+
+#if 0   /* TODO: Convert these to /sys */
 void rtw_proc_init_one(struct net_device *dev)
 {
        struct proc_dir_entry *dir_dev = NULL;
@@ -829,6 +839,7 @@
        }
 }
 #endif
+#endif

 uint loadparam( _adapter *padapter,  _nic_hdl  pnetdev);
 uint loadparam( _adapter *padapter,  _nic_hdl  pnetdev)
@pxb1988

This comment has been minimized.

Copy link

commented Jan 3, 2014

same problem on my WIFI adapter FAST-150us-2.0 and MERCURY-mw150us-2.0.
my system is Ubuntu 13.10 with 3.11.0-14-generic x86_64

after install the kernel module(90ec93e and before), it is ok to connect to my AP. but after 10 or 15 seconds, the connection lost.

[15612.147860] usb 3-1: USB disconnect, device number 4
[15620.005153] usb 3-1: new high-speed USB device number 5 using xhci_hcd
[15620.021427] usb 3-1: New USB device found, idVendor=0bda, idProduct=8179
[15620.021431] usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[15620.021433] usb 3-1: Product: 802.11n NIC
[15620.021435] usb 3-1: Manufacturer: Realtek
[15620.021436] usb 3-1: SerialNumber: 00E04C0001
[15620.021707] Chip Version Info: CHIP_8188E_Normal_Chip_TSMC_D_CUT_1T1R_RomVer(0)
[15620.444855] MAC Address = 0c:82:68:10:25:db
[15620.446349] IPv6: ADDRCONF(NETDEV_UP): wlan2: link is not ready
[15620.446756] IPv6: ADDRCONF(NETDEV_UP): wlan2: link is not ready
[15620.449174] R8188EU: ERROR indicate disassoc
[15620.449638] IPv6: ADDRCONF(NETDEV_UP): wlan2: link is not ready
[15620.453584] R8188EU: ERROR indicate disassoc
[15620.453880] IPv6: ADDRCONF(NETDEV_UP): wlan2: link is not ready
[15620.456932] R8188EU: ERROR indicate disassoc
[15620.457279] IPv6: ADDRCONF(NETDEV_UP): wlan2: link is not ready
[15623.191754] R8188EU: ERROR assoc success
[15623.198816] IPv6: ADDRCONF(NETDEV_CHANGE): wlan2: link becomes ready

another WIFI adapter with rtl8188cu works fine.

@lwfinger

This comment has been minimized.

Copy link
Owner

commented Jan 3, 2014

For those of you with the nearly immediate disconnect, the logs from wpa_supplicant, NetworkManager, or whatever you use would be useful. The output from dmesg never indicates the reason for a disconnect.

@pxb1988

This comment has been minimized.

Copy link

commented Jan 4, 2014

here are the log from /var/log/syslog, when i got 'Jan 4 17:19:07 bob-MS-7798 NetworkManager[926]: (wlan2): IP6 addrconf timed out or failed.' the connection lost

Jan  4 17:18:44 bob-MS-7798 kernel: [  237.875994] usb 2-1.5: new high-speed USB device number 5 using ehci-pci
Jan  4 17:18:44 bob-MS-7798 kernel: [  237.968685] usb 2-1.5: New USB device found, idVendor=0bda, idProduct=8179
Jan  4 17:18:44 bob-MS-7798 kernel: [  237.968692] usb 2-1.5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Jan  4 17:18:44 bob-MS-7798 kernel: [  237.968696] usb 2-1.5: Product: 802.11n NIC
Jan  4 17:18:44 bob-MS-7798 kernel: [  237.968700] usb 2-1.5: Manufacturer: Realtek
Jan  4 17:18:44 bob-MS-7798 kernel: [  237.968703] usb 2-1.5: SerialNumber: 00E04C0001
Jan  4 17:18:44 bob-MS-7798 kernel: [  237.969271] Chip Version Info: CHIP_8188E_Normal_Chip_TSMC_D_CUT_1T1R_RomVer(0)
Jan  4 17:18:44 bob-MS-7798 mtp-probe: checking bus 2, device 5: "/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.5"
Jan  4 17:18:44 bob-MS-7798 mtp-probe: bus: 2, device: 5 was not an MTP device
Jan  4 17:18:44 bob-MS-7798 NetworkManager[926]:    SCPlugin-Ifupdown: devices added (path: /sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.5/2-1.5:1.0/net/wlan2, iface: wlan2)
Jan  4 17:18:44 bob-MS-7798 NetworkManager[926]:    SCPlugin-Ifupdown: device added (path: /sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.5/2-1.5:1.0/net/wlan2, iface: wlan2): no ifupdown configuration found.
Jan  4 17:18:44 bob-MS-7798 NetworkManager[926]: <info> (wlan2): driver supports SSID scans (scan_capa 0x3F).
Jan  4 17:18:44 bob-MS-7798 NetworkManager[926]: <info> (wlan2): using WEXT for WiFi device control
Jan  4 17:18:44 bob-MS-7798 NetworkManager[926]: <info> (wlan2): new 802.11 WiFi device (driver: 'r8188eu' ifindex: 5)
Jan  4 17:18:44 bob-MS-7798 NetworkManager[926]: <info> (wlan2): exported as /org/freedesktop/NetworkManager/Devices/3
Jan  4 17:18:44 bob-MS-7798 NetworkManager[926]: <info> (wlan2): device state change: unmanaged -> unavailable (reason 'managed') [10 20 2]
Jan  4 17:18:44 bob-MS-7798 NetworkManager[926]: <info> (wlan2): bringing up device.
Jan  4 17:18:44 bob-MS-7798 kernel: [  238.431596] MAC Address = 0c:82:68:10:25:db
Jan  4 17:18:44 bob-MS-7798 NetworkManager[926]: <info> (wlan2): preparing device.
Jan  4 17:18:44 bob-MS-7798 NetworkManager[926]: <info> (wlan2): deactivating device (reason 'managed') [2]
Jan  4 17:18:44 bob-MS-7798 NetworkManager[926]: <info> (wlan2): taking down device.
Jan  4 17:18:44 bob-MS-7798 kernel: [  238.436107] IPv6: ADDRCONF(NETDEV_UP): wlan2: link is not ready
Jan  4 17:18:44 bob-MS-7798 kernel: [  238.436350] IPv6: ADDRCONF(NETDEV_UP): wlan2: link is not ready
Jan  4 17:18:44 bob-MS-7798 NetworkManager[926]: <info> (wlan2): bringing up device.
Jan  4 17:18:44 bob-MS-7798 kernel: [  238.443062] R8188EU: ERROR indicate disassoc
Jan  4 17:18:44 bob-MS-7798 kernel: [  238.443751] IPv6: ADDRCONF(NETDEV_UP): wlan2: link is not ready
Jan  4 17:18:44 bob-MS-7798 wpa_supplicant[1169]: nl80211: Could not configure driver to use managed mode
Jan  4 17:18:44 bob-MS-7798 kernel: [  238.451672] R8188EU: ERROR indicate disassoc
Jan  4 17:18:44 bob-MS-7798 kernel: [  238.452247] IPv6: ADDRCONF(NETDEV_UP): wlan2: link is not ready
Jan  4 17:18:44 bob-MS-7798 kernel: [  238.458913] R8188EU: ERROR indicate disassoc
Jan  4 17:18:44 bob-MS-7798 kernel: [  238.459516] IPv6: ADDRCONF(NETDEV_UP): wlan2: link is not ready
Jan  4 17:18:44 bob-MS-7798 NetworkManager[926]: <info> (wlan2) supports 1 scan SSIDs
Jan  4 17:18:44 bob-MS-7798 NetworkManager[926]: <warn> Trying to remove a non-existant call id.
Jan  4 17:18:44 bob-MS-7798 NetworkManager[926]: <info> (wlan2): supplicant interface state: starting -> ready
Jan  4 17:18:44 bob-MS-7798 NetworkManager[926]: <info> (wlan2): device state change: unavailable -> disconnected (reason 'supplicant-available') [20 30 42]
Jan  4 17:18:44 bob-MS-7798 NetworkManager[926]: <info> (wlan2): supplicant interface state: ready -> inactive
Jan  4 17:18:44 bob-MS-7798 NetworkManager[926]: <info> (wlan2) supports 1 scan SSIDs
Jan  4 17:18:45 bob-MS-7798 NetworkManager[926]: <info> Auto-activating connection 'b0b 2'.
Jan  4 17:18:45 bob-MS-7798 NetworkManager[926]: <info> Activation (wlan2) starting connection 'b0b 2'
Jan  4 17:18:45 bob-MS-7798 NetworkManager[926]: <info> (wlan2): device state change: disconnected -> prepare (reason 'none') [30 40 0]
Jan  4 17:18:45 bob-MS-7798 NetworkManager[926]: <info> Activation (wlan2) Stage 1 of 5 (Device Prepare) scheduled...
Jan  4 17:18:45 bob-MS-7798 NetworkManager[926]: <info> Activation (wlan2) Stage 1 of 5 (Device Prepare) started...
Jan  4 17:18:45 bob-MS-7798 NetworkManager[926]: <info> Activation (wlan2) Stage 2 of 5 (Device Configure) scheduled...
Jan  4 17:18:45 bob-MS-7798 NetworkManager[926]: <info> Activation (wlan2) Stage 1 of 5 (Device Prepare) complete.
Jan  4 17:18:45 bob-MS-7798 NetworkManager[926]: <info> Activation (wlan2) Stage 2 of 5 (Device Configure) starting...
Jan  4 17:18:45 bob-MS-7798 NetworkManager[926]: <info> (wlan2): device state change: prepare -> config (reason 'none') [40 50 0]
Jan  4 17:18:45 bob-MS-7798 NetworkManager[926]: <info> Activation (wlan2/wireless): access point 'b0b 2' has security, but secrets are required.
Jan  4 17:18:45 bob-MS-7798 NetworkManager[926]: <info> (wlan2): device state change: config -> need-auth (reason 'none') [50 60 0]
Jan  4 17:18:45 bob-MS-7798 NetworkManager[926]: <info> Activation (wlan2) Stage 2 of 5 (Device Configure) complete.
Jan  4 17:18:45 bob-MS-7798 NetworkManager[926]: <info> Activation (wlan2) Stage 1 of 5 (Device Prepare) scheduled...
Jan  4 17:18:45 bob-MS-7798 NetworkManager[926]: <info> Activation (wlan2) Stage 1 of 5 (Device Prepare) started...
Jan  4 17:18:45 bob-MS-7798 NetworkManager[926]: <info> (wlan2): device state change: need-auth -> prepare (reason 'none') [60 40 0]
Jan  4 17:18:45 bob-MS-7798 NetworkManager[926]: <info> Activation (wlan2) Stage 2 of 5 (Device Configure) scheduled...
Jan  4 17:18:45 bob-MS-7798 NetworkManager[926]: <info> Activation (wlan2) Stage 1 of 5 (Device Prepare) complete.
Jan  4 17:18:45 bob-MS-7798 NetworkManager[926]: <info> Activation (wlan2) Stage 2 of 5 (Device Configure) starting...
Jan  4 17:18:45 bob-MS-7798 NetworkManager[926]: <info> (wlan2): device state change: prepare -> config (reason 'none') [40 50 0]
Jan  4 17:18:45 bob-MS-7798 NetworkManager[926]: <info> Activation (wlan2/wireless): connection 'b0b 2' has security, and secrets exist.  No new secrets needed.
Jan  4 17:18:45 bob-MS-7798 NetworkManager[926]: <info> Config: added 'ssid' value 'b0b'
Jan  4 17:18:45 bob-MS-7798 NetworkManager[926]: <info> Config: added 'scan_ssid' value '1'
Jan  4 17:18:45 bob-MS-7798 NetworkManager[926]: <info> Config: added 'key_mgmt' value 'WPA-PSK'
Jan  4 17:18:45 bob-MS-7798 NetworkManager[926]: <info> Config: added 'auth_alg' value 'OPEN'
Jan  4 17:18:45 bob-MS-7798 NetworkManager[926]: <info> Config: added 'psk' value '<omitted>'
Jan  4 17:18:45 bob-MS-7798 NetworkManager[926]: <info> Activation (wlan2) Stage 2 of 5 (Device Configure) complete.
Jan  4 17:18:45 bob-MS-7798 NetworkManager[926]: <info> Config: set interface ap_scan to 1
Jan  4 17:18:46 bob-MS-7798 NetworkManager[926]: <info> (wlan2): supplicant interface state: inactive -> scanning
Jan  4 17:18:47 bob-MS-7798 wpa_supplicant[1169]: wlan2: Trying to associate with 38:83:45:54:f8:66 (SSID='b0b' freq=2427 MHz)
Jan  4 17:18:47 bob-MS-7798 wpa_supplicant[1169]: wlan2: Association request to the driver failed
Jan  4 17:18:47 bob-MS-7798 NetworkManager[926]: <info> (wlan2): supplicant interface state: scanning -> associating
Jan  4 17:18:47 bob-MS-7798 kernel: [  241.124225] R8188EU: ERROR assoc success
Jan  4 17:18:47 bob-MS-7798 wpa_supplicant[1169]: wlan2: Associated with 38:83:45:54:f8:66
Jan  4 17:18:47 bob-MS-7798 kernel: [  241.124358] IPv6: ADDRCONF(NETDEV_CHANGE): wlan2: link becomes ready
Jan  4 17:18:47 bob-MS-7798 NetworkManager[926]: <info> (wlan2): supplicant interface state: associating -> associated
Jan  4 17:18:47 bob-MS-7798 NetworkManager[926]: <info> (wlan2): supplicant interface state: associated -> 4-way handshake
Jan  4 17:18:47 bob-MS-7798 wpa_supplicant[1169]: wlan2: WPA: Key negotiation completed with 38:83:45:54:f8:66 [PTK=CCMP GTK=CCMP]
Jan  4 17:18:47 bob-MS-7798 wpa_supplicant[1169]: wlan2: CTRL-EVENT-CONNECTED - Connection to 38:83:45:54:f8:66 completed (auth) [id=0 id_str=]
Jan  4 17:18:47 bob-MS-7798 NetworkManager[926]: <info> (wlan2): supplicant interface state: 4-way handshake -> completed
Jan  4 17:18:47 bob-MS-7798 NetworkManager[926]: <info> Activation (wlan2/wireless) Stage 2 of 5 (Device Configure) successful.  Connected to wireless network 'b0b'.
Jan  4 17:18:47 bob-MS-7798 NetworkManager[926]: <info> Activation (wlan2) Stage 3 of 5 (IP Configure Start) scheduled.
Jan  4 17:18:47 bob-MS-7798 NetworkManager[926]: <info> Activation (wlan2) Stage 3 of 5 (IP Configure Start) started...
Jan  4 17:18:47 bob-MS-7798 NetworkManager[926]: <info> (wlan2): device state change: config -> ip-config (reason 'none') [50 70 0]
Jan  4 17:18:47 bob-MS-7798 NetworkManager[926]: <info> Activation (wlan2) Beginning DHCPv4 transaction (timeout in 45 seconds)
Jan  4 17:18:47 bob-MS-7798 NetworkManager[926]: <info> dhclient started with pid 2814
Jan  4 17:18:47 bob-MS-7798 NetworkManager[926]: <info> Activation (wlan2) Beginning IP6 addrconf.
Jan  4 17:18:47 bob-MS-7798 NetworkManager[926]: <info> Activation (wlan2) Stage 3 of 5 (IP Configure Start) complete.
Jan  4 17:18:47 bob-MS-7798 dhclient: Internet Systems Consortium DHCP Client 4.2.4
Jan  4 17:18:47 bob-MS-7798 dhclient: Copyright 2004-2012 Internet Systems Consortium.
Jan  4 17:18:47 bob-MS-7798 dhclient: All rights reserved.
Jan  4 17:18:47 bob-MS-7798 dhclient: For info, please visit https://www.isc.org/software/dhcp/
Jan  4 17:18:47 bob-MS-7798 dhclient: 
Jan  4 17:18:47 bob-MS-7798 NetworkManager[926]: <info> (wlan2): DHCPv4 state changed nbi -> preinit
Jan  4 17:18:47 bob-MS-7798 dhclient: Listening on LPF/wlan2/0c:82:68:10:25:db
Jan  4 17:18:47 bob-MS-7798 dhclient: Sending on   LPF/wlan2/0c:82:68:10:25:db
Jan  4 17:18:47 bob-MS-7798 dhclient: Sending on   Socket/fallback
Jan  4 17:18:47 bob-MS-7798 dhclient: DHCPREQUEST of 192.168.1.103 on wlan2 to 255.255.255.255 port 67 (xid=0x57ebf68a)
Jan  4 17:18:47 bob-MS-7798 dhclient: DHCPACK of 192.168.1.103 from 192.168.1.253
Jan  4 17:18:47 bob-MS-7798 dhclient: bound to 192.168.1.103 -- renewal in 2788 seconds.
Jan  4 17:18:47 bob-MS-7798 NetworkManager[926]: <info> (wlan2): DHCPv4 state changed preinit -> reboot
Jan  4 17:18:47 bob-MS-7798 NetworkManager[926]: <info>   address 192.168.1.103
Jan  4 17:18:47 bob-MS-7798 NetworkManager[926]: <info>   prefix 24 (255.255.255.0)
Jan  4 17:18:47 bob-MS-7798 NetworkManager[926]: <info>   gateway 192.168.1.253
Jan  4 17:18:47 bob-MS-7798 NetworkManager[926]: <info>   nameserver '172.16.1.3'
Jan  4 17:18:47 bob-MS-7798 NetworkManager[926]: <info>   nameserver '172.16.1.4'
Jan  4 17:18:47 bob-MS-7798 NetworkManager[926]: <info> Activation (wlan2) Stage 5 of 5 (IPv4 Configure Commit) scheduled...
Jan  4 17:18:47 bob-MS-7798 NetworkManager[926]: <info> Activation (wlan2) Stage 5 of 5 (IPv4 Commit) started...
Jan  4 17:18:47 bob-MS-7798 avahi-daemon[890]: Joining mDNS multicast group on interface wlan2.IPv4 with address 192.168.1.103.
Jan  4 17:18:47 bob-MS-7798 avahi-daemon[890]: New relevant interface wlan2.IPv4 for mDNS.
Jan  4 17:18:47 bob-MS-7798 avahi-daemon[890]: Registering new address record for 192.168.1.103 on wlan2.IPv4.
Jan  4 17:18:48 bob-MS-7798 avahi-daemon[890]: Joining mDNS multicast group on interface wlan2.IPv6 with address fe80::e82:68ff:fe10:25db.
Jan  4 17:18:48 bob-MS-7798 avahi-daemon[890]: New relevant interface wlan2.IPv6 for mDNS.
Jan  4 17:18:48 bob-MS-7798 avahi-daemon[890]: Registering new address record for fe80::e82:68ff:fe10:25db on wlan2.*.
Jan  4 17:18:48 bob-MS-7798 NetworkManager[926]: <info> (wlan2): device state change: ip-config -> secondaries (reason 'none') [70 90 0]
Jan  4 17:18:48 bob-MS-7798 NetworkManager[926]: <info> Activation (wlan2) Stage 5 of 5 (IPv4 Commit) complete.
Jan  4 17:18:48 bob-MS-7798 NetworkManager[926]: <info> (wlan2): device state change: secondaries -> activated (reason 'none') [90 100 0]
Jan  4 17:18:48 bob-MS-7798 NetworkManager[926]: <info> Writing DNS information to /sbin/resolvconf
Jan  4 17:18:48 bob-MS-7798 dnsmasq[1499]: setting upstream servers from DBus
Jan  4 17:18:48 bob-MS-7798 dnsmasq[1499]: using nameserver 172.16.1.4#53
Jan  4 17:18:48 bob-MS-7798 dnsmasq[1499]: using nameserver 172.16.1.3#53
Jan  4 17:18:48 bob-MS-7798 dnsmasq[1499]: using nameserver 172.16.1.3#53
Jan  4 17:18:48 bob-MS-7798 dnsmasq[1499]: using nameserver 172.16.1.4#53
Jan  4 17:18:48 bob-MS-7798 NetworkManager[926]: <info> Activation (wlan2) successful, device activated.
Jan  4 17:18:48 bob-MS-7798 dbus[735]: [system] Activating service name='org.freedesktop.nm_dispatcher' (using servicehelper)
Jan  4 17:18:48 bob-MS-7798 dbus[735]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'
Jan  4 17:18:56 bob-MS-7798 ntpdate[2861]: adjust time server 91.189.89.199 offset 0.008140 sec
Jan  4 17:19:07 bob-MS-7798 NetworkManager[926]: <info> (wlan2): IP6 addrconf timed out or failed.
Jan  4 17:19:07 bob-MS-7798 NetworkManager[926]: <info> Activation (wlan2) Stage 4 of 5 (IPv6 Configure Timeout) scheduled...
Jan  4 17:19:07 bob-MS-7798 NetworkManager[926]: <info> Activation (wlan2) Stage 4 of 5 (IPv6 Configure Timeout) started...
Jan  4 17:19:07 bob-MS-7798 NetworkManager[926]: <info> Activation (wlan2) Stage 4 of 5 (IPv6 Configure Timeout) complete.
@pxb1988

This comment has been minimized.

Copy link

commented Jan 4, 2014

syslog from plug 8188eu -> auto connect by net manager -> ping -> connection lost -> unplug 8188eu
is here http://paste.ubuntu.com/6690704/ (debug trace enabled, about 10mb)

@lwfinger

This comment has been minimized.

Copy link
Owner

commented Jan 4, 2014

Your syslog file shows no problem. It seems to be working there.

If your file were really 10 millibits, I would look at it, but a 10 megabyte (MB) file is too big for me to read. Sorry.

@tigerdognew

This comment has been minimized.

Copy link

commented Jan 4, 2014

My syslog looks like pxb1988's so I won't duplicate. @lwfinger, your comment matches what I observe - the wifi looks like it's up, but is unresponsive. I started a ping, established the connection then monitored ifconfig packet counts. At first, both transmit and receive counts imcrement. When the ping stops, the transmit count continues but receive count does not, so it's as if the interface is either not receiving or not passing packets up the stack.

@bmiro

This comment has been minimized.

Copy link

commented Jan 5, 2014

I've had de same problem:

  • Irregular ping
  • Constant disassociation
  • Error disassoc in dmesg

Te solution was change the power cord. I've compiled the driver with diferent kernels without success. Then I've tried the USB-Micro USB to charge my phone and discovered that took much more time than normal so I've used the USB-Micro of my phone to power the Pi and the disassoc errors get out!

The problem was NOT the power supply, was only the USB cable.

Now I'm using the Raspbian packaged kernel with this compliled driver. The wifi adapter plugged directly (and a keyboard on the other port) to the Pi and a powerd cord with an 1.5A power supply.

In my opinion this is a power issue not a driver issue.

@tigerdognew

This comment has been minimized.

Copy link

commented Jan 5, 2014

bmiro, I think the issue discussed here is different to yours. You describe dissociation; this bug is about slow response and hanging. It involves hardware other than just the Pi.

@lwfinger

This comment has been minimized.

Copy link
Owner

commented Jan 6, 2014

@bmiro - I use a powered hub with my Pi, and it will run with just the ESB cable plugged in as the hub will supply enough power. Plugging the RTL8188EU into the hub also works. In any case, I avoid the whole problem by using an external 5V supply for the Pi.

To the others: I took an entire day to create a 32-bit instance of Ubuntu 12.04 LTS in a VirtualBox VM. I got source for r8188eu from the GitHub repo and built it. Using the NetworkManager icon in the system area of the screen, I could connect to an 802.11n AP using WPA2 and an 802.11g AP using WPA1. Both connections cam up quickly once I entered the passphrase. I installed Google Chrome and connected to speedtest.net to get the following speeds in Mbps:

RX TX ping time kernel version
4.70 1.02 73 ms 3.2.0-58-generic-pae
4.22 1.26 62 ms 3.12.0-031200-generic

The RX speeds are lower than what I get on my x86_64 laptop, but that is probably due to the USB passthru used in the VM.

I then started a ping with a 10 second period and let it run for nearly 40,000 seconds. Only 4 of the 4000 packets were lost.

In short, I am unable to replicate the problems reported here, even when running what I think is exactly the same software as you.

@mikeJaneksi

This comment has been minimized.

Copy link

commented Mar 23, 2014

I am also experiencing horrible performance.

I have ArchLinux-Arm on a BeagleBone Black.

I just installed this driver, and it will just not respond after 30seconds of getting connected to the router.

It gets an IP Address, and as soon as i SSH into it, it starts to have horrible network performance..

The BBB is powered by a 5V 2A cable and it is about 4feet away from the router and it won't hold a wireless connection using the TL-WN725N wifi dongle for more than 30seconds before it starts to timeout.

@mikeJaneksi

This comment has been minimized.

Copy link

commented Mar 23, 2014

[root@alarm ~]# iwconfig
wlan0 IEEE 802.11bgn ESSID:"toroko" Nickname:"WIFI@REALTEK"
Mode:Managed Frequency:2.437 GHz Access Point: BC:EE:7B:93:22:50
Bit Rate:72.2 Mb/s Sensitivity:0/0
Retry:off RTS thr:off Fragment thr:off
Encryption key:_-__-__-__-__-__-__-*_* Security mode :open
Power Management:off
Link Quality=100/100 Signal level=-20 dBm Noise level=0 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0

Pinging the wifi dongle from my windows system:

C:\Users\victor>ping -t 192.168.1.17

Pinging 192.168.1.17 with 32 bytes of data:
Reply from 192.168.1.17: bytes=32 time=1036ms TTL=64
Request timed out.
Reply from 192.168.1.17: bytes=32 time=1481ms TTL=64
Reply from 192.168.1.17: bytes=32 time=28ms TTL=64
Reply from 192.168.1.17: bytes=32 time=4ms TTL=64
Reply from 192.168.1.17: bytes=32 time=18ms TTL=64
Reply from 192.168.1.17: bytes=32 time=1078ms TTL=64
Reply from 192.168.1.17: bytes=32 time=1122ms TTL=64
Reply from 192.168.1.17: bytes=32 time=610ms TTL=64
Reply from 192.168.1.17: bytes=32 time=1554ms TTL=64
Reply from 192.168.1.17: bytes=32 time=95ms TTL=64
Request timed out.
Reply from 192.168.1.17: bytes=32 time=3789ms TTL=64
Request timed out.
Request timed out.
Reply from 192.168.1.17: bytes=32 time=2623ms TTL=64
Reply from 192.168.1.17: bytes=32 time=98ms TTL=64
Reply from 192.168.1.17: bytes=32 time=2268ms TTL=64
Reply from 192.168.1.17: bytes=32 time=1022ms TTL=64
Reply from 192.168.1.17: bytes=32 time=813ms TTL=64
Reply from 192.168.1.17: bytes=32 time=731ms TTL=64
Reply from 192.168.1.17: bytes=32 time=984ms TTL=64
Reply from 192.168.1.17: bytes=32 time=26ms TTL=64
Reply from 192.168.1.17: bytes=32 time=71ms TTL=64
Reply from 192.168.1.17: bytes=32 time=193ms TTL=64
Reply from 192.168.1.17: bytes=32 time=315ms TTL=64
Reply from 192.168.1.17: bytes=32 time=129ms TTL=64
Reply from 192.168.1.17: bytes=32 time=46ms TTL=64
Reply from 192.168.1.17: bytes=32 time=65ms TTL=64
Request timed out.
Request timed out.
Request timed out.
Reply from 192.168.1.17: bytes=32 time=668ms TTL=64
Reply from 192.168.1.17: bytes=32 time=74ms TTL=64
Reply from 192.168.1.17: bytes=32 time=93ms TTL=64
Reply from 192.168.1.17: bytes=32 time=112ms TTL=64
Request timed out.
Request timed out.

@anatol

This comment has been minimized.

Copy link

commented Jul 9, 2014

I have a Linux Arch on my desktop machine and I use this wifi-usb dongle http://www.ebay.com/itm/201086231712?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1497.l2649 The device has Realtek wifi chip and uses r8188eu driver. The Linux Arch workstation has 3.15.4 kernel (this kernel is very close to upstream with no custom patches).

I see very poor performance with the dongle. Other wifi devices (macosx/android phones) work just fine, but not my desktop computer. The symptoms I see are very similar to what described here - long pings, connection interruptions, very poor performance.

Here is dmesg output

[30442.576979] R8188EU: ERROR assoc success
[30462.740774] R8188EU: ERROR linked_status_chk(wlp0s29f7u3) disconnect or roaming
[30471.555226] R8188EU: ERROR assoc success
[30488.867249] R8188EU: ERROR linked_status_chk(wlp0s29f7u3) disconnect or roaming
[30497.666830] R8188EU: ERROR assoc success
[30597.163080] R8188EU: ERROR linked_status_chk(wlp0s29f7u3) disconnect or roaming
[30611.916948] R8188EU: ERROR indicate disassoc
[30613.479354] R8188EU: ERROR assoc success
[34225.156949] R8188EU: ERROR linked_status_chk(wlp0s29f7u3) disconnect or roaming
[34227.115097] R8188EU: ERROR assoc success
[34243.307604] R8188EU: ERROR linked_status_chk(wlp0s29f7u3) disconnect or roaming
[34252.100191] R8188EU: ERROR assoc success
[34275.406974] R8188EU: ERROR linked_status_chk(wlp0s29f7u3) disconnect or roaming

Here is systemd journal info:

Jul 09 06:48:54 argo systemd-timesyncd[207]: Network configuration changed, trying to establish connection.
Jul 09 06:48:54 argo gnome-session[294]: [477:592:0709/064854:ERROR:connection_factory_impl.cc(287)] Failed to connect to MCS endpoint with error -21
Jul 09 06:49:24 argo systemd-timesyncd[207]: Using NTP server 216.239.36.15:123 (time3.google.com).
Jul 09 06:49:24 argo systemd-timesyncd[207]: interval/delta/delay/jitter/drift 32s/-0.102s/0.098s/0.084s/-500ppm
Jul 09 06:49:49 argo kernel: R8188EU: ERROR linked_status_chk(wlp0s29f7u3) disconnect or roaming
Jul 09 06:49:51 argo kernel: R8188EU: ERROR assoc success
Jul 09 06:49:51 argo systemd-networkd[247]: wlp0s29f7u3     : lost carrier
Jul 09 06:49:51 argo systemd-networkd[247]: wlp0s29f7u3     : DHCP lease lost
Jul 09 06:49:51 argo systemd-timesyncd[207]: No network connectivity, watching for changes.
Jul 09 06:49:51 argo gnome-session[294]: [477:592:0709/064951:ERROR:connection_factory_impl.cc(287)] Failed to connect to MCS endpoint with error -106
Jul 09 06:49:54 argo kernel: R8188EU: ERROR sta recv deauth reason code(2) sta:74:9d:dc:80:95:f9
Jul 09 06:49:54 argo kernel: R8188EU: ERROR indicate disassoc
Jul 09 06:50:09 argo kernel: R8188EU: ERROR assoc success
Jul 09 06:50:09 argo systemd-networkd[247]: wlp0s29f7u3     : gained carrier
Jul 09 06:50:09 argo systemd-timesyncd[207]: Network configuration changed, trying to establish connection.
Jul 09 06:50:09 argo systemd-timesyncd[207]: Using NTP server 216.239.36.15:123 (time3.google.com).
Jul 09 06:50:09 argo systemd-timesyncd[207]: Using NTP server [2001:4860:4802:36::f]:123 (time3.google.com).
Jul 09 06:50:09 argo gnome-session[294]: [477:592:0709/065009:ERROR:connection_factory_impl.cc(287)] Failed to connect to MCS endpoint with error -105
Jul 09 06:50:12 argo systemd-networkd[247]: wlp0s29f7u3     : DHCPv4 address 192.168.1.77/24 via 192.168.1.254
Jul 09 06:50:12 argo systemd-networkd[247]: wlp0s29f7u3     : link configured
Jul 09 06:50:12 argo systemd-timesyncd[207]: Network configuration changed, trying to establish connection.

I use wpa_supplicant and it is run as /usr/bin/wpa_supplicant -Dwext -c/etc/wpa_supplicant/wpa_supplicant-wlp0s29f7u3.conf -iwlp0s29f7u3 where wpa_supplicant-wlp0s29f7u3.conf contains only ssid and psk. wpa_supplicant said

Jul 09 12:18:31 argo wpa_supplicant[255]: ioctl[SIOCSIWAP]: Operation not permitted
Jul 09 12:18:31 argo wpa_supplicant[255]: ioctl[SIOCSIWENCODEEXT]: Invalid argument
Jul 09 12:18:31 argo wpa_supplicant[255]: ioctl[SIOCSIWENCODEEXT]: Invalid argument
Jul 09 12:19:23 argo wpa_supplicant[255]: ioctl[SIOCSIWAP]: Operation not permitted
$ iwconfig
enp14s0   no wireless extensions.

wlp0s29f7u3  IEEE 802.11bg  ESSID:"FOO"  Nickname:"<WIFI@REALTEK>"
          Mode:Managed  Frequency:2.422 GHz  Access Point: 14:4D:DC:F2:A5:FE   
          Bit Rate:54 Mb/s   Sensitivity:0/0  
          Retry:off   RTS thr:off   Fragment thr:off
          Power Management:off
          Link Quality=2/100  Signal level=2/100  Noise level=0/100
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

lo        no wireless extensions.
$ ifconfig  wlp0s29f7u3
wlp0s29f7u3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.77  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::2e0:4cff:fe81:82c0  prefixlen 64  scopeid 0x20<link>
        ether 00:e0:4c:81:82:c0  txqueuelen 1000  (Ethernet)
        RX packets 57093  bytes 74727981 (71.2 MiB)
        RX errors 0  dropped 15367  overruns 0  frame 0
        TX packets 28969  bytes 19928041 (19.0 MiB)
        TX errors 0  dropped 466 overruns 0  carrier 0  collisions 0

Are there any workaround? Do you need any additional information? I do not mind patching/recompiling kernel if it is needed or if you give me pointers to code where the problem can be.

@anatol

This comment has been minimized.

Copy link

commented Jul 9, 2014

I increased the module debug level to 3 and here is what I have in dmesg:

[   19.619998] r8188eu: module is from the staging directory, the quality is unknown, you have been warned.
[   19.622159] Chip Version Info: CHIP_8188E_Normal_Chip_TSMC_D_CUT_1T1R_RomVer(0)
[   19.648729] tg3.c:v3.136 (Jan 03, 2014)
[   19.651702] usbcore: registered new interface driver r8188eu
[   19.675527] systemd-udevd[215]: renamed network interface wlan0 to wlp0s29f7u3
[   19.685003] tg3 0000:0e:00.0 eth0: Tigon3 [partno(BCM95755) rev a002] (PCI Express) MAC address 00:1f:29:00:19:72
[   19.685007] tg3 0000:0e:00.0 eth0: attached PHY is 5755 (10/100/1000Base-T Ethernet) (WireSpeed[1], EEE[0])
[   19.685010] tg3 0000:0e:00.0 eth0: RXcsums[1] LinkChgREG[0] MIirq[0] ASF[0] TSOcap[1]
[   19.685013] tg3 0000:0e:00.0 eth0: dma_rwctrl[76180000] dma_mask[64-bit]
[   19.714143] systemd-udevd[214]: renamed network interface eth0 to enp14s0
[   19.971212] R8188EU: Firmware Version 11, SubVersion 1, Signature 0x88e1
[   20.343772] MAC Address = 00:e0:4c:81:82:c0
[   20.348189] IPv6: ADDRCONF(NETDEV_UP): wlp0s29f7u3: link is not ready
[   22.285668] R8188EU: ERROR assoc success
[   22.285907] IPv6: ADDRCONF(NETDEV_CHANGE): wlp0s29f7u3: link becomes ready
[   22.349887] R8188EU:  [0x00000001,3]
[   22.349891] ### xmitframe_swencrypt
[   22.770035] R8188EU:  [0x00000001,3]
[   22.770039] ### xmitframe_swencrypt
[   23.026712] R8188EU:  [0x00000001,3]
[   23.026716] ### xmitframe_swencrypt
[   24.030067] R8188EU:  [0x00000001,3]
[   24.030071] ### xmitframe_swencrypt
[   24.030155] R8188EU:  [0x00000001,3]
[   24.030156] ### xmitframe_swencrypt
[   24.631287] R8188EU:  [0x00000001,3]
[   24.631292] ### xmitframe_swencrypt
[   24.783370] R8188EU:  [0x00000001,3]
[   24.783374] ### xmitframe_swencrypt
[   26.598914] R8188EU:  [0x00000001,3]
[   26.598918] ### xmitframe_swencrypt
[   27.381248] R8188EU:  [0x00000001,3]
[   27.381251] ### xmitframe_swencrypt
[   28.036698] R8188EU:  [0x00000001,3]
[   28.036703] ### xmitframe_swencrypt
[   30.848917] R8188EU:  [0x00000001,3]
[   30.848922] ### xmitframe_swencrypt
[   31.823833] R8188EU:  [0x00000001,3]
[   31.823837] ### xmitframe_swencrypt
[   32.050033] R8188EU:  [0x00000001,3]
[   32.050038] ### xmitframe_swencrypt
[   32.441915] R8188EU: ERROR linked_status_chk(wlp0s29f7u3) disconnect or roaming
[   32.459044] R8188EU: ERROR sta recv deauth reason code(6) sta:74:9d:dc:80:95:f9
[   32.470531] R8188EU: ERROR sta recv deauth reason code(6) sta:74:9d:dc:80:95:f9
[   32.481904] R8188EU: ERROR sta recv deauth reason code(6) sta:74:9d:dc:80:95:f9
[   32.482534] R8188EU: ERROR sta recv deauth reason code(6) sta:74:9d:dc:80:95:f9
[   32.484278] R8188EU: ERROR sta recv deauth reason code(6) sta:74:9d:dc:80:95:f9
[   32.486029] R8188EU: ERROR sta recv deauth reason code(6) sta:74:9d:dc:80:95:f9
[   32.487032] R8188EU: ERROR sta recv deauth reason code(6) sta:74:9d:dc:80:95:f9
[   32.491409] R8188EU: ERROR sta recv deauth reason code(6) sta:74:9d:dc:80:95:f9
[   32.495531] R8188EU: ERROR sta recv deauth reason code(6) sta:74:9d:dc:80:95:f9
[   32.496653] R8188EU: ERROR sta recv deauth reason code(6) sta:74:9d:dc:80:95:f9
[   32.498775] R8188EU: ERROR sta recv deauth reason code(6) sta:74:9d:dc:80:95:f9
[   32.500530] R8188EU: ERROR sta recv deauth reason code(6) sta:74:9d:dc:80:95:f9
[   32.501778] R8188EU: ERROR sta recv deauth reason code(6) sta:74:9d:dc:80:95:f9
[   32.508405] R8188EU: ERROR sta recv deauth reason code(6) sta:74:9d:dc:80:95:f9
[   32.510534] R8188EU: ERROR sta recv deauth reason code(6) sta:74:9d:dc:80:95:f9
[   32.512155] R8188EU: ERROR sta recv deauth reason code(6) sta:74:9d:dc:80:95:f9
[   34.471052] R8188EU: ERROR assoc success
[   34.842705] fuse init (API version 7.23)
[   35.531102] R8188EU:  [0x00000001,3]
[   35.531106] ### xmitframe_swencrypt
[   35.532069] R8188EU:  [0x00000001,3]
[   35.532074] ### xmitframe_swencrypt
[   56.530315] R8188EU: ERROR linked_status_chk(wlp0s29f7u3) disconnect or roaming
[   58.534058] R8188EU: ERROR assoc success
[   78.593933] R8188EU: ERROR linked_status_chk(wlp0s29f7u3) disconnect or roaming
[   80.652191] R8188EU: ERROR assoc success
[   83.670182] R8188EU: ERROR sta recv deauth reason code(2) sta:74:9d:dc:80:95:f9
[   83.677429] R8188EU: ERROR indicate disassoc
[   85.137693] R8188EU: ERROR sta recv deauth reason code(6) sta:74:9d:dc:80:95:f9
[   85.138438] R8188EU: ERROR sta recv deauth reason code(6) sta:74:9d:dc:80:95:f9
[   85.139177] R8188EU: ERROR sta recv deauth reason code(6) sta:74:9d:dc:80:95:f9
[   98.775697] R8188EU: ERROR assoc success
[   98.808379] R8188EU:  [0x00000001,3]
[   98.808381] ### xmitframe_swencrypt

Here I start git clone of a large repository, and soon the wifi network starts misbehaving:

[ 1535.420084] R8188EU: ERROR sta recv deauth reason code(2) sta:74:9d:dc:80:95:f9
[ 1535.427559] R8188EU: ERROR indicate disassoc
[ 1538.536521] R8188EU: ERROR indicate disassoc
[ 1541.506520] R8188EU: ERROR indicate disassoc
[ 1544.476520] R8188EU: ERROR indicate disassoc
[ 1560.246518] R8188EU: ERROR indicate disassoc
[ 1588.616515] R8188EU: ERROR indicate disassoc
[ 1642.383176] R8188EU: ERROR indicate disassoc
[ 1736.268403] R8188EU: ERROR assoc success
[ 1736.327988] R8188EU:  [0x00000001,3]
[ 1736.327991] ### xmitframe_swencrypt
[ 1812.066925] R8188EU: ERROR linked_status_chk(wlp0s29f7u3) disconnect or roaming
[ 1814.062550] R8188EU: ERROR assoc success
[ 1817.030960] R8188EU:  [0x00000001,3]
[ 1817.030965] ### xmitframe_swencrypt
[ 1832.133592] R8188EU: ERROR linked_status_chk(wlp0s29f7u3) disconnect or roaming
[ 1834.115237] R8188EU: ERROR assoc success
@lwfinger

This comment has been minimized.

Copy link
Owner

commented Jul 10, 2014

The deauthorization at 1535.420084 is because "Previous authentications no longer valid". The one at 32.459044 is due to "Class 2 frame received from nonauthenticated station".

For some reason, your AP and the device are not working together. What make/model are you using? Is the firmware up to date? What are the details of your setup? In particular, what is the encryption method, and how crowded is the spectrum? The output of 'sudo iwlist scan' will tell me the answer to the last one. Please indicate which of the entries is for your AP.

@anatol

This comment has been minimized.

Copy link

commented Jul 10, 2014

What make/model are you using?

I use the default modem/router from my Internet provider (ATT). The modem is 2Wire 3600HGV and it's quite crappy e.g. I periodically have issues with DHCP and the ATT support answered that there are many long-lived bugs opened for this modem but there is little chance that the bugs will be fixed. ATT does not allow me to change the modem, but I can use my own wifi router instead of the ATT's. I consider buying one if it will make my situation better. Or wait until Google Fiber provider will be available in my neighborhood.

The output of 'sudo iwlist scan' will tell me the answer

Sent this information to your lwfinger.net email

@lwfinger

This comment has been minimized.

Copy link
Owner

commented Jul 10, 2014

I got the info. One of the first things that I see is that your channel selection is done badly. Wifi is not like TV where adjacent channels do not interfere. In wifi, the channels are 3 MHz apart, but the band width is 20 MHz for 802.11bg and 40 MHz for 802.11n. As a result, your channel 3 interferes with 9 of the 12 APs in your neighborhood. This driver does not provide any indication of strength in the iwlist output, but I would suggest that you switch yours to channel 11. That way, only 3 of the stations would interfere.

The second thing I noticed is that your AP is only 802.11bg, and is limited to 54 Mbps.

How long until Google Fiber is available? If it is longer than 6 months, I would definitely replace the wireless router. You can get refurbished Netgear WNDR3400 units for $25 through E-Bay. I have had one of these for about 2 years, and also have had a WNDR3300 for a couple of years more. Both work extremely well.

@anatol

This comment has been minimized.

Copy link

commented Jul 10, 2014

I thought about TP-LINK TL-WDR4300 N750 modem that provides 5Ghz 450Mbps wifi as well. And buy another dongle (from TP-LINK) that works in 5Ghz range.

I changed channel to №11 per your recommendation - it did not help.

But blaming the wifi router does not explain why all my other devices work fine. And only the USB dongle has this poor performance. If you think it is not a driver problem, what else can it be? Defective hardware?

@lwfinger

This comment has been minimized.

Copy link
Owner

commented Jul 10, 2014

I do not know what is wrong with your device. I only know that the one I have does not show this behavior.

@anatol

This comment has been minimized.

Copy link

commented Aug 1, 2014

Here is end of my story. I bought TP-LINK Archer C7 V2 router and ... WOW... it made so huge difference with the router AT&T gave me. Now I am able to get 2-4 MB/s downlink with my cheap noname wifi donge , and connection did not drop for the whole week I am using the new router.

@roger-

This comment has been minimized.

Copy link

commented Jan 7, 2019

Five years later and I'm having the same issue (on Armbian). The ping trick seems to be the best fix.

@lwfinger

This comment has been minimized.

Copy link
Owner

commented Jan 7, 2019

Have you tried the "v5.2.2.4" branch? It is quite stable here; however, the one in the latest kernel also works for me.

@roger-

This comment has been minimized.

Copy link

commented Jan 7, 2019

Thanks, haven't yet (I'm using the Armbian default with kernel 4.14) but I will. I've been trying power management hacks (rtw_power_mgnt=0 rtw_enusbss=0 rtw_ips_mode=1) but they don't work.

What's the difference between the branches BTW?

@lwfinger

This comment has been minimized.

Copy link
Owner

commented Jan 7, 2019

They are different versions of the Realtek driver. I would not recommend other than master or v5.2.2.4.

@roger-

This comment has been minimized.

Copy link

commented Jan 8, 2019

Testing now, working good so far and seems faster.

BTW dmesg gives RTW: rtl8188eu v5.2.2.4_25483.20171222 -- is that correct for the latest version?

@lwfinger

This comment has been minimized.

Copy link
Owner

commented Jan 8, 2019

That is the latest that I have. It works well here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.