I have a brand new hp laptop and i installed ubuntu 16.04.I am facing problem with wifi connection. Same wifi connection works fine on my mac book air. I have even resolved ipv6 problem as mentioned in many answers. I seriously don't know how to approach to this problem. Can someone please help?



What wireless adapter are you using?

Check by running the following command


And check for the Wireless Adapter.

In case, you are using RTL8732BE as your Wireless Network Adapter, then try the following command

sudo tee /etc/modprobe.d/rtl8723be.conf <<< "options rtl8723be ant_sel=1"

And restart the system.

If that didn't work, try the following command

sudo tee /etc/modprobe.d/rtl8723be.conf <<< "options rtl8723be ant_sel=2"

Restart again.

I hope this solves your problem.


Folks, I struggled with this problem with my HP Laptop for about a year. Now it is fixed. This was further complicated because mine was a dual boot and required secure mode booting. This process below is for the case that you have the same rtl8723be PCI wifi adaptor. So here is what worked:

  1. Try the last steps i.e., configure the existing wifi driver and reboot, before you try anything else. If it works then you are done. This is the same suggestion as one of the responders earlier on this thread.
  2. GET READY TO SIGN MODULES: This is only needed if we are on a secure mode boot PC and we want to keep it that way(as in my case). Follow the complete top part of the instructions to sign modules available in https://insights.ubuntu.com/2017/08/11/how-to-sign-things-for-secure-boot . Assume now the resultant MOK.der and MOK.priv files are in a directory called ~/openssl .

    • Download from here: https://github.com/lwfinger/rtlwifi_new . At this point, if you have disabled secure boot mode, then be happy and say make install as mentioned in those instructions and go to the ACTIVATE MODULES step, else do as below
    • make all (not install) in the drivers directory
    • Sign the built modules now:

      for i in $(find . -name '*.ko') ; do kmodsign sha512 ~/openssl/MOK.priv ~/openssl/MOK.der $i done

    • sudo make install This installs the signed modules in the right place in the filesystem.

    sudo modprobe -r rtl8723be ; sudo modprobe rtl8723be

    Note: This modprobe failed early on for me as my PC was secure boot mode, hence requiring all the module signing steps I added above.

  5. ADD CONFIGURATION INFO: I found that this needed to be added to the config file and rebooted before it worked (see Unable to connect wifi ubuntu 14.04 LTS HP Pavilion Network driver rtl8723be )

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

  6. REBOOT: I found that I needed a reboot before it all worked; yours may work without rebooting.

Hoping this works for you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.