Wifi problems with rtl8723be in Ubuntu 14.04

407

Solution 1

I was having these problem with rtl8723be on linux mint 17, and mint17.1. The same procedure should work on ubuntu 14.04 and derivates.

I had to install new module for realtek wifi cards where they solved the constant disconnects:

  • install required packages

    sudo apt-get install build-essential git
    
  • git clone new realtek wifi modules

    git clone https://github.com/lwfinger/rtlwifi_new/
    
  • enter the directory

    cd rtlwifi_new
    
  • build it

    make
    
  • install

    sudo make install
    

Now you can reboot or unload/load modules

  • unload modules

    sudo modprobe -r rtl8723be
    
  • load new module

    sudo modprobe rtl8723be
    
  • if it still doesn't work, try the solution from this post

    echo "options rtl8723be fwlps=0" | sudo tee /etc/modprobe.d/rtl8723be.conf
    

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

After every kernel update:

cd rtlwifi_new

Clean previous builds

make clean

Update git repository

git pull

Compile

make clean && make

Install

sudo make install

reboot or unload/load modules

EDIT: It seems as of kernel 4.17 kernel APIs have changed: Note: If your kernel is 4.17 or newer, AND your card is not an RTL8723DE, then you should NOT be using the external driver. The built-in one is the same. source: https://github.com/lwfinger/rtlwifi_new/

Solution 2

My friend's HP laptop wouldn't display the available Wi-Fi networks.

So I followed the steps from Miodrag Prelec's answer till echo "options rtl8723be fwlps=0" | sudo tee /etc/modprobe.d/rtl8723be.conf

Then, I did

sudo modprobe -r rtl8723be

Then either of:

sudo modprobe rtl8723be ant_sel=1
sudo modprobe rtl8723be ant_sel=2

(whichever works)

After doing this it would list the Wi-Fi signals in the menu.

So I added these lines to /etc/rc.local (above exit 0) so that it would run each time my laptop boots up.

sleep 10
sudo modprobe -r rtl8723be
sudo modprobe rtl8723be ant_sel=1

Note: change ant_sel=1 to ant_sel=2 if required.

source

Solution 3

Run the following command in terminal

echo "options rtl8723be fwlps=N ips=N" | sudo tee /etc/modprobe.d/rtl8723be.conf

as this will disable some of the power management of the card and usually helps.

And then you need to reboot or manually reload the driver

sudo modprobe -rv rtl8723be
sudo modprobe -v rtl8723be

This was found in ubuntuforums. Varunendra is very good troubleshooting the realtek cards.

Solution 4

I faced a similar situation, I took the suggestions available on various sites, and created this script which works for me.
Here it is on GitHub

To clone the repo, run:

git clone https://github.com/tarunbatra/fixRTL8723BE

cd to the project root, then run bash install.sh. Here's the script for reference:

#!/usr/bin env bash

REPO="https://github.com/lwfinger/rtlwifi_new"
CONFIG_DIR=`pwd`

checkGit() {
  if git --version  &> /dev/null; then
    echo "Git found"
  else
    echo "Git not found"
  fi
}

installGit() {
  echo "Installing git\n"
  sudo apt-get install git >> /dev/null
}

cloneRepo() {
  echo "Downloading latest drivers from $REPO"
  if git clone $REPO /tmp/rtlwifi_new_$$; then
    echo "Drivers downloaded successfully"
  else
    echo "Download couldn't be completed. Exiting"
    exit 1
  fi
}

installDrivers() {
  cd /tmp/rtlwifi_new_$$ || (echo "Drivers not found"; exit 1)
  echo "Building drivers"
  if make && sudo make install; then
    echo "Drivers built successfully"
  else
    echo "Drivers couldn't be built. Exiting"
    exit 1
  fi
}
configureWiFi() {
  echo "Configuring the WiFi settings"
  cd $1
  if (cat ./setup.conf  | sudo tee /etc/modprobe.d/rtl8723be.conf); then
    echo "WiFi settings configured"
  else
    echo "Wifi settings couldn't be configured"
  fi
}

restartWiFi() {
  echo "Restarting WiFi"
  if sudo modprobe -r rtl8723be && sudo modprobe rtl8723be; then
    echo "WiFi restarted"
  else
    echo "Couldn't restart WiFi"
  fi
}

echo "Fixing Wifi"
checkGit || installGit
cloneRepo $REPO
installDrivers
configureWiFi $CONFIG_DIR
restartWiFi
echo "Your WiFi is fixed. Enjoy!"
echo "If this doen't help, try changing rtl8723be.conf and repeating the process"
exit 0
Share:
407

Related videos on Youtube

Shazam
Author by

Shazam

Updated on September 18, 2022

