I just recently installed Ubuntu 20.04 (clean install, dual boot from windows) and the wifi keeps dropping out. It was previously stable under windows and from other computers in the house so I don't believe it's an issue with the router or the actual internet connection.
I tried reinstalling the broadcom drivers according to Installing Broadcom Wireless Drivers which recommended the bcmwl-kernel-source drivers but that hasn't helped resolve the issue.
I'm still quite new to the linux game so if someone would be able to have a look at the wireless diagnostic scripted linked: https://paste.ubuntu.com/p/R4PMFVTvDT/
Thank you so much for you help!
I was in a similar situation since two weeks and I found a solution yesterday (11th May) which is working so far (dual boot Ubuntu 20.04 / Windows, wireless card Broadcom 4325).
Surprisingly, my issue was not due to wireless driver or power management (tried many things in previous days, no improvement) but related to the ARP entry of my computer expiring on my local router (ARP stands for Address Resolution Protocol, it makes translation beetween IP addresses and MAC addresses).
To make it short (investigation details at the end of this answer) :
=> A solution appeared, I had to tell my computer to do the same ! (send ARP request)
Implementation of the solution
To send an ARP request, I used arping that you can install from its package :
When you launch it, it says that it must run as root or with the cap_net_raw capability. Since I didn't wanted to launch it as root, I added the capability :
I used the following command to send one ARP Request to my router (replace the IP address with the one relevant for you) :
Then I wanted this command to run every 15 minutes to refresh the ARP entry regularly. This is done by editing the file /etc/crontab :
And adding this line at then end of the file :
That will make the ARP request sent every 15 minutes.
Detailed investigation process
Here are more details on how I discovered the issue :
Finally, I don't know why I never faced this issue when using Windows. When checking the ARP table I see the entry becoms expired as well but then immediately get resetted to 20 minutes and I cannot see a network disconnection.
You may also wonder how to check the ARP table. If you are using a pfSense router, it can be found in the submenu "Diagnostics > Table ARP" (to be translated in English, my menus are in French). With another device, you will have to check its documentation.
But at the end, event if you can't check the ARP table you can still try to insert the line in /etc/crontab and run it for a couple of hours/days. If your problem doesn't reappear then it was the issue :-)
Hope this helps !
I had the same issue. After a little google search, I found a few answers after checking
dmesg
. So, after running:I found this message error:
I found the meaning of the error in Linux WiFi: Deauthenticated Reason Codes:
After identifying the error, I need to understand why my old MacBook White was getting a kick from my AP (the connection was online, but no packets in/out).
Well, the error shows me enough to understand the issue. The error is about an authentication error with Access Point, after that, I understand that my AP was "kicking" my connection and denying the packets from the Wi-Fi interface.
So, let's try something.
Maybe if I stop the automatic channel/frequency change the issue is over... After changing my AP configuration to the static channel (36) and frequency to (80Mhz) the Wi-Fi interface stop drop and the issue is over (so far so good), so no more instability with Wi-Fi connection using Broadcom (BCM4321).
What did I understand about the error?
I guess the firmware has some code issue with the authentication after auto-negotiate the channel and frequency, the firmware send the authentication request before the connection really finishes the "handshake" with the AP.
I hope this "workaround" helps you with the issue.
By checking your log it is recommended to disable power management for wifi as wl/b43 driver have described here then edit:
/etc/NetworkManager/conf.d/default-wifi-powersave-on.conf
[EDIT] it appers, that in my case after further testing that changinf this parameter made the sitation worse as the wifi is bouncing more and more due to repeated wifi scan ... So if you have a problem, don't use this. (you might not have the problem though if you are using
wl
driver. I'm usingb43
in my case.)I also get the same issue,
To fix, i reload the wireless kernel module
I took the top answer and comment and improved it by moving the router's IP lookup into a script run by cron. This way the solution will work even if you use multiple different wifi networks.
Put the following into a script (i.e.
/home/<username>/bin/arping-router.bash
):This will also log the even to syslog, so you can confirm it is running.
You also need to do the following:
I ran into the same issue. I tried most of those complicated solutions, which didn't work. after some hours of debugging, in my case it was caused by a single SSID/network for both 5 GHz and 2.47 GHz, the Ubuntu driver just couldn't handle it properly.
You can try going to your router's IP (usually printed on the label), and changing each one of them to another SSID and channel.
Changing SSID and channel depends on the router's manufacturer, but here is an example how-to for a NOKIA router: How to enable separate SSIDs for 5GHz and 2.4GHz.
I have had the same issue. I have a broadcom 4313 wireless card that drops connection when it was basically downloading large files for long periods of time.
So far this resolved my issue:
https://help.ubuntu.com/community/WifiDocs/Driver/bcm43xx
If you need a quick guide, I recommend fixing it via removing all the drivers first using the command name
sudo modprobe -r drivernamegoeshere
then adding them back in one at a time to see if what works.To get the list of drivers.
lsmod | grep cfg80211
then remove each one and add one of them back in (start with b43) withsudo modprobe b43
. So far, this is working out for me.I'm using Ubuntu 20.04 at this time. Due to some issues, I use usb wifi adapter which is https://www.tp-link.com/us/home-networking/usb-adapter/tl-wn823n/.
Since I dual-boot from Windows and this wifi adapter works normally in there, I expect that this could also works in Ubuntu (not to mention that the website said it is "compatiable" to linux); however, my connection is so unstabled that it disconnect regularly. After doing A LOT of research and experiments including building backport-iwlwifi and kernel library, changing setting of wifi-power etc, these methods didn't really fix my issues.
It comes out that the real problem occurs on the KM driver of my chipset, which is RTL8xxxu. You could check your KM driver by
and see the configurations. After following procedures on https://www.ravendevelopers.com/blog/2020/09/installing-wireless-usb-linux-rtl8xxxu-chipset , my connection suddenly recovered and being so stable. So if methods mentioned above don't solve your problem, maybe you could install another driver and replace the default one.
Got into the same issue. It seems to me related to wifi-power-save-on feature. If I turn it off, the Wi-Fi interface goes to airplane mode, which means no Wi-Fi at all... NICE.
So, the simplest and stupidest solution was to run the endless ping to the router in background. This is enough to make the Wi-Fi alive.