I have dual booted my Windows 8 laptop with Ubuntu 14.04. The wifi driver is Realtek rtl8723be. It didn't use to work but I updated the kernel to 3.18 and reinstalled the driver and that seemed to solve the problem for a few hours. Then it would be connected for around 30 minutes and then the connection would stop, even though the icon on the system tray would still indicate it's connected. The only thing that works is restarting the computer but then, again, after 30 minutes the connection stops.


4 Answers 4


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

  • 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


make clean && make


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/

  • This works perfectly (Lenovo B40, Ubuntu 14.04) . Thanks.
    – Jayaram
    Jun 2, 2015 at 7:24
  • 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.
    – John T
    Jul 10, 2015 at 2:13
  • Thank you for the info! I'll also note that my laptop is HP 470G2. Jul 13, 2015 at 8:44
  • didn't need to add options to the wifi config the new drivers work great. Nov 7, 2015 at 12:44
  • It's work on HP Pro Book 430 G2
    – Praditha
    Mar 15, 2016 at 3:30

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.


  • 3
    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. Dec 3, 2016 at 16:34
  • @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 Dec 23, 2016 at 2:45
  • 5
    «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. :) Jan 5, 2017 at 0:25
  • 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.:) Oct 20, 2017 at 4:13

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.

  • 1
    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.
    – Brian Z
    Feb 1, 2016 at 18:40

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


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

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"
    echo "Download couldn't be completed. Exiting"
    exit 1

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

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

echo "Fixing Wifi"
checkGit || installGit
cloneRepo $REPO
configureWiFi $CONFIG_DIR
echo "Your WiFi is fixed. Enjoy!"
echo "If this doen't help, try changing rtl8723be.conf and repeating the process"
exit 0
  • I tried this solution but there is still a ? sign on my wifi and it drops and also is slow Apr 19, 2018 at 16:53
  • @MahdiYounesi what is the output of the script?
    – tbking
    Apr 24, 2018 at 16:43
  • The output was your echos in script, I ended up buying a USB wireless adapter for 10$ now I'm good Apr 24, 2018 at 18:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .