Wifi Frequently Disconnecting (timeout)

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

sudo systemctl restart network-manager

I initially thought it was a problem with my wireless card in my laptop (Dell XPS 13 9350), however switching the issue persisted when switching to an intel wifi 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 wifi 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?


Solution 1:

Try disabling powersave for WIFI:

In: /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf set wifi.powersave = 2

Solution 2:

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.