First of all, ensure you have the necessary prerequisites:
sudo apt-get install linux-headers-generic build-essential dkms git
Clone the updated driver with git
:
git clone https://github.com/pvaret/rtl8192cu-fixes.git
Set it up as a DKMS module:
sudo dkms add ./rtl8192cu-fixes
Build and install the driver:
sudo dkms install 8192cu/1.8
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/
Let's not take any chances. Instruct Ubuntu to load the new driver when it starts up.
echo 8192cu | sudo tee -a /etc/modules
Reboot.
You're done.