If you have installed a new version of Linux Ubuntu or Mint distribution you might have issues with Realtek wifi adapter (USB) not connecting properly with weak wifi signal even if the router is 5 feet away. The reason for this is faulty drivers, in my case i used RRTL8192 adapter.
In most cases ubuntu will automatically install the driver.
Here is how you resolve driver issues by manually compiling the linux driver (there are no readymade driver download available for this particular wifi adapter)
First check if your wifi manufacturer using this command and your device is
> lsusb
bu@pbu-desktop:~$ lsusbBus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hubBus 001 Device 004: ID 0bda:818b Realtek Semiconductor Corp. RTL8192EU 802.11b/g/n WLAN AdapterBus 001 Device 003: ID 1a2c:6004 China Resource Semico Co., Ltd USB KeyboardBus 001 Device 002: ID 1a2c:0042 China Resource Semico Co., Ltd Usb MouseBus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Follow these installation steps
Easygit clone https://github.com/clnhub/rtl8192eu-linuxsudo apt -y install linux-headers-generic build-essential dkms git cdrtl8192eu-linux./install_wifi.sh
Manual install
Remove available drivers with (skip if sudo lshw -C network and dkms status do not show any wifi drivers):
sudo rmmod 8192eu
sudo rmmod rtl8xxxu
sudo dkms remove -m rtl8192eu -v 1.0
Blacklist default driver (rtl8xxxu on Ubuntu):
echo "blacklist rtl8xxxu" >> ./blacklist-rtl8xxxu.conf
sudo mv ./blacklist-rtl8xxxu.conf /etc/modprobe.d/
Run add and install commands from driver directory:
sudo cp -ar . /usr/src/rtl8192eu-1.0
sudo dkms add -m rtl8192eu -v 1.0
sudo dkms install -m rtl8192eu -v 1.0
Load driver (or reboot):
sudo modprobe 8192eu
Thats it! Your wifi will work properly after reboot.
