Installing realtek rtl8723be driver for Ubuntu ,Debian or Fedora – Updated

wifi-158401_1280

I have been searching for a fix for the wifi problems in my HP Pavillion ab-028tx. It’s having a Realtek rtl8723be Wifi Card. For a long time, there was no perfect driver for this device. I tried many drivers and none of them fixed the disconnection and low wifi range problems. At last, I found a fix from ubuntu forums. Follow these steps to get your wifi working in Ubuntu.

  • Get into your BIOS(in my case I had to press f10 after turning on my laptop). Then go into System Configuration->Boot options and Disable secure boot. This is very important as third party drivers won’t work in secure boot mode as they are not verified.

IMG_20160512_145107

  • Save and restart(f10), open up a terminal (ctrl + alt + t) and type the following commands in order.
  • Installing new driver for the Realtek wifi chip.

Note:  Its suggested to have latest kernel installed(Linux kernel 4+).

Step 1:

Ubuntu :

$ sudo add-apt-repository ppa:hanipouspilot/rtlwifi
$ sudo apt-get update
$ sudo apt-get install rtlwifi-new-dkms linux-firmware
  • Restart ubuntu.
$ sudo reboot

 

Debian:

 

$  sudo apt-get install firmware-realtek

Step 2:

Common steps for all three OSes.

  • If you are not able to see your wifi networks, follow the steps below :
  • Download the driver by clicking “Download ZIP” from GitHub.
  • extract it to your home directory and open a terminal.
  • Execute the following commands :

 

Step 3:

Ubuntu and Debian

$ sudo apt-get install linux-headers-$(uname -r) gcc g++ build-essential dkms git
$ sudo reboot
$ cd rtlwifi_new-rock.new_btcoex
$ make
$ sudo make install
$ sudo modprobe -rv rtl8723be

 

Fedora

$ sudo dnf install kernel-devel kernel-headers
$ cd rtlwifi_new-rock.new_btcoex
$ make
$ sudo make install
$ sudo modprobe -rv rtl8723be

 

Step 4:

Common Steps

  • If you are unable to get wifi even now, change the antenna input to #2 using the command:
$ sudo modprobe -v rtl8723be ant_sel=2
  • note : try changing ant-set=1 or 0 if it doesn’t work for u.
  • Now your Wifi will be working perfectly as in windows, now set input #2 as permanent.
$ echo "options rtl8723be ant_sel=2 fwlps=0" | sudo tee /etc/modprobe.d/rtl8723be.conf

And reload the module.

$ sudo modprobe -r rtl8723be
$ sudo modprobe rtl8723be

 

Now your WiFi should be working perfectly :).

57 thoughts on “Installing realtek rtl8723be driver for Ubuntu ,Debian or Fedora – Updated

  1. Iǘe followed all the instructions an still missing interface wifi (eth1) in my computer. When “ifconfig -a” applied in terminal window, only eth0 and lo interfaces appears.

    Liked by 1 person

  2. This did not work for me 😦

    And I had so much hope!

    I followed up until “If you are not able to see your wifi networks, follow the steps below :”

    and none of the rest although i read through it…do I have to do the last step anyway?

    “Now your Wifi will be working perfectly as in windows, now set input #2 as permanent.”?

    Thanks anyway!

    Matt

    Like

      1. Wow…that was the last nail in the coffin! Turned my computer on this morning…wifi connection was worse than before i started any of this…completed the steps and now i get absolutely zero connection…im connected through LAN cable now…any other suggestions?

        Like

  3. Seriously dude…now I really need to know how to undo this…especially the last steps…I dual boot linux and windows and this broke it in windows as well…I really need to fix this! HELP!

    Like

    1. Ok, I have updated the steps, U could follow it again from the beginning. I have tested in three different OS in three different laptops.

      To undo all this, go into the folder rtlwifi_new-rock.new_btcoex
      $ sudo make uninstall
      $ sudo apt-get remove rtlwifi-new-dkms

      and reboot.

      And any changes you make in Linux won’t affect windows in any way, maybe it’s an issue with something else.

      Please make sure your WiFi device is Realtek rtl8723be. I haven’t worked with any other devices.
      This works for me in Ubuntu 14, 15 and 16. Also works in Debian 8 and Fedora 23.

      Like

  4. I thought you had finally solved my problems, I really miss Ubuntu, hate having to rely on Windows because of these issues but alas it didn’t work for me, followed all the steps, wifi has disappeared altogether and am getting the following if I try to change the antenna input:
    ~/rtlwifi_new-rock.new_btcoex$ sudo modprobe -v rtl8723be ant_sel=2
    insmod /lib/modules/3.19.0-42-generic/kernel/drivers/net/wireless/rtlwifi/btcoexist/btcoexist.ko
    modprobe: ERROR: could not insert ‘rtl8723be’: Invalid argument

    Liked by 1 person

    1. Okay the issue is with your kernel version, Install a 4.0+ kernel and follow the steps it will work fine.

      try $ sudo apt-cache search linux-image

      and install the latest kernel version and follow the steps, the GitHub part is really important.

      followed all the steps, wifi has disappeared altogether and am getting the following if I try to change the antenna input:

      reboot or type this command to fix this:

      $ sudo modprobe rtl8723be

      Like

  5. WOW, IT WORKED WELL.I have been facing wifi very weak signal and i am beginner to ubuntu ,struggling for installing drivers .This blog made it easy……..Thank You.

    Like

  6. Thanks a lot man, it worked like a charm!
    I had to follow until the very end, tho, I believe option fwlps=0 was key in my case.
    (Using Ubuntu 16.04 and Debian Jessie 8.5)

    Like

  7. Hi, Chirath! Thank you so much for this guide, it’s helped me twice now! I’m on Fedora 24 and I did updates recently, which I suppose over-wrote the driver. Is there any way to prevent this from happening? Thanks!

    Like

  8. The solution did not work for me at first but it was NOT ONLY the Realtek-driver BUT ALSO a wrongly loaded module for my laptop.
    I’m using an HP laptop model and “rfkill list wifi” showed two network interfaces where only was expected. It turned out, that the module “acer_wmi” (for the function keys) was loaded together with the right “hp_wmi”. Putting it in the blacklist solved the problem for me. (in addition to the steps above)

    # check state
    lsmod | egrep ‘acer|hp’
    # unload acer-module
    sudo modprobe -r acer_wmi
    # unload and reload right module (for testing)
    sudo modprobe -r hp_wmi
    sudo modprobe hp_wmi
    # if it works, blacklist it
    echo “blacklist acer_wmi” | sudo tee /etc/modprobe.d/blacklist-acer_wmi.conf

    Like

    1. YES! Very big thank you! 🙂 I don’t know what that module does, but it was getting in my way as well. I’m running much better without hp_wmi I also removed hp_wireless I’m going to continue testing with and without each module to see what works.

      Like

  9. Thanks, sorry for my bad English
    I use Ubuntu from version 8.04 dual boot with windows
    yesterday I bought a HP 250 notebook 4G WIFI realtek but did not work …
    Thanks to your explanations …. EVERYTHING WORKS AT 100% !!!!!!
    … But … it is IMPOSSIBLE for a USER MEDIUM understand how to use the commands in the terminal … This is in my opinion one of the greatest obstacles to the spread of LInux … the lack of drivers and terminal commands,
    You are a phenomenon thanks again
    Marini Giorgio italy

    Like

  10. i just installed fedora 25 on my laptop, having this rtl8723be issue. Follow your instruction, but failed to make, got this error message :

    make -C /lib/modules/4.8.10-300.fc25.x86_64/build M=/home/dwartad/rtlwifi_new-rock.new_btcoex modules
    make[1]: *** /lib/modules/4.8.10-300.fc25.x86_64/build: No such file or directory. Stop.
    Makefile:57: recipe for target ‘all’ failed
    make: *** [all] Error 2

    pls help, it seems that real success story on this issue only come from this blog.

    Like

    1. Hi dwartad,

      This is a simple issues, you can fix it by installing appropriate kernel-devel, kernel-headers and gcc packages. In your case you can use :

      $ sudo dnf install kernel-headers-4.8.10-300.fc25.x86_64

      $ sudo dnf install kernel-devel-4.8.10-300.fc25.x86_64

      Like

  11. thanks for the response, chirath. I’m totally new with linux, tried to install fedora on my laptop and love it, but still unsuccessful with this rtl8723be wifi network card issue.

    have tried install kernel headers, but failed :
    No package kernel-headers-4.8.10-300.fc25.x86_64 available.
    Error: Unable to find a match

    Like

    1. Okay, then you might be having a different kernel, try using uname command to find the current kernel version.

      $ uname -r

      Then find the corresponding kernel-header version using dnf search and install it using dnf install.

      $ dnf search kernel-headers

      Note : If the version of your kernel doesn’t match with the kernel-header, use dnf upgrade to update all the packages to the latest version(including the kernel). Then install the correct kernel-header. Feel free to reply if your are having any issues.

      Like

  12. Still unsuccessful… 😦

    [dwd@localhost rtlwifi_new-rock.new_btcoex]$ uname -r
    4.8.6-300.fc25.x86_64
    [dwd@localhost rtlwifi_new-rock.new_btcoex]$ dnf search kernel-headers
    Last metadata expiration check: 0:25:14 ago on Wed Dec 7 13:21:38 2016.
    ====================== N/S Matched: kernel-headers =======================
    kernel-headers.x86_64 : Header files for the Linux kernel for use by glibc
    [dwd@localhost rtlwifi_new-rock.new_btcoex]$ make
    make -C /lib/modules/4.8.6-300.fc25.x86_64/build M=/home/dwd/rtlwifi_new-rock.new_btcoex modules
    make[1]: *** /lib/modules/4.8.6-300.fc25.x86_64/build: No such file or directory. Stop.
    Makefile:57: recipe for target ‘all’ failed
    make: *** [all] Error 2
    [dwd@localhost rtlwifi_new-rock.new_btcoex]$

    had dnf upgrade as well..

    Highly appreciate your help, chirath.

    Like

  13. dwartad,

    Please do the following:
    ls /lib/modules
    ls -al !/lib/modules/4.8*

    show us the output of that command.

    Try to perform a dnf -y update and make sure to reboot the computer after the update. Linux needs to restart to apply the new kernel.

    Like

    1. Russel, Chirath.. thanks for your responses…
      I gave up with fedora, installed ubuntu instead, had the similar issue with this realtek wifi adapter, but managed to solve it using solution provided for ubuntu on this page.

      Like

  14. Also, I was having major issues with a realtek wifi adapter, and an Asus adapter… I had installed all the proper kernel modules, and could detect the devices when running $ lsusb

    But when I ran a modprobe command on the driver, I would get an error message:
    modprobe: ERROR: could not insert ‘rtl_kmod_name’: Required key not available.

    Disabling Secure Boot fixed the problem for me, I’m now connected using my realtek wifi adapter. Thanks for the help Chirath et al.

    Like

  15. Hi there. I’m on Ubuntu 16-04. Following steps 1-4, after running:
    sudo modprobe -v rtl8723be ant_sel=2
    … I can get a good connection trough anntena number 2. The problem is this setting doesn’t persist even after i put it into /etc/modprobe.d/rtl8723be.conf. After each reboot i have to reload the module with ant_sel option manualy. I’we spent hours trying to include this option in various places like /etc/modules but to no awail. Please help if you can.

    Like

  16. The below steps worked on my Hp245G5 laptop without any additional driver by creating the rtl8732be.conf file and adding few values.
    The file is located in /etc/modprobe.d/ folder
    Create or Edit the existing file by typing the below code in terminal
    sudo gedit /etc/modprobe.d/rtl8723be.conf
    Type your root password then copy and paste below given text
    options rtl8723be fwlps=N ips=N ant_sel=1
    Save the file & Reboot. Now you should have a proper working WIFI.
    Hope This helps all of you, This worked on my new HP245 G5 laptop with 16.04.1

    Thanks to all who have tried to post information to get this wifi device working.

    Like

  17. Hi, I tried running this solution on Kubunto 16.04, but when I got to
    sudo apt-get install rtlwifi-new-dkms linux-firmware
    I got an “E: Unable to locate package rtlwifi-new-dkms” message. Is there some reposotory I’m missing, or some other location I can look for it?

    Like

    1. I tried running that, then the other two commands you have listed in ‘Step one’, here’s the full output I got for the three commands, I’d appreciate any suggestions to fixing this:

      me@me-HP-Pavilion-Notebook:~$ sudo add-apt-repository ppa:hanipouspilot/rtlwifi
      [sudo] password for me:
      This is ppa for Realtek drivers from Larry Finger’s github.

      rtl8192eu is packaged from the Realtek site with some compat patches.
      More info: https://launchpad.net/~hanipouspilot/+archive/ubuntu/rtlwifi
      Press [ENTER] to continue or ctrl-c to cancel adding it

      gpg: keybox ‘/tmp/tmpauy7c6pk/pubring.gpg’ created
      gpg: /tmp/tmpauy7c6pk/trustdb.gpg: trustdb created
      gpg: key 7036069A2F22E44A: public key “Launchpad PPA for Pilot6” imported
      gpg: Total number processed: 1
      gpg: imported: 1
      OK
      me@me-HP-Pavilion-Notebook:~$ sudo apt-get update
      Get:1 http://security.ubuntu.com/ubuntu yakkety-security InRelease [102 kB]
      Ign:2 http://ppa.launchpad.net/hanipouspilot/rtlwifi/ubuntu yakkety InRelease
      Ign:3 http://ppa.launchpad.net/hanipouspilot/rtlwifi/ubuntu yakkety Release
      Get:4 http://security.ubuntu.com/ubuntu yakkety-security/main amd64 DEP-11 Metadata [8,272 B]
      Get:5 http://security.ubuntu.com/ubuntu yakkety-security/main DEP-11 64×64 Icons [10.0 kB]
      Get:6 http://security.ubuntu.com/ubuntu yakkety-security/universe amd64 DEP-11 Metadata [2,188 B]
      Get:7 http://security.ubuntu.com/ubuntu yakkety-security/multiverse amd64 DEP-11 Metadata [208 B]
      Hit:8 http://il.archive.ubuntu.com/ubuntu yakkety InRelease
      Get:9 http://il.archive.ubuntu.com/ubuntu yakkety-updates InRelease [102 kB]
      Ign:10 http://ppa.launchpad.net/hanipouspilot/rtlwifi/ubuntu yakkety/main i386 Packages
      Ign:11 http://ppa.launchpad.net/hanipouspilot/rtlwifi/ubuntu yakkety/main all Packages
      Get:12 http://il.archive.ubuntu.com/ubuntu yakkety-backports InRelease [102 kB]
      Ign:13 http://ppa.launchpad.net/hanipouspilot/rtlwifi/ubuntu yakkety/main amd64 Packages
      Ign:14 http://ppa.launchpad.net/hanipouspilot/rtlwifi/ubuntu yakkety/main Translation-en
      Get:15 http://il.archive.ubuntu.com/ubuntu yakkety-updates/main amd64 Packages [146 kB]
      Get:16 http://il.archive.ubuntu.com/ubuntu yakkety-updates/main i386 Packages [144 kB]
      Get:17 http://il.archive.ubuntu.com/ubuntu yakkety-updates/main Translation-en [65.5 kB]
      Get:18 http://il.archive.ubuntu.com/ubuntu yakkety-updates/main amd64 DEP-11 Metadata [111 kB]
      Get:19 http://il.archive.ubuntu.com/ubuntu yakkety-updates/main DEP-11 64×64 Icons [63.7 kB]
      Get:20 http://il.archive.ubuntu.com/ubuntu yakkety-updates/universe amd64 Packages [78.4 kB]
      Get:21 http://il.archive.ubuntu.com/ubuntu yakkety-updates/universe i386 Packages [76.0 kB]
      Get:22 http://il.archive.ubuntu.com/ubuntu yakkety-updates/universe Translation-en [42.9 kB]
      Get:23 http://il.archive.ubuntu.com/ubuntu yakkety-updates/universe amd64 DEP-11 Metadata [83.4 kB]
      Get:24 http://il.archive.ubuntu.com/ubuntu yakkety-updates/universe DEP-11 64×64 Icons [94.2 kB]
      Ign:25 http://ppa.launchpad.net/hanipouspilot/rtlwifi/ubuntu yakkety/main Translation-en_IL
      Get:26 http://il.archive.ubuntu.com/ubuntu yakkety-updates/multiverse amd64 DEP-11 Metadata [212 B]
      Get:27 http://il.archive.ubuntu.com/ubuntu yakkety-backports/main amd64 DEP-11 Metadata [208 B]
      Get:28 http://il.archive.ubuntu.com/ubuntu yakkety-backports/universe amd64 DEP-11 Metadata [212 B]
      Get:29 http://il.archive.ubuntu.com/ubuntu yakkety-backports/multiverse amd64 DEP-11 Metadata [216 B]
      Ign:30 http://ppa.launchpad.net/hanipouspilot/rtlwifi/ubuntu yakkety/main amd64 DEP-11 Metadata
      Ign:31 http://ppa.launchpad.net/hanipouspilot/rtlwifi/ubuntu yakkety/main all DEP-11 Metadata
      Ign:32 http://ppa.launchpad.net/hanipouspilot/rtlwifi/ubuntu yakkety/main DEP-11 64×64 Icons
      Ign:10 http://ppa.launchpad.net/hanipouspilot/rtlwifi/ubuntu yakkety/main i386 Packages
      Ign:11 http://ppa.launchpad.net/hanipouspilot/rtlwifi/ubuntu yakkety/main all Packages
      Ign:13 http://ppa.launchpad.net/hanipouspilot/rtlwifi/ubuntu yakkety/main amd64 Packages
      Ign:14 http://ppa.launchpad.net/hanipouspilot/rtlwifi/ubuntu yakkety/main Translation-en
      Ign:25 http://ppa.launchpad.net/hanipouspilot/rtlwifi/ubuntu yakkety/main Translation-en_IL
      Ign:30 http://ppa.launchpad.net/hanipouspilot/rtlwifi/ubuntu yakkety/main amd64 DEP-11 Metadata
      Ign:31 http://ppa.launchpad.net/hanipouspilot/rtlwifi/ubuntu yakkety/main all DEP-11 Metadata
      Ign:32 http://ppa.launchpad.net/hanipouspilot/rtlwifi/ubuntu yakkety/main DEP-11 64×64 Icons
      Ign:10 http://ppa.launchpad.net/hanipouspilot/rtlwifi/ubuntu yakkety/main i386 Packages
      Ign:11 http://ppa.launchpad.net/hanipouspilot/rtlwifi/ubuntu yakkety/main all Packages
      Ign:13 http://ppa.launchpad.net/hanipouspilot/rtlwifi/ubuntu yakkety/main amd64 Packages
      Ign:14 http://ppa.launchpad.net/hanipouspilot/rtlwifi/ubuntu yakkety/main Translation-en
      Ign:25 http://ppa.launchpad.net/hanipouspilot/rtlwifi/ubuntu yakkety/main Translation-en_IL
      Ign:30 http://ppa.launchpad.net/hanipouspilot/rtlwifi/ubuntu yakkety/main amd64 DEP-11 Metadata
      Ign:31 http://ppa.launchpad.net/hanipouspilot/rtlwifi/ubuntu yakkety/main all DEP-11 Metadata
      Ign:32 http://ppa.launchpad.net/hanipouspilot/rtlwifi/ubuntu yakkety/main DEP-11 64×64 Icons
      Ign:10 http://ppa.launchpad.net/hanipouspilot/rtlwifi/ubuntu yakkety/main i386 Packages
      Ign:11 http://ppa.launchpad.net/hanipouspilot/rtlwifi/ubuntu yakkety/main all Packages
      Ign:13 http://ppa.launchpad.net/hanipouspilot/rtlwifi/ubuntu yakkety/main amd64 Packages
      Ign:14 http://ppa.launchpad.net/hanipouspilot/rtlwifi/ubuntu yakkety/main Translation-en
      Ign:25 http://ppa.launchpad.net/hanipouspilot/rtlwifi/ubuntu yakkety/main Translation-en_IL
      Ign:30 http://ppa.launchpad.net/hanipouspilot/rtlwifi/ubuntu yakkety/main amd64 DEP-11 Metadata
      Ign:31 http://ppa.launchpad.net/hanipouspilot/rtlwifi/ubuntu yakkety/main all DEP-11 Metadata
      Ign:32 http://ppa.launchpad.net/hanipouspilot/rtlwifi/ubuntu yakkety/main DEP-11 64×64 Icons
      Ign:10 http://ppa.launchpad.net/hanipouspilot/rtlwifi/ubuntu yakkety/main i386 Packages
      Ign:11 http://ppa.launchpad.net/hanipouspilot/rtlwifi/ubuntu yakkety/main all Packages
      Ign:13 http://ppa.launchpad.net/hanipouspilot/rtlwifi/ubuntu yakkety/main amd64 Packages
      Ign:14 http://ppa.launchpad.net/hanipouspilot/rtlwifi/ubuntu yakkety/main Translation-en
      Ign:25 http://ppa.launchpad.net/hanipouspilot/rtlwifi/ubuntu yakkety/main Translation-en_IL
      Ign:30 http://ppa.launchpad.net/hanipouspilot/rtlwifi/ubuntu yakkety/main amd64 DEP-11 Metadata
      Ign:31 http://ppa.launchpad.net/hanipouspilot/rtlwifi/ubuntu yakkety/main all DEP-11 Metadata
      Ign:32 http://ppa.launchpad.net/hanipouspilot/rtlwifi/ubuntu yakkety/main DEP-11 64×64 Icons
      Err:10 http://ppa.launchpad.net/hanipouspilot/rtlwifi/ubuntu yakkety/main i386 Packages
      404 Not Found
      Ign:11 http://ppa.launchpad.net/hanipouspilot/rtlwifi/ubuntu yakkety/main all Packages
      Ign:13 http://ppa.launchpad.net/hanipouspilot/rtlwifi/ubuntu yakkety/main amd64 Packages
      Ign:14 http://ppa.launchpad.net/hanipouspilot/rtlwifi/ubuntu yakkety/main Translation-en
      Ign:25 http://ppa.launchpad.net/hanipouspilot/rtlwifi/ubuntu yakkety/main Translation-en_IL
      Ign:30 http://ppa.launchpad.net/hanipouspilot/rtlwifi/ubuntu yakkety/main amd64 DEP-11 Metadata
      Ign:31 http://ppa.launchpad.net/hanipouspilot/rtlwifi/ubuntu yakkety/main all DEP-11 Metadata
      Ign:32 http://ppa.launchpad.net/hanipouspilot/rtlwifi/ubuntu yakkety/main DEP-11 64×64 Icons
      Fetched 1,234 kB in 1min 7s (18.4 kB/s)
      Reading package lists… Done
      W: The repository ‘http://ppa.launchpad.net/hanipouspilot/rtlwifi/ubuntu yakkety Release’ does not have a Release file.
      N: Data from such a repository can’t be authenticated and is therefore potentially dangerous to use.
      N: See apt-secure(8) manpage for repository creation and user configuration details.
      E: Failed to fetch http://ppa.launchpad.net/hanipouspilot/rtlwifi/ubuntu/dists/yakkety/main/binary-i386/Packages 404 Not Found
      E: Some index files failed to download. They have been ignored, or old ones used instead.
      me@me-HP-Pavilion-Notebook:~$ sudo apt-get install rtlwifi-new-dkms linux-firmware
      Reading package lists… Done
      Building dependency tree
      Reading state information… Done
      E: Unable to locate package rtlwifi-new-dkms

      Like

      1. Hi Mickey,

        I see that you are using Ubuntu 16.10 and I guess those packages are not available yet. So try doing the 2nd step, I am not sure if it will work out.
        If you are not able to get it working maybe you can install Ubuntu 16.04 as it’s an LTS edition.

        Like

  18. “It’s not what you don’t know, it’s what you know that ain’t so”. How did I manage to switch from 16.04 to 16.10 without noticing??
    Thank you, I need to go reinstall my computer

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s