20

My Wi-Fi is constantly dropping out on both my laptop and desktop. This has occurred on both my home Wi-Fi and when setting up my phone as a hotspot. This 'dropout' still shows the Wi-Fi as connected. However, any network traffic (such as pinging a known IP) fails (EDIT: This was wrong, I couldn't replicate the failure to ping 8.8.8.8. Solution was a DNS issue). This seems to happen after using the internet for anywhere from 2-30 minutes. The only solution to fix this is a reboot, or restart the network manager:

sudo systemctl restart network-manager

I initially thought it was a problem with a wireless card on my Laptop (Dell XPS 13 9350). However, switching the issue persisted when switching to an intel Wi-Fi card and back again to the stock broadcom-based card. The issue is also present on my desktop although appears to happen less frequently (purely observational). Also, the frequency of dropouts seems to have increased since upgrading to 18.04 (again, purely observational and may not be so).

I do not know much about debugging this issue. However, looking at the Wi-Fi logs with:

sudo journalctl -fu NetworkManager

yields the following entry whenever there is a dropout:

May 06 20:17:48 my-laptop NetworkManager[13190]: <info> [1525601868.0127] connectivity: (wlp58s0) timed out

Any suggestions on how to debug this drop in network access?

4
  • Possible duplicate? askubuntu.com/questions/1030653/… Jul 13, 2019 at 22:34
  • 1
    Look at the logs! sudo journalctl -b 0 -u NetworkManager. Read man journalctl.
    – waltinator
    Jul 23, 2021 at 22:30
  • I've tried this, but I do not know what I am looking for. Jul 23, 2021 at 22:41
  • Follow the progress of Network Manager, step by step, and observe what it says it is doing. Carefully read each line. Understand the message - Is informative, does it describe unusual behavior, does the date/time correspond to an "event"?
    – waltinator
    Jul 23, 2021 at 23:30

8 Answers 8

22

Try disabling powersave for Wi-Fi. In /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf set:

wifi.powersave = 2
2
11

Take a look at this thread WiFi randomly disconnected on Ubuntu 18.04 LTS you may help you. If it doesn’t try using an Ethernet cable and seeing if it works. If your wifi is 5ghz and going through walls or other insulators it will be weaker than 2.4ghz would because it has smaller wave lengths. But this may not help you so if these fail wait for someone else to reply.

2
  • 2
    Thank you very much William Mac. Turns out it was a DNS issue, as I was unable to replicate failure to ping. Tried the steps outlined (editing /etc/resolve.conf) and it has been stable for a few hours now. Thanks so much, as this issue has been driving me mad recently.
    – Lobe
    May 7, 2018 at 0:35
  • 1
    Please provide context for the link, per these guidelines: meta.stackexchange.com/help/how-to-answer Jul 13, 2019 at 22:30
9

Your wireless may be dropping because of power management; that is, the feature where the card partially powers down to save battery power during periods of inactivity and then, ideally, powers back up seamlessly when activity resumes. Let's disable power saving to see if it helps. From the terminal:

sudo sed -i 's/3/2/' /etc/NetworkManager/conf.d/*

Your wireless may be dropping because the channel to which it was connected has suddenly changed.

Please check the settings in the router. WPA2-AES is preferred; not any WPA and WPA2 mixed mode and certainly not TKIP. Second, if your router is capable of N speeds, you may have better connectivity with a channel width of 20 MHz in the 2.4 GHz band instead of automatic 20/40 MHz, although it is likely to affect N speeds. I recommend a fixed channel, either 1, 6 or 11, rather than automatic channel selection. Also, be certain the router is not set to use N speeds only; auto B, G and N is preferred.

Your wireless may be dropping because there are two wireless access points with the same name and password. This is typical when you have a 2.4 gHz segment and a 5 gHz segment of the same router. Your wireless may be roaming, looking for a better connection. If this is the case, I suggest that you rename the access points; something like myrouter2.4 and myrouter5.

After making these changes, reboot the router.

Next, I recommend that your regulatory domain be set explicitly. Check yours:

sudo iw reg get

If you get 00, that is a one-size-maybe-fits-all setting. Find yours here: http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 Then set it temporarily:

sudo iw reg set IS

Of course, substitute your country code if not Iceland. Set it permanently:

sudo nano /etc/default/crda

Change the last line to read:

REGDOMAIN=IS

Proofread carefully, save and close the text editor.

Is there any improvement?

2
  • I've tried that, my REGDOMAIN has been equal to =US for two days. Still sporadic disconnections. Jul 24, 2021 at 0:37
  • My internet was constantly dropping. I had the same internet connection name for both frequencies. I've fixed the issue by giving a different name for each 2.4 and 5 gHz connections. Dec 24, 2021 at 11:23
2

I was having this problem and I think (no drops this morning in moderately heavy use over three hours) I have resolved it. After reviewing this and many other threads, I found that most of my settings were already correct, but made the following changes:

  1. Turned off autoconnect for the 2.4 GHz secondary connection (name was already different from the main 5.0 GHz connection)
  2. Changed REGDOMAIN to "US" for American code consistent with chili555's recommendation above (and with my location)
  3. Changed my modem/router's setting to 1492 (it had been set to 0, but with comment that 0 defaults to 1500), consistent with waltinator's comment above.

While I think 1. and 2. were mainly tidying that probably doesn't really affect things, I think 3. is probably what fixed things. This is based in broad degree on my experience that the Linux community is very good about tracking down and fixing problems with Linux, but a modem setting problem isn't really a problem with Linux.

For my modem/router -- a Motorola MG7540 -- this required going in a browser to the modem control page at http://192.168.0.1/, logging in, and opening the Advanced>Basic Router>Setup page. At the very bottom of that page under "WAN" is a box where "IPv4 MTU Size" can be set. As noted, I changed that from the default of 0 that really means 1500 to 1492, and the problem seems to be fixed.

Thanks to chili555 and waltinator and everyone else who commented on this issue here and elsewhere.

1
  • Thank you. I think that 1 was my issue with my Archer C7 router using SmartConnect as @Diogo Gomes mentioned.
    – imbr
    May 9, 2022 at 12:16
1

Your not going to believe this but, my WIFI disconnected all the time. I went to setting to change the screen time out. I changed that to NEVER. Not knowing what I was doing, I changed the Turn off WIFI to save power to OFF. Of course I lost the WIFI. I also turned Blutooth OFF. After I figured out the WIFI was disconnected, I went back to Settings and turn the Turn off WIFI to save power back to ON. Since that time I have been on the Internet for over 4 hours with no disconnection. Could the fix be that simple?

1

I have same problem, my wifi disconnect every 20-40sec after update to Ubuntu 22.04.

I check dmesg -w command and find error msg so it say me that problem in programming lvl, but not in network that i think first. It was repeated error about disconnect after 10ms.

I find this bug in kernel so if you have Network controller: Qualcomm Atheros AR93xx AR94xx try to update kernel to 5.17.5 or newer and it gone.

  • To check your network controller enter lspci command.
  • To ckeck your kernel enter uname -r

Hope it help someone with same problem

1

Probably not a common occurrence, but did not see this as an answer anywhere else.

It is possible that a "Route" got added to the IPv4 or IPv6 connection/setting. I used a program that added a route to my IPv4 and the wifi would connect, give me 30 seconds of internet, then disconnect and I had to manually reconnect.

  • Under Network Settings, click on your named wifi (connection name) and then click on the little settings icon at the bottom
  • Look at the resulting tabs, should be a IPv4 and IPv6 tab, click on each and look at "Routes" near the bottom (click on it if it is a button)
  • If there is a "Route" there, try deleting that Route for both the IPs... obviously if you set this up intentionally you should record these values so that you can re-add them later if needed.
1

Hi I was facing the same problem, and tried all the solutions.

I'm using a WDS bridge, and my wi-fi is satble with the original router, it's just disconnect with the repeater router.

I updated the router firmware and the problem was solved, i kept the solution about changing the power saving configuration

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .