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?
2 Answers
What wireless adapter are you using?
Check by running the following command
lspci
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.
-
RTL8723BE PCIe Wireless Network Adapter this is the wireless adaptor . – Nidhi Agarwal Aug 26 '17 at 10:59
-
Did you try the commands? – Shane John Paul Aug 26 '17 at 11:03
-
yes i tried second one. It did not help. Now speed is slower than before. – Nidhi Agarwal Aug 26 '17 at 11:05
-
Try the first one, it worked for me! – Shane John Paul Aug 26 '17 at 11:05
-
I had the same problem in my HP laptop – Shane John Paul Aug 26 '17 at 11:06
-
yes it works. Is it permanent or i have to do it with every restart? And Can you please explain little bit about this command, What it does. – Nidhi Agarwal Aug 26 '17 at 11:09
-
No, it's permanent! – Shane John Paul Aug 26 '17 at 11:10
-
Ubuntu doesn't know which antenna to choose, hence the problem. This is mostly faced by this particular adapter RTL8723BE – Shane John Paul Aug 26 '17 at 11:12
-
Had the same issue for wireless adapter RTL8821AE and the first command did the trick for me, ty! – alsami Apr 26 '18 at 09:52
-
Hi @L.ShaneJohnPaulNewton I am again facing problem with the internet. Now it is working but very slow and for a very short range near the router. It was troubling a lot so i reinstalled ubuntu to 18.04. It is still the same. Can you please help me with this ? – Nidhi Agarwal Sep 18 '18 at 12:55
-
@NidhiAgarwal Did you try the commands again? – Shane John Paul Sep 20 '18 at 10:22
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:
- 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.
- 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 .
GET, BUILD AND INSTALL THE RIGHT DRIVER:
- 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.
- Download from here:
https://github.com/lwfinger/rtlwifi_new . At this point, if you have disabled secure boot mode, then be happy and say
ACTIVATE MODULES:
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.
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
- REBOOT: I found that I needed a reboot before it all worked; yours may work without rebooting.
Hoping this works for you.

- 1