How to solve Realtek RTL8723BE weak wifi signal problem in ubuntu

Realtek RTL8723BE is wireless network adapter. It will work well with windows but it will cause weak wifi signal problem in ubuntu based linux distributions. And the wifi is only works when you sit next to your modem. Realtek RTL8723BE wireless network adapter has problems in managing the antenna on Linux. This will lead the weak wifi signal problem.

Solution for Realtek RTL8723BE weak wifi signal in ubuntu:

Open your terminal.To open terminal click the Dash home from unity launcher.And type terminal in the search field.And click Terminal.


Type the below command in the terminal and hit enter.


Note down the wlp number. Here (in my case) its wlp13s0


Go to the below link and download the new driver zip file to desktop and unzip it to the desktop.

If you are getting any error during installation then Download driver from this link (Download this driver from master branch ).

download driver

In the terminal windows type the below code and press enter.

cd Desktop

Then type the below code and press enter.

cd rtlwifi_new-rock.new_btcoex

then type below command and enter.


If you are getting any error then Download driver from this link (Download this driver from master branch ). to desktop and unzip it to the desktop follow all steps. (Please check the Note No. 2 also )


Suggested Read:  How to install Plymouth themes in Ubuntu - Customize The Boot Splash Screen in Ubuntu


Type and enter

sudo make install

Type your ubuntu password.

then type below command and enter.

sudo modprobe -rv rtl8723be

Then type below line of code in your terminal and press the enter button.

sudo modprobe -v rtl8723be ant_sel=2


then type and enter.

sudo ip link set wlp13s0 up

Then type below command in terminal and enter.It will scan all networks with signal strength.

sudo iw dev wlp13s0 scan


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

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



Note No 1: After your OS (Kernel) update, you need to apply these settings again to get strong signal.

Note No 2: If you getting any error in the installation process after your OS UPGRADE (that is from 16.04 to 16.10 or 16.10 to 17.04), please follow the below steps.

After finding the wlp number. Download the below driver.

Download this driver from master branch

Save the zip file in your desktop and unzip it.

Then in the terminal windows type the below code and press enter.

cd Desktop

Then type the below code and press enter.

cd rtlwifi_new-master

Then follow all the above steps, starting from the below command.



You may also like...

