I've read the thread and the common cause seems to be a bug in the power management implemantation that causes the connection to drop.
I can't claim credit for the solution below , but i have tested it and found it worked for my wifi adapter (TPLINK WN823N with a Realtek RTL8192CU chipset) . Unfortunately I haven't been able to find the original posting.
This will require a recompile of the RTL8192CU driver (detailed guide below)
==============
Step by step guide
==============
Ensure you have the necessary prerequisites:
Code: Select all
sudo apt-get install linux-headers-generic build-essential dkms
Install "git" if it isn't installed yet. You'll need it for the next command.
Clone this git repository:(it will create "rtl8192cu-fixes" subdirectory in you $HOME directory )
Code: Select all
git clone https://github.com/pvaret/rtl8192cu-fixes.git
Set it up as a DKMS module:
Build and install it (this version number may change, it is .11 in the package I installed.
(Check the PACKAGE_VERSION entry in $HOME/rtl8192cu-fixes/dkms.conf)
Refresh the module list:
Ensure the native (and broken) kernel driver is blacklisted: (this item disables powersaving for the RTL8192CU adapter)
Code: Select all
sudo cp ./rtl8192cu-fixes/blacklist-native-rtl8192.conf /etc/modprobe.d/
And reboot. You're done.
With the following terminal command you can check whether the right driver is active now (copy and paste it into the terminal):
============
The network driver update above works. There is another alternative as well but I haven't tested it:
If github is your thing then these guys also have a driver that is up-to-date with patches:
=>
https://github.com/Mange/rtl8192eu-linux-driver
============
## Background ##
=========
Realtek rtl8192cu wireless dongle (TP-Link TL-WIN823N)
--------
The TL-WN823N WLAN USB stick bases on the Realtek chip set RTL8192CU and provides a transmission rate up to 300Mbps.
The TL-WN823N is recognized by the kernel with the USB ID 0bda:8178:
Code: Select all
lsusb
1 Bus 001 Device 006: ID 0bda:8178 Realtek Semiconductor Corp. RTL8192CU 802.11n WLAN Adapter
However, the stick is not fully supported by the kernel module rtl8192cu that is used by Ubuntu 12.10, e.g. the connection drops regularly. To prevent this behaviour one has to add the following module options in the file /etc/modprobe.d/rtl8192cu.conf to disable the hardware encryption and use software based encryption instead:
/etc/modprobe.d/rtl8192cu.conf
1 options rtl8192cu swenc=1
Realtek Module 8192cu
It is recommended to replace the standard driver by the original Realtek drivers 8192cu. If the Realtek driver is used instead of the module which is part of the standard kernel, the automatic loading of the kernel module has to be inhibited. To achieve this, the rtl8192cu driver provided by the standard kernel has to be blacklisted in the file /etc/modprobe.d/blacklist.conf by adding the following line:
1 blacklist rtl8192cu
The module from the Realtek homepage is called 8192cu and has to be compiled by hand. Under Ubuntu compiladmesg\tion will need the build-essentials to be installed:
1
sudo apt-get install build-essential
Compilation will be achieved by the install script that is part of the downloaded file:
1
sudo sh install.sh
The compiled driver can be loaded by the command
1
sudo modprobe 8192cu
Due to a bug in the power management of the 8192cu driver the connection can drop if the device is set to power save mode. This can be seen in the log files:
dmesg
1
2
3
4
5
6
rtl8192c_dm_RF_Saving(): RF_Normal
rtl8192c_set_FwPwrMode_cmd(): Mode = 1, SmartPS = 2
rtw_set_ps_mode(): Busy Traffic , Leave 802.11 power save..
rtl8192c_set_FwPwrMode_cmd(): Mode = 0, SmartPS = 0
rtl8192c_dm_RF_Saving(): RF_Save
rtw_set_ps_mode(): Enter 802.11 power save mode...
To prevent the power save mode one has to add the following module options in the file /etc/modprobe.d/8192cu.conf:
/etc/modprobe.d/8192cu.conf
1
options 8192cu rtw_power_mgnt=0 rtw_enusbss=0
creation date: 21/04/2013, last update: 06/12/2014 , Linux-Hardware-Guide
## END ##