15

I have install ubuntu 18.04 along side of Windows. I can see that there wifi issue, it does not catch the wifi signal from distance where windows catches the signal from same distance.

I have tried lot of way to figure this out, but unable to find fix for this.

Checked with this below fix but no luck:

Rtl8723be WiFi incredibly weak

The below solution work for ubuntu 14.04 for same laptop.

sudo add-apt-repository ppa:hanipouspilot/rtlwifi
sudo apt-get update
sudo apt-get install rtlwifi-new-dkms

But it giving below error in update command for ubuntu 18.04:

Get:16 http://in.archive.ubuntu.com/ubuntu bionic-backports/universe amd64 DEP-11 Metadata [5,100 B]
Reading package lists... Done                                             
E: The repository 'http://ppa.launchpad.net/hanipouspilot/rtlwifi/ubuntu bionic Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

Output of lspci -knn | grep Net -A3

13:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. RTL8723BE PCIe Wireless Network Adapter [10ec:b723]
    Subsystem: Hewlett-Packard Company RTL8723BE PCIe Wireless Network Adapter [103c:81c1]
    Kernel driver in use: rtl8723be
    Kernel modules: rtl8723be

Output of grep rtl8723be /etc/modprobe.d/*

/etc/modprobe.d/50-rtl8723be.conf:options rtl8723be ant_sel=2
/etc/modprobe.d/rtl8723-ant-sel.conf:options rtl8723be ant_sel=1
/etc/modprobe.d/rtl8723be.conf:options rtl8723be ant_sel=2
/etc/modprobe.d/rtl8723be.con:options rtl8723be ant_sel=2

Kernel version: 4.15.0-29-generic

Zanna
  • 70,465
Swapnil
  • 253

4 Answers4

21

It's a problem with the drivers of Realtek RTL8723BE controller. Do this:

  1. Get the new wifi drivers from github:

    git clone https://github.com/lwfinger/rtlwifi_new.git -b rtw88
    

    Update: The master branch is officially abandoned, branch rtw88 is supported now (appropriate changes have been made in the above command).

  2. Go into the directory:

    cd rtlwifi_new
    
  3. Build it:

    make
    
  4. Install:

    sudo make install
    

    Now, the new drivers are installed. To see what is the correct antenna configuration for your laptop, do this:

  5. Unload the existing module:

    sudo modprobe -r rtl8723be
    
  6. Load the new module with antenna configuration:

    sudo modprobe rtl8723be ant_sel=1
    
  7. Now, check the WiFi signals using:

    iwlist scan | egrep -i 'ssid|quality'
    

    Next, repeat the steps(5-7) with ant_sel=2 in step 6.

  8. Whichever configuration gives the better signal quality, make it default by using:

    echo "options rtl8723be ant_sel=N" | sudo tee /etc/modprobe.d/rtl8723be.conf   #Replace N with 1 or 2
    

Note: After each kernel update, you need to rebuild the modules.

  • I migrated from 16.04 to 18.04 and am now having problems with wifi, it works for short distances, less than 15 feet. Earlier it used to work for larger distances. I tried the steps outlines above but I get the message that directory rtlwifi_new already exists. Is it safe to remove this directory and try loading the driver again? The signal strenght that I am getting at around 10 ft is -66 Dbm – neelanshu Sep 23 '18 at 12:18
  • Yes, you can do that ... remove the previous one. Then just follow the steps. – Maharshi Rawal Sep 23 '18 at 12:33
  • Did it work? @MaharshiRawal – Sachin Chandil Sep 28 '18 at 01:31
  • Yes, it works. I have done it twice. Once when I installed Ubuntu 18.04 and the second time when I had updated the kernel. – Maharshi Rawal Sep 28 '18 at 06:35
  • Instead of make install there's a program called checkinstall that can make a deb package (check man page for the right switches) which makes it easier to remove later. You then finish by sudo dpkg -i $yourPackage.deb. – pbhj Feb 12 '19 at 20:45
  • Yes, you can use checkinstall instead of make install too. – Maharshi Rawal Feb 13 '19 at 07:07
  • Hello, can someone explain what this will do exactly? Will it affect future kernel updates or can I install this without any problem –  Mar 11 '19 at 21:21
  • What it will do: In brief -- Install drivers. Will it affect future kernel updates - No. After you update your kernel, you'll need to perform these steps again. – Maharshi Rawal Mar 12 '19 at 12:19
3

You did wrong things with running the command. You have duplicate entries.

Run in a terminal

cd /etc/modprobe.d
sudo rm 50-rtl8723be.conf rtl8723-ant-sel.conf rtl8723be.conf rtl8723be.con

Now you are clean and you can run

sudo tee /etc/modprobe.d/rtl8723be.conf <<< "options rtl8723be ant_sel=1"

Reboot now and test.

Pilot6
  • 90,100
  • 91
  • 213
  • 324
  • No luck... I tried with both ant_sel=1 and 2 and restarted the machine. Also i check the output of grep rtl8723be /etc/modprobe.d/* each time and see the out put as options rtl8723be ant_sel=1 and 2 respectively – Swapnil Jul 22 '18 at 13:44
  • Was there only one file? – Pilot6 Jul 22 '18 at 13:50
  • 1
    I can see only one file in /etc/modprobe.d – Swapnil Jul 22 '18 at 13:51
  • It's a mystery. Most likely it is a hardware problem, like detached antenna. – Pilot6 Jul 22 '18 at 13:54
  • But it is working for ubuntu 14.04 before i switch to ubuntu 18.04 – Swapnil Jul 22 '18 at 13:56
  • Maybe it broke after you switched. It needs testing. This setting works for everyone else. – Pilot6 Jul 22 '18 at 13:59
  • If I laptop go close to modem then wifi is connected and works well. Wondering whats wrong. – Swapnil Jul 22 '18 at 14:01
  • Low signal that is wrong. – Pilot6 Jul 22 '18 at 14:01
  • Do echo "options rtl8723be ant_sel=2" | sudo tee /etc/modprobe.d/rtl8723be.conf reboot – Jeremy31 Jul 22 '18 at 18:33
  • Try the value ant_sel=2 (what you may see fysically in the PCI ) set to 3 or 4 instead. Why ? sometimes there are more antennas included in the machine up to 4 where the use may be 2 . But 4 in total. Try to raise that value. – Joris Donders Aug 18 '19 at 09:44
  • It makes no sense to "raise that value" because the device has only 2 antenna outputs and the module doesn't take 3 or 4. modinfo rtl8723be | grep parm. – Pilot6 Aug 18 '19 at 10:03
  • This solution didn't work for me. The solution provided by rtlwifi_new did work only until the kernel version 5.0. After which it does not provide any support.

    Moreover, there is no issue with hardware as it works properly in Windows 0, which is dual-booted in the current system. Please let me know if anyone finds a solution.

    – Ashish Farande Jun 28 '20 at 10:54
2

Yes. this problem is because of the default Ubuntu WiFi driver that gives a weak WiFi signal experience. Also I'm using HP laptop where Ubuntu 18.4.1 was installed. So, here is the easiest procedure works for me.

This script is tested successfully on Ubuntu 16.04.3 LTS

Initially you will require a internet connection. So, You can sit near to your router or connect with LAN network.

Steps:

  1. Go to download path https://github.com/navilg/rtl8723be and extract the zip file

  2. After extraction we will see a folder rtl8723be-script folder

  3. Go inside that folder and you will find install.sh file. We will use this script to run the programs

  4. Make sure you have installed following programs in your system. Programs:

    • unzip : You can install it using 'sudo apt install unzip'
    • make : You can install it using 'sudo apt install make'
    • gcc : You can install it using 'sudo apt install gcc'
    • wget : You can install it using 'sudo apt install wget'
  5. Now we will run the sript in terminal.

    bash '/home/navi/Downloads/rtl8723be-script/install.sh'
    
  6. It will ask for password so that it can install the programs as SuperUser

  7. It will check for required programs. If all programs mentioned above exist in your system then it will proceed with installation procedure or else it will ask to install those programs. Those programs are by default installed in Ubuntu 16.04.3.

  8. It will ask for permission to download required files. After typing y file will be downloaded

  9. Now you need to provide interface name of your wifi.

You can check that using iwconfig command. For that open new terminal

  1. Copy paste the interface name

  2. Installation is in progress it may take some time. Be patient. Nothing will show on terminal except dot at the time of installation.

  3. If installation fails,

    Don't worry. It will try installing another file to resolve the issue

    Press y and enter

    Again it will download another file

    Again provide interface name

    It will try installing and may take few minutes based on your system speed.

  4. you can check the background installation processes in log file displayed on the screen

  5. Now it will ask if you want to delete downloaded files. If you delete downloaded files. You will need internet connection again if in future you will need to install it again. If you retain it you don't require internet connection again and installation will be faster.

    You can retain it or delete it based on your choice. I want to delete it as I already have those file

  6. Installation successful. You can reboot the system for better performance.

  7. Installation is successful. After rebooting you will find strong wifi signal.

Please let me know your feedback, suggestions or any bugs on navilg0409@gmail.com

Video guide of this procedure at youtube.

abu_bua
  • 10,783
sybozz
  • 121
1

HP Notebooks with Realtek 8723be PCI WiFi will have low signal problems in Ubuntu 18.04 if run with the default drivers.

Download this driver from the GitHub master branch - there's a zip file at this download link.

After download, extract the .zip file to your Desktop directory.
The following method of driver installation corrects the signal problem.

Open a terminal window with CTRL+ALT+T) and execute the following commands:

cd Desktop
cd rtlwifi_new-master
make
sudo make install
sudo modprobe -rv rtl8723be
sudo modprobe -v rtl8723be ant_sel=2

Now check signal strength and...

sudo ip link set wlo1 up
sudo iw dev wlo1 scan

wlo1 may be different in your case (check your exact wireless extension with the iwconfig command in terminal).

To make the settings permanent, type the below command in terminal and press enter.

echo "options rtl8723be ant_sel=2" | sudo tee /etc/modprobe.d/50-rtl8723be.conf

Note:
After an OS (Kernel) update, you need to re-apply these settings again to get a strong signal.

Zanna
  • 70,465