# rtl8192cu disconnects after about 5min of inactivity[solved]

## ewpt3ch

It is a power management issue with the chip/driver and Larry is working on it.  Looks like not fixed for 3.12 kernel.

http://comments.gmane.org/gmane.linux.kernel.wireless.general/112805

I have an: Edimax EW-7811Un USB 802.11n Adapter that use the rtl8192cu driver.  There have been alot of problems with this driver being unable to connect and basically not working, until the 3.12 kernel.  With the 3.12 kernel(gentoo-sources) the adapter connects to my AP and gives me great throughput.  The problem now: I lose network connectivity after about 5min of no traffic.  The logs show nothing, wpa_supplicant with -d option shows nothing (that I can tell), and ifconfig, conky, iw, wpa_gui all show that I am still connected, however if I try to load a webpage or even ping my router, nothing.  I am fairly confident that my router is not the problem since all of the other devices(handsets, chromecast, and even this wifi adapter in my wifes windows laptop) do not have this problem.  I believe that the adapter is going to sleep, or some low power state, however /sys/bus/usb/devices/2-1:1.0/power is empty and /sys/bus/usb/devices/usb2/power/control is set to on.  So I believe it should not be going to sleep, except when the whole computer goes to sleep(when the lid is closed).  The bandaid fix is to open wpa_gui and click connect button, forces a disconnect and reconnect.  Then it works for a little while before I am again unable to get any network traffic through.

systemd-204-r1 for init

kernel 3.12

wpa_supplicant-2.0-r2

iw-3.10

wpa_supplicant.conf

```
ctrl_interface=DIR=/run/wpa_supplicant GROUP=wheel                                                 

update_config=1                                                                                    

network={                                                                                          

        ssid="myth"                                                                                

        psk="****"                                                         

        proto=RSN                                                                                  

        key_mgmt=WPA-PSK                                                                           

        pairwise=CCMP                                                                              

        auth_alg=OPEN

}

```

wpa_supplicant@.service used to start this adapter

```
[Unit]                                                                                             

Description=WPA supplicant daemon (interface-specific version)                                     

                                                                                                   

# NetworkManager users will probably want the dbus version instead.                                

                                                                                                   

[Service]                                                                                          

Type=simple                                                                                        

ExecStart=/usr/sbin/wpa_supplicant -c/etc/wpa_supplicant/wpa_supplicant.conf -i%I -Dnl80211 -d -f/tmp/wifilog                                                                                         

                                                                                                   

[Install]                                                                                          

Alias=multi-user.target.wants/wpa_supplicant@wlan0.service
```

I have been unable to find anything online about this particular problem, only pre 3.12 issues. Should I submit a kernel bug, or am I missing something (the correct place to look perhaps) with systemd and power management.  Incidently the internal 3945abg does not have this problem, just too slow.Last edited by ewpt3ch on Thu Nov 21, 2013 4:29 am; edited 1 time in total

----------

## asturm

Anything in dmesg?

That's the same behaviour I've seen since 3.11. Before, it was practically impossible to get any kind of connection, now, with an endless ping, it mostly stays up - packet loss and the occasional huge latency still happening.

ZyXEL Communications Corp. NWD2205 802.11n (RTL8192CU)

----------

## ewpt3ch

Nothing in dmesg about the "timeout" or "disconnect", not sure what to call this.  The last dmesg before the symptom presents itself is wlp****: associated.  I still haven't gotten any good messages or any sign from dmesg, journalctl, or the wifilog created by wpa_supplicant -d that indicates a connection issue.  The only sign is all network traffic times out.  Maybe relevant: the edimax was completely unusable until gentoo-sources-3.12, it would connect, get ip address with absolutely no throughput at all.

I am at a complete loss as to how to proceed since there are no log/messages anywhere in my system.  If anyone knows how to turn on more verbose debugging/messages that would be helpful? The version of wpa_supplicant I am on does not have a debug USE flag. I enabled RTLWIFI_DEBUG in the kernel.

----------

## ewpt3ch

I just found this on gmane, apparently there are power management issues with these chips and Larry is working on it.

http://comments.gmane.org/gmane.linux.kernel.wireless.general/112805[/quote]

----------

## alienjon

I can confirm this same problem with an Asus N13 (Also Realtek RTL8192CU) on a 3.16.5 kernel...

----------

## alienjon

You changed the title to [solved], but is this problem actually resolved or solved in that people know about it and are working on it?  The non-kernel driver cuts out for me after about 30 seconds of inactivity and the other versions of the driver either don't compile or don't seem to recognize my device.

----------

