Ubuntu – Wifi is Not Working on Ubuntu 18.04 LTS with RTL8723BU

driversnetworkingrealtek-wirelesswireless

I have just installed Ubuntu on my pc. Everything is working fine but the Wifi is not working properly When i am trying to connect to a network it is not working and showing error "Activation of Network Connection failed ". Sometime i am able to connect to the network but the network strength is very week. My PC uses realtek driver for wifi.

Here's the output of lspci; lsusb

    00:00.0 Host bridge: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series SoC Transaction Register (rev 21)
00:02.0 VGA compatible controller: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Integrated Graphics Controller (rev 21)
00:13.0 SATA controller: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series SATA Controller (rev 21)
00:14.0 USB controller: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series USB xHCI Controller (rev 21)
00:1a.0 Encryption controller: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series Trusted Execution Engine (rev 21)
00:1b.0 Audio device: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series High Definition Audio Controller (rev 21)
00:1c.0 PCI bridge: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series PCI Express Port #1 (rev 21)
00:1c.1 PCI bridge: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series PCI Express Port #2 (rev 21)
00:1f.0 ISA bridge: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series PCU (rev 21)
00:1f.3 SMBus: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx SMBus Controller (rev 21)
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 006: ID 5986:065e Acer, Inc 
Bus 001 Device 005: ID 0bda:b720 Realtek Semiconductor Corp. 
Bus 001 Device 004: ID 046d:c077 Logitech, Inc. M105 Optical Mouse
Bus 001 Device 003: ID 1c4f:0002 SiGma Micro Keyboard TRACER Gamma Ivory
Bus 001 Device 008: ID 2717:ff80  
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

output of usb-devices | awk '/b720/' RS=

T:  Bus=01 Lev=01 Prnt=01 Port=03 Cnt=04 Dev#=  5 Spd=480 MxCh= 0
D:  Ver= 2.10 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=0bda ProdID=b720 Rev=02.00
S:  Manufacturer=Realtek
S:  Product=802.11n WLAN Adapter
S:  SerialNumber=00e04c000001
C:  #Ifs= 3 Cfg#= 1 Atr=e0 MxPwr=500mA
I:  If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
I:  If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
I:  If#= 2 Alt= 0 #EPs= 6 Cls=ff(vend.) Sub=ff Prot=ff Driver=rtl8xxxu

How to fix this issue??

Best Answer

For built in Realtek RTL8723BU USB adaptors with a "0bda:b720" ID:

$ lsusb
...
Bus 002 Device 002: ID 0bda:b720 Realtek Semiconductor Corp. 
...

For the record, this is what worked for me:

sudo apt install build-essential dkms
sudo apt install git
git clone https://github.com/lwfinger/rtl8723bu.git
sudo apt install libelf-dev

cd rtl8723bu

Comment out the EXTRA_CFLAGS += -DCONFIG_CONCURRENT_MODE line in Makefile. Then make, and install:

make
sudo make install
sudo modprobe -v 8723bu

Blacklist the rtl8xxxu module:

vi /etc/modprobe.d/blacklist.conf, append

blacklist rtl8xxxu

Then add to dkms:

source dkms.conf
sudo mkdir /usr/src/$PACKAGE_NAME-$PACKAGE_VERSION
sudo cp -r core hal include os_dep platform dkms.conf Makefile rtl8723b_fw.bin /usr/src/$PACKAGE_NAME-$PACKAGE_VERSION
sudo dkms add $PACKAGE_NAME/$PACKAGE_VERSION
sudo dkms autoinstall $PACKAGE_NAME/$PACKAGE_VERSION

Check dkms with:

dkms status

Pretty much exactly as in the https://github.com/lwfinger/rtl8723bu page, with the addition of installing libelf-dev and including rtl8xxxu in the blacklist.

Related Question