Comments

  • Shazam
    Shazam over 1 year

    I cannot commit and push to Git.

    It says: Rejected - non - fast forward.

    I have accidentally click on "Amend - (edit previous commit) button in Eclipse.

    What can I do?

    Please help. Thanks.

    • Ahmed HENTETI
      Ahmed HENTETI over 4 years
      can you show us the output of git status
    • phd
      phd over 4 years
    • phd
      phd over 4 years
    • howlger
      howlger over 4 years
      Did you push the previous commit (which was replaced with the new commit created by Amend)? If yes, you have to reset to the previous commit and commit the changes as a separate commit first. Then, in both cases, do a pull to rebase your commit on top of the commits made by others in the meantime.
  • Jayaram
    Jayaram almost 9 years
    This works perfectly (Lenovo B40, Ubuntu 14.04) . Thanks.
  • John T
    John T almost 9 years
    This also worked for a Gigabyte P15 Laptop, the only difference being the "kernel-headers" package wasnt found or required for Ubuntu 14.04, 64 bit version.
  • Christian Gtz
    Christian Gtz over 8 years
    didn't need to add options to the wifi config the new drivers work great.
  • Brian Z
    Brian Z about 8 years
    I tried this, but it made me unable to connect at all. Only after deleting /etc/modprobe.d/rtl8723be.conf and restarting was I able to get online again.
  • Praditha
    Praditha about 8 years
    It's work on HP Pro Book 430 G2
  • João Abrantes
    João Abrantes almost 8 years
    It's not working for me. I got modprobe: error: could not insert 'rtl8723be': required key not available
  • Sriram Kannan
    Sriram Kannan over 7 years
    My problem was the Wi-Fi networks were not showing at all, so i had to follow the below steps till echo "options rtl8723be fwlps=0" | sudo tee /etc/modprobe.d/rtl8723be.conf then, sudo modprobe -r rtl8723be sudo modprobe rtl8723be ant_sel=1 or sudo modprobe rtl8723be ant_sel=2 After doing this it would list the Wi-Fi signals in the menu.
  • Rifaz Nahiyan
    Rifaz Nahiyan over 7 years
    sudo modprobe rtl8723be ant_sel=2 fixed it! I cannot thank you enough bro! If you were in my country, I would buy you a drink. I literally spent 2 months+ trying to make my friend's wifi on ubuntu work. While Realtek's driver was feeling like a curse, your solution is like a blessing.
  • Miodrag Prelec
    Miodrag Prelec over 7 years
    Thank you Sriram Kannan. This is well explained on the GitHub page of rtlwifi_new by its creator lwfinger. So for anyone with the same problem, read the following: github.com/lwfinger/rtlwifi_new/issues/88
  • Sriram Kannan
    Sriram Kannan over 7 years
    @RifazNahiyan I'm glad it helped. I spent 5 hours trying to make WiFi work on my friend's Ubuntu, then found a post (I added the source) mentioning ant_sel=1 and it solved the problem. All thanks to LinuxLinx
  • Andrea Lazzarotto
    Andrea Lazzarotto over 7 years
    «I added these lines to /etc/rc.local» Your example shows a script that will delay boot by 10 seconds. A cleaner alternative is to set up a kernel module parameter by adding for instance rtl8723be.ant_sel=2 after quiet splash in /etc/default/grub and then issuing sudo update-grub. :)
  • kmonsoor
    kmonsoor about 7 years
    worked like charm on HP ProBook 470 G3, Ubuntu 16.04
  • Avijit Dasgupta
    Avijit Dasgupta over 6 years
    Dude, After 1 year, I found this solution. Tried everything. but could not make it work. Your solution worked like a charm! Thanks :) P.S. - Commenting while connected to a wifi n/w.:)
  • Mahdi Younesi
    Mahdi Younesi about 6 years
    I tried this solution but there is still a ? sign on my wifi and it drops and also is slow
  • tbking
    tbking about 6 years
    @MahdiYounesi what is the output of the script?
  • Mahdi Younesi
    Mahdi Younesi about 6 years
    The output was your echos in script, I ended up buying a USB wireless adapter for 10$ now I'm good
  • denis.peplin
    denis.peplin over 5 years
    I would upvote, but the answer needs modification, because it doesn't work as expected with modern kernels: unsigned module can't be loaded, so after applying instructions I got my wifi disabled completely.
  • Miodrag Prelec
    Miodrag Prelec over 5 years
    You should read carefully before applying modules: github.com/lwfinger/rtlwifi_new It clearly states: "IF YOU RUN UBUNTU, YOU CAN BE ASSURED THAT THE APIs HAVE CHANGED. NO, I WILL NOT MODIFY THE SOURCE FOR YOU. YOU ARE ON YOUR OWN!!!!!" :) Thanks for the comment tho, I will update the Answer.
  • Shazam
    Shazam over 4 years
    Hi! I am working on a branch. Do I rebase origin/<mybranch> ?
  • uncletall
    uncletall over 4 years
    Yes, that's correct, and the push to the branch as well
  • Shazam
    Shazam over 4 years
    Thanks. But I am using eclipse. How do I do it? I have tried using command line but it says Authentication Failed. I have also tried to use GUI pull but it says: Pulling 1 repository Exception caught during execution of merge command. org.eclipse.jgit.errors.MissingObjectException: Missing unknown b28c776928d641cca3586366ddef6f3044d84721
  • uncletall
    uncletall over 4 years
    Assuming the rebase was successful you can use eclipse to push.