Ubuntu: Unable to connect to Wifi with Ubuntu 16.04



Question:

I have just installed 16.04 on my HP-149tx alongside Windows. I am unable to access the Wifi from Ubuntu. The signal is too weak even if I hold the laptop close to the router.I can confirm this is a driver issue since I have flawless access to my Wifi from Windows.

What I did to try and rectify this issue is try to download and install the wifi drivers as per instructions specified over here. The problem I get when installing the driver is as follows-:

(Reading database ... 174937 files and directories currently installed.)  Preparing to unpack rtlwifi-new-dkms_0.10_all.deb ...    ------------------------------  Deleting module version: 0.10  completely from the DKMS tree.  ------------------------------  Done.  Unpacking rtlwifi-new-dkms (0.10) over (0.10) ...  Setting up rtlwifi-new-dkms (0.10) ...  Loading new rtlwifi-new-0.10 DKMS files...  First Installation: checking all kernels...  Building only for 4.8.0-36-generic  Building for architecture x86_64  Building initial module for 4.8.0-36-generic  Error! Bad return status for module build on kernel: 4.8.0-36-generic (x86_64)  Consult /var/lib/dkms/rtlwifi-new/0.10/build/make.log for more information.  

Also the contents of make.log is as follows-:

DKMS make.log for rtlwifi-new-0.10 for kernel 4.8.0-36-generic (x86_64)  Sun Jul 30 17:10:27 IST 2017  make: Entering directory '/usr/src/linux-headers-4.8.0-36-generic'    LD      /var/lib/dkms/rtlwifi-new/0.10/build/built-in.o    CC [M]  /var/lib/dkms/rtlwifi-new/0.10/build/base.o  In file included from /var/lib/dkms/rtlwifi-new/0.10/build/base.c:30:0:  /var/lib/dkms/rtlwifi-new/0.10/build/wifi.h:1327:40: error: ‘IEEE80211_NUM_BANDS’ undeclared here (not in a function)    struct ieee80211_supported_band bands[IEEE80211_NUM_BANDS];                                          ^  /var/lib/dkms/rtlwifi-new/0.10/build/base.c:138:10: error: ‘IEEE80211_BAND_2GHZ’ undeclared here (not in a function)    .band = IEEE80211_BAND_2GHZ,            ^  /var/lib/dkms/rtlwifi-new/0.10/build/base.c:150:10: error: ‘IEEE80211_BAND_5GHZ’ undeclared here (not in a function)    .band = IEEE80211_BAND_5GHZ,            ^  scripts/Makefile.build:289: recipe for target '/var/lib/dkms/rtlwifi-new/0.10/build/base.o' failed  make[1]: *** [/var/lib/dkms/rtlwifi-new/0.10/build/base.o] Error 1  Makefile:1491: recipe for target '_module_/var/lib/dkms/rtlwifi-new/0.10/build' failed  make: *** [_module_/var/lib/dkms/rtlwifi-new/0.10/build] Error 2  make: Leaving directory '/usr/src/linux-headers-4.8.0-36-generic'  

I can confirm that my wifi lan card is a Realtek RTL8723BE device since that is what my Windows OS recognizes it as and I have installed the Windows equivalent driver for it and it working fine there.

The output from modinfo rtl8723be is as follows-:

alex@alex-HP-Notebook:~/Desktop/rtlwifi_new-master$ modinfo rtl8723be  filename:       /lib/modules/4.8.0-36-generic/kernel/drivers/net/wireless/realtek/rtlwifi/rtl8723be/rtl8723be.ko  firmware:       rtlwifi/rtl8723befw.bin  description:    Realtek 8723BE 802.11n PCI wireless  license:        GPL  author:         Realtek WlanFAE <wlanfae@realtek.com>  author:         PageHe  <page_he@realsil.com.cn>  srcversion:     1520FD8B69687790125304A  alias:          pci:v000010ECd0000B723sv*sd*bc*sc*i*  depends:        rtlwifi,rtl8723-common,rtl_pci,btcoexist,mac80211  intree:         Y  vermagic:       4.8.0-36-generic SMP mod_unload modversions   parm:           swenc:Set to 1 for software crypto (default 0)   (bool)  parm:           ips:Set to 0 to not use link power save (default 1)   (bool)  parm:           swlps:Set to 1 to use SW control power save (default 0)   (bool)  parm:           fwlps:Set to 1 to use FW control power save (default 1)   (bool)  parm:           msi:Set to 1 to use MSI interrupts mode (default 0)   (bool)  parm:           debug:Set debug level (0-5) (default 0) (int)  parm:           disable_watchdog:Set to 1 to disable the watchdog (default 0)   (bool)  parm:           ant_sel:Set to 1 or 2 to force antenna number (default 0)  

Also my router is configured with the following parameters-:

Wireless Band: 2.4 GHz  802.11 Mode: Mixed 802.11n, 802.11g, 802.11b  Auto Channel Scan enabled  Wireless Channel : 2.437 GHz - CH 6  Channel Width: Auto 20/40 MHz  


Solution:1

Quite often, the weak signal is a symptom of the antenna wire being connected to connection #1 on the card when the default driver is expecting to see the signal at connection #2. Of course, you could open the laptop and switch the wire or you could instruct the driver to explicitly select the working antenna connection. First, try connection #1:

sudo -i  echo "options rtl8723be ant_sel=1"  >  /etc/modprobe.d/rtl8723be.conf  exit  

Reboot and test. If this is ineffective, try #2:

sudo -i  echo "options rtl8723be ant_sel=2"  >  /etc/modprobe.d/rtl8723be.conf  exit  


Solution:2

The 4.8 or 4.10 kernel doesn't require the rtkwifi-new module. You need to uninstall it.

Run

sudo apt purge rtlwifi-new-dkms  sudo add-apt-repository -r ppa:hanipouspilot/rtlwifi  

Then use this answer to fix the weak signal issue.


Solution:3

Have you checked your wifi signal strength? I suggest you to use wifi scanner https://www.netspotapp.com/wireless-network-wifi-scanner.html to monitor your network and identify problem areas first. I think the problem can be in the level of background noise at your house.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »