Installing Realtek rtl8723be driver for Ubuntu, Debian or Fedora

Originally written by  Chirath R

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.
    • 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.(Note that the GitHub driver must be the master branch) or clone the driver by using the link https://github.com/lwfinger/rtlwifi_new.git
    • 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 🙂 .

36 thoughts on “Installing Realtek rtl8723be driver for Ubuntu, Debian or Fedora

  1. Sorry, when I type:

    $ sudo apt-get install linux-headers-$(uname -r) gcc g++ build-essential dkms git

    I receive the following message:

    E: Unable to locate package rtl8723be

    Please, can someone explain me what’s wrong?
    Many thanks in advance!

    Liked by 1 person

    1. make[1]: Entering directory ‘/usr/src/linux-headers-5.5.0-0.bpo.2-amd64’
      /bin/sh: 2: cannot create /home/mahmut/rtlwifi_new-rock.new_btcoex/btcoexist/modules.order: Permission denied
      make[4]: *** [/usr/src/linux-headers-5.5.0-0.bpo.2-common/scripts/Makefile.build:402: /home/mahmut/rtlwifi_new-rock.new_btcoex/btcoexist/modules.order] Error 2
      make[3]: *** [/usr/src/linux-headers-5.5.0-0.bpo.2-common/scripts/Makefile.build:508: /home/mahmut/rtlwifi_new-rock.new_btcoex/btcoexist] Error 2
      make[2]: *** [/usr/src/linux-headers-5.5.0-0.bpo.2-common/Makefile:1707: /home/mahmut/rtlwifi_new-rock.new_btcoex] Error 2
      make[1]: *** [/usr/src/linux-headers-5.5.0-0.bpo.2-common/Makefile:179: sub-make] Error 2
      make[1]: Leaving directory ‘/usr/src/linux-headers-5.5.0-0.bpo.2-amd64’
      make: *** [Makefile:57: all] Error 2
      help

      Like

  2. Hello, how do i get know which driver is installed? I am new at Linux specially a kernel modifications, but i do this:
    [eugenious@cumputer ~]$ modinfo rtl8723ae
    filename: /lib/modules/4.14.11-300.fc27.x86_64/kernel/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/rtl8723ae.ko.xz
    firmware: rtlwifi/rtl8723efw.bin
    description: Realtek 8723E 802.11n PCI wireless
    license: GPL
    author: Realtek WlanFAE
    author: lizhaoming
    alias: pci:v000010ECd00008723sv*sd*bc*sc*i*
    depends: rtlwifi,rtl8723-common,rtl_pci,btcoexist
    name: rtl8723ae
    vermagic: 4.14.11-300.fc27.x86_64 SMP mod_unload
    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)
    (int)

    It feels like still loaded default driver. At least on speedtest.net i am still getting like 20-30% of my real speed.
    (My Android phone getting 100% as i have in contract with my net provider)
    Also, my fedora ofc like 2-3 times a week getting new kernel update, and obliviously i have to reinstall this driver everytime. But i am ok.

    Liked by 1 person

  3. I’m unable to view any wifi networks when I restart my laptop. But I can view them when I enter these commands
    sudo modprobe -rv rtl8723be
    sudo modprobe -v rtl8723be ant_sel=2
    Should I execute these whenever I login? Is there any permanent solution?

    Liked by 1 person

  4. 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

    After this .
    There is have a ploblem. If update the kernel we must reinstall wifi driver like this.

    Do you konw about dkms? How to use dkms to Automatically rebuilds and installs rtl8723be on kernel updates.

    is it like this to do it? i am not very sure . can you help me?

    rtlwifi_new$ sudo modprobe -rfv rtl8723be
    rmmod rtl8723be
    rmmod rtl_pci
    rmmod rtl8723_common
    rmmod btcoexist
    rmmod rtlwifi
    rmmod mac80211
    rmmod cfg80211

    The driver source must be copied to /usr/src/rtlwifi_new
    Then add it to DKMS:
    $ sudo dkms add -m rtl8723be rtl_pci rtl8723_common btcoexist rtlwifi mac80211 cfg80211
    $ sudo dkms build -m rtl8723be rtl_pci rtl8723_common btcoexist rtlwifi mac80211 cfg80211
    $ sudo dkms install -m rtl8723be rtl_pci rtl8723_common btcoexist rtlwifi mac80211 cfg80211
    Check with:
    $ sudo dkms status
    Eventually remove from DKMS with:
    $ sudo dkms remove -m rtl8723be –all

    Like

  5. I have search this plan,and i try it.
    1 git clone -b extended https://github.com/lwfinger/rtlwifi_new.git

    2 sudo cp -R rtlwifi_new/ /usr/src/

    3 cmd@TR:/usr/src$ sudo dkms add ./rtlwifi_new

    Creating symlink /var/lib/dkms/rtlwifi-new/0.6/source ->
    /usr/src/rtlwifi-new-0.6

    DKMS: add completed.

    4 cmd@TR:/usr/src$ sudo dkms install rtlwifi-new/0.6

    5 cmd@TR:/usr/src$ sudo cp /usr/src/rtlwifi-new-0.6/firmware/rtlwifi/* /lib/firmware/rtlwifi/

    6 sudo depmod -a

    7 echo “options rtl8723be ips=0 fwlps=0” | sudo tee /etc/modprobe.d/rtl8723be.conf

    8 sudo modprobe -v rtl8723be fwlps=0 ips=0

    Like

  6. Im having some troubles with the make command:

    make[1]: *** /lib/modules/4.16.3-301.fc28.x86_64/build: No such file or directory. Stop.

    And when I checked, there was no build folder in there, even after reinstalling build essentials… what is happening? :c

    Like

  7. gracias, me sirvio perfectamente en deepin 15.9 para mi laptop hp modelo 11r015wm quedo full de señal solucion perfecta de wifi para deepin luego de haber intentado diferentes blogs y tutoriales de youtube

    Liked by 1 person

  8. I like the valuable info you provide in your articles.
    I’ll bookmark your weblog and check again here regularly. I am quite certain I will learn lots of new stuff
    right here! Best of luck for the next!

    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 )

Google photo

You are commenting using your Google 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 )

Connecting to %s