146 Responses

  1. Randheer says:

    Hi @manikandan, it worked but after restarting the pc, I again get weak signal.

  2. Abhishik says:

    after restart the system same issue will facing

  3. Ritam Mallick says:

    Hi, thanks a lot for providing this solution.

  4. Randheer kumar says:

    Thanks a lot. It is really helpful,it works

  5. Shreyas says:

    Thank you very much! It worked like a charm.
    I would love to know about the internal details of how your API really works.
    Is there anyway i could get to read the overview of it’s functioning?

  6. xiaohan says:

    I get this:
    make -C /lib/modules/4.10.0-32-generic/build M=/home/xiaohan/rtlwifi_new-rock.new_btcoex modules
    make[1]: Entering directory ‘/usr/src/linux-headers-4.10.0-32-generic’
    CC [M] /home/xiaohan/rtlwifi_new-rock.new_btcoex/base.o
    In file included from /home/xiaohan/rtlwifi_new-rock.new_btcoex/base.c:26:0:
    /home/xiaohan/rtlwifi_new-rock.new_btcoex/wifi.h:43:2: error: #error “This branch is abandoned. Please do not use”
    #error “This branch is abandoned. Please do not use”
    scripts/ recipe for target ‘/home/xiaohan/rtlwifi_new-rock.new_btcoex/base.o’ failed
    make[2]: *** [/home/xiaohan/rtlwifi_new-rock.new_btcoex/base.o] Error 1
    Makefile:1524: recipe for target ‘_module_/home/xiaohan/rtlwifi_new-rock.new_btcoex’ failed
    make[1]: *** [_module_/home/xiaohan/rtlwifi_new-rock.new_btcoex] Error 2
    make[1]: Leaving directory ‘/usr/src/linux-headers-4.10.0-32-generic’
    Makefile:57: recipe for target ‘all’ failed
    make: *** [all] Error 2

  7. z says:

    thank you very much …. your post really helped me. I had this problem for so long and tried several solution and even installed two firmware but non of them wasn’t successful . thank you

  8. Pinaki says:

    I tried this command
    sudo modeprobe -v rtl8723be ant_sel=2
    But its showing
    sudo: modprobe: command not found
    What to do in this case ???? please help

  9. El Che says:

    WOR!!! 2 days traying other options, this is the better.
    My wifi is working with ubuntu 17.10…
    Thank you!

  10. Jaloliddin says:

    Great!! thank a lot! you made my day!

  11. Anand says:

    Thank you bro!! You are a life saver.!!
    tell me a way to make a donation.! if some day i have money i’ll definitely donate 😛

  12. Midhun Dev John Thattil says:

    Thanks bro thanks a lot …. I have been searching like hell to find a solution for that… 100% success….

  13. omkar gaonkar says:

    Thank you so much … Its work for me

  14. Arpit Batra says:

    insmod /lib/modules/4.10.0-38-generic/kernel/drivers/net/wireless/realtek/rtlwifi/rtlwifi.ko
    modprobe: ERROR: could not insert ‘rtl8723be’: Exec format error
    getting this reply after entering the command
    sudo modprobe -v rtl8723be ant_sel=2
    This problem emerged after I updated the system and tried to fix this problem

  15. Isra says:

    Any one has facing that on Windows reach 150 Mbps and on Linux just 72 Mbps?
    By the way, I’ve used current driver that is cimming on Ubuntu 17.10. Just have set the ant_sel=2.

  16. Ravi says:

    Thanks it works perfectly in Ubuntu 17.10. Thank you

  17. Salik Ullah says:

    Sir i have rtl8105e in my laptop how can i install? plz help….

  18. Perseus Kane says:

    When I try to run the make command, I get this
    make -C /lib/modules/4.13.0-16-lowlatency/build M=/home/d***/Desktop/rtlwifi_new-master modules
    make[1]: Entering directory ‘/usr/src/linux-headers-4.13.0-16-lowlatency’
    arch/x86/Makefile:153: CONFIG_X86_X32 enabled but no binutils support
    ./scripts/ line 25: gcc: command not found
    ./scripts/ line 26: gcc: command not found
    make[1]: gcc: Command not found
    make[1]: gcc: Command not found
    make[1]: gcc: Command not found
    make[1]: gcc: Command not found
    make[1]: gcc: Command not found
    CC [M] /home/d***/Desktop/rtlwifi_new-master/base.o
    /bin/sh: 1: gcc: not found
    scripts/ recipe for target ‘/home/d***/Desktop/rtlwifi_new-master/base.o’ failed
    make[2]: *** [/home/d***/Desktop/rtlwifi_new-master/base.o] Error 127
    Makefile:1546: recipe for target ‘_module_/home/d***/Desktop/rtlwifi_new-master’ failed
    make[1]: *** [_module_/home/d***/Desktop/rtlwifi_new-master] Error 2
    make[1]: Leaving directory ‘/usr/src/linux-headers-4.13.0-16-lowlatency’
    Makefile:58: recipe for target ‘all’ failed
    make: *** [all] Error 2

    Please help me out

  19. phigirl says:

    HI! i have problems with this part
    “sudo modprobe -v rtl8723be ant_sel=2” after i enter this code, it’s shows me
    “insmod /lib/modules/4.10.0-38-generic/kernel/drivers/net/wireless/realtek/rtlwifi/rtlwifi.ko
    modprobe: ERROR: could not insert ‘rtl8723be’: Required key not available”
    i don’t know what shlould i do now, because I
    have no wifi connection right now

  20. Pamela says:

    Hi! I tried this yeeterday and I make a mistake on my wlp.. Number, after that I cudnt conect on wifi so I installed again ubuntu but 15.04 and it worked perfectly except that I couldn’t upgraded it and again I installed Ubuntu 16.04, from this part was all perfect until i tried the code again and i hane no wifi conncetion and when i tried to reboot the Ubuntu shows me a black board with errors

  21. Rida says:

    Hi I tried this in the command line but the code returned error when I typed in sudo modprobe -v rtl8723be ant_sel=2. The system responded with a message saying that I do not have key or something like that and after that I lost the wireless option from my computer completely. I went from having wifi with poor signal to nothing at all and there’s no way that I can revert the changes. the rfkill list does not show the wireless option, only the bluetooth. Can you help me in any way?

    • Manikandan says:

      If you get any error like ” modprobe: ERROR: could not insert ‘rtl8723be’: Required key not available”
      Then Disable the secure boot from your BIOS setting. And try again.


    thanks yar. U saved me. No word to appreciate. You are just amazing

  23. Arpit Joshi says:

    Will this also work on ubuntu 17.10??

  24. Gineet Mehta says:

    Thank you so damn much! Worked like a charm, signal strength’s up to 100% next to router (from 50%).
    Will edit and update comment after I check going here and there a little.

  25. Hazael says:

    Worked perfectly! thank you very much!

  26. Eric says:

    Hello everyone. I’m having a problem with this. When I try to open a virtual terminal, it prints this message: “[ XXXX.XXXXXX] rtlwifi: IEEE80211_AMPDU_ERR!!!!:” where are number, differents each time. What could I do? It’s something recurrent, doesn’t stop, and does’not let me work on the virtual machines.

  27. Rahul says:

    Hi Manikandan,

    All the above steps were successfully executed except the last one for saving changes didn’t asked for my password..kindly help

  28. Jithin C Chacko says:

    Its worked for me

  29. Sushrut says:

    It worked for me 🙂 Thank you

  30. Sekhar says:

    Thanks Mani, i am facing new issue after installing in Ubuntu 16.04, the wi-fi suddenly stops and will not search/connect to any available SSID. i have to redo the process of installation of the steps mentioned by you and after two days same issue, this is happening with HP 245 G5 model laptop.

  31. mudit awasthi says:

    Thankyou so much 🙂

  32. Sarthak says:

    After entering sudo modprobe -rv rt18723be=> It shows
    modprobe: FATAL: Module rt18723be not found in directory /lib/modules/4.4.0-83-generic

    • Manikandan says:

      Please first read the comments also.
      it’s not rt18723be. It is rtl8723be. Its l (L) and not 1 (one).

      If you are still facing this issue, try sudo depmod -ae and then try again to sudo modprobe -rv rtl8723be

  33. Sushil says:

    Problem in last command:
    /Desktop/rtlwifi_new-master $ sudo iw dev wlp9s0f0 scan
    command failed: Network is down (-100)

  34. Harsh Makwana says:

    Wow! Great. It Works. Thanks for this kind of stuff.

  35. Piera Andrea Soto King says:

    thanks, the wifi it works on my laptop very well now!
    but I had a problem after this installation, my laptop started to discharge and the time that I can work with the battery is short compared with the time before that I installed it.

  36. Mahesh says:

    Thank u so much…..
    keep going.

  37. Girish says:

    it’s working amazing, wifi signal was very poor even i am siting around router, but after followed steps wifi signal is showing 100% in 8-10 feet radius.
    thank you for great article and open source.

    We have install ubuntu 16.04LTS in whole company system and notebooks, wifi poor signal was much disturbing, we have web&mobile development company, the problem was sucks, but everything is working well after followed above instructions

  38. Urvil says:

    it’s working
    thank you so much…

  39. Andy Hibbins says:

    Thanks very much for the solution. I have been trying to find a solution all day since installing Linux Mint on my HP Laptop.
    Wifi strength was around 45%, now it is over 80%. The laptop is in the exact same position a few metres away from the router.

  40. Ritesh Ghorse says:

    Thanks a lot, man. I was searching for a blog like this from a long time. Really Helpful.

  41. Tejas says:

    Bro this worked like a charm. Thank you so much!

  42. Moonen says:

    Hi, thanks a man. All steps worked great, except for the last one. I couldn’t save the settings, the terminal didn’t even ask for my password. Any advice?

  43. Stijn says:

    Hi,Thanks a lot. This works great.
    I went true all the steps and each worked perfectly, except for the last one. The settings are not saved, neither does the terminal ask for my password. Any advice?

  44. Promethevs says:

    hello great job but for me there is a problem. After the sudo ip link set wlp…… up it gives me “RTNETLINK answers: Input/ouput error”
    …any idea what this is for?

  45. Anuj G. Patil says:

    Great!!!!!!!!! Thank you so much Manikbhai!!!

  46. Sushil says:

    Thank you very much it solve my wifi problem.
    I’ve been searching for so long finally i got it from here.
    Thank you

  47. Athul Satheesh says:

    when i typed make and pressed enter this happened :
    make -C /lib/modules/4.10.0-22-generic/build M=/home/athul/Desktop/rtlwifi_new-master modules
    make[1]: *** /lib/modules/4.10.0-22-generic/build: No such file or directory. Stop.
    Makefile:58: recipe for target ‘all’ failed
    make: *** [all] Error 2

    its not working for me

  48. ahmed says:

    Thank you so much worked as a charm

  49. Tina says:

    Hi, when I give the command “sudo ip link set wlp13s0 up1”, it says ‘Cannot find device “wlp13s0” ‘. Can you please help?

  50. Tom says:

    Thanks a ton Mani !!!

  51. shubham juneja says:

    Thanks a ton. After wasting complete day, finally I found a solution

  52. Manu says:

    It says that that the key is not available. Error : Could not insert ‘rtl8723be’ required key not available

  53. Mahamat Ali Youssouf says:

    Thank’s a lot, I’ve been waiting for this long time. Thank’s man you save me.

  54. master says:

    will it work on ubuntu 17.04

  55. master says:

    will it also works with ubuntu 17.04.
    or the issue is fixed on it.

  56. Muhammed Yasin Özsaraç says:

    It works perfectly ! Thank you very much. I am considering to return Windows 10 because of this problem because in Windows 10, no problem about Wi-Fi at all. Thanks to your help bye bye Windows 🙂

  57. Nicolás says:

    3 Days looking for a solution, many thanks!

  58. Shankar K says:

    Fantastic Mani, worked like a charm (which is what if felt like when entering all those commands!), now the wifi is strong and picks up routers it did not earlier, my laptop is a HP 245 G5.

  59. Josh says:

    Thank you very much for your help, it fixed my problem!

  60. John S says:

    This absolutely fixed it on my HP Pavilion au62nr notebook with the rtl8723be. Before was getting very weak signal now its as good as it was in Windows 10.

  61. Sugato says:

    thank you very much …it is working really good

  62. Akash Sawant says:

    Thanks Manikandan , Bro you are super awesome i was trying multiple solution from last 2 days on my HP pavillion 15 , for Ubuntu 16.04 and RTL8723BE b/g/n but I was totally fed up. Afterthis I try your solution and its simple awesome its working fine……Ubuntu people sucks they need to take care about this bug……anyways Thanks man…..Lots of kisses from……

  63. Benoit says:

    Hi I’m new on Ubuntu. I try to do as it showed, everything’s working perfectly till I get this:

    benoit@benoit-HP-Notebook:~/Bureau/rtlwifi_new-rock.new_btcoex$ sudo modprobe -rv rtl8723be
    benoit@benoit-HP-Notebook:~/Bureau/rtlwifi_new-rock.new_btcoex$ sudo modprobe -v rtl8723be ant_sel=2
    insmod /lib/modules/4.4.0-64-generic/kernel/drivers/net/wireless/realtek/rtlwifi/rtlwifi.ko
    modprobe: ERROR: could not insert ‘rtl8723be’: Required key not available

    Any idea about the modprobe error?
    Thanks by advance

    • Manikandan says:

      Disable the secure boot from your BIOS setting. And try

      • Benoit says:

        Thanks a lot Manikandan. It’s work perfectly. As I told you, I’m new on Linux system and now I can say it’s true that Linux Community can help you when you’ve got problem, and I’m really happy to say that ant not coming back to Apple or worst windows!!!!!!!

  64. Mike says:

    Be sure to disable secure boot while you do this or you may encounter errors, you can use: sudo mokutil –disable-validation then reboot to finish disabling the secure boot

  65. nikhil says:

    me getting
    error at time of install
    error- install: missing file operand
    what should i do

  66. James says:

    This was outdated info before it was posted. No need for the rock new btcoex branch since Larry merged that with master branch in March 2016. Any distro that uses kernel 4.4 and newer already has the antenna parameter

    • John S says:

      Maybe in master branch but I was running current kernel and it wasn’t fixed. This is the only thing that fixed it. Maybe certain PC’s have a issue that only this solves?

  67. Anupam Wadhwa says:

    Salute you man…

  68. Nabeel says:

    I love you, it worked.

  69. Noor Jaber says:

    Thank you, it is working perfectly.

  70. Paul says:

    How do I do the same for OpenSUSE Leap 42.1?

  71. OB says:

    Thank you so much! I was seriously considering going back to windows since my wifi had a weak signal and kept disconnecting, but now its working as well as when I had windows installed. Works with antergos/arch also, just may need to download linux header files when using make command

  72. AleoOte says:

    You are the best!!!! Thanks a lot!!!

  73. Gambit says:

    God bless you.
    you saved my life.

  74. Kaushik L V says:

    Thank you so much!!!! I would have tried atleast 10 other solutions and spend hours and hours on this problem and finally your solution(and such a simple one) has solved it 🙂 🙂 Once again thanks a lot! 🙂

  75. Thanks Man… I have been trying to fix this for days now. Thanks a lot

  76. Mehul says:

    Thank you so much bro. Life saver seriously

  77. Kikerinkata says:

    Thank you

  78. kyle says:

    I have a RTL8101E network adapter on my new HP. Not seeing any files for this make, I went for it to see if the RTL8723be would work. After making it past the two “sudo modprobe” commands, I found that my network connection was terminated, and iwconfig listed no “wlo1” as it did before. Learning my lesson, how can I revert, or undo these changes? Thank you

  79. Archie says:

    This was a life saver.
    Thank you so much for sharing it.
    I wonder why they havent included it by default in the distro.
    Anyways, it works fine now just wanted to know if I can delete the folder from desktop?

    Can I now remove the folder from the desktop??

  80. jua ma says:

    Thanks a lot for your help
    Now, could you help me with the Realtek Realtek RTL2832P chip, that is inside a Astrometa DVB-T/T2 tuner? Some drivers are available online and it appears installed in Ubuntu but the device never works. (It is 0k because it works under windows).

    Thank you

  81. LS says:

    thanks… I have to change some things, but it works… 🙂

  82. Mark says:

    When I type in:

    sudo modprobe -rv rt18723be

    I get the following error:

    modprobe: FATAL: Module rt18723be not found.

    Any advice?

  83. Manish says:

    hi. could you please tell me how to install this drive on kde neon? please

  84. sanjeev says:

    I just got a new HP laptop with free dos OS, I had installed ubuntu 16.10, everything was fine but wifi had a weak signal problem. With your instructions, that problem solved too. thank you, you saved my time and effort. great job

  85. don dougall says:

    Update to previous post – the problem returned after a couple of reboots. Will look into kernel issues as mentioned to Ailien.

  86. don dougall says:

    Bless you my saviour. You have no idea how many days I spent trying to dual boot Mint 18 on an hp laptop when the wifi connection simply was erratic on MInt but fine on W10.

  87. rishabh says:

    hatsoff dude worked like a charm

  88. boopathi says:

    when i typed that cd rtlwifi… then enter it says no file or directory

  89. Allan says:

    Why has this driver not been rolled up into the distro?

  90. NOman Ansari says:

    thanks alot, it worked for me perfectly.

  91. Anvita says:

    Hey Manikandan! It worked perfectly for me. Thank you so much!
    I use Ubuntu 16.04 LTS on Lenovo Flex 2.

  92. Sudu says:

    That’s a really awesome fix..! Thanks a lot buddy..!!

  93. Robert says:

    Hello Manikandan, just wanted give you a big thank you for the instructions ! Everything works well now =)

  94. Life says:

    After trying this command,
    “sudo modprobe -rv rtl8723be”

    I get this..

    libkmod: ERROR ../libkmod/libkmod-config.c:635 kmod_config_parse: /etc/modprobe.d/rtlbetcoex.conf line 1: ignoring bad line starting with ‘options’

  95. Damien says:

    Thank you very much 🙂 recently set up a dual boot to do some work and really needed to be able to use this at school (which I couldn’t because of the very weak signal reception). This was a really really big help. I just applied this and will keep monitoring to see if it sticks but in either case: great and easy to follow guide!

  96. al says:

    Worked for me the firts time but after the reboot it stopped working… when i try tyo do it again it still dont work and my wifi conections aren’t working

  97. ladeb says:

    thanx man

  98. Thangasivam says:

    Nandri Manikandan. Helped a lot. Step by step procedure was awesome. A kubuntu user.

  99. AIlien says:

    When I type “make” in rtlwifi_new-rock.new_btcoex directory it returns the following error:

    error: initialization from incompatible pointer type [-Werror]
    .flush = rtl_op_flush,

    and then:
    error: (near initialization for ‘rtl_ops.flush’) [-Werror]

    So I can not continue with the whole process. My laptop is a HP 250 G4.

    Thanks anyway 🙂

  100. Mohit says:

    You ARE AWESOME!!!!!!!

  101. Vikas says:

    Thanks Manikandan, it really helped. But I faced prob;em again after the updates I had to repeat the above steps. Could you suggest a shortcut for that.

    • Swarnendu says:

      Having the same issue..did you find a solution ??

    • Nicolás says:

      As he said in the article: “After your OS (Kernel) update, you need to apply these settings again to get strong signal”

      Hope this gets fixed on future kernel updates :S

Leave a Reply

Your email address will not be published. Required fields are marked *