WiFi keeps dropping connections in Ubuntu 18.04

I don’t know if this happens a lot, but with Ubuntu 18.04 it’s annoying as hell. Turning on and off helps. Still annoying nonetheless.

I found that it turns out to be power management is a culprit. Try turn it off and see how it goes.

sudo iwconfig wlan0 power off

Verify the settings with iwconfig

wlx00c0ca95fb5b  IEEE 802.11  ESSID:"peanut"  
    Mode:Managed  Frequency:2.452 GHz  Access Point: xx:xx:xx:...   
    Bit Rate=65 Mb/s   Tx-Power=20 dBm   
    Retry short  long limit:2   RTS thr:off   Fragment thr:off
    Power Management:off
    Link Quality=70/70  Signal level=-29 dBm  
    Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
    Tx excessive retries:107  Invalid misc:3773   Missed beacon:0

If this works, then we can make it permanent by editing /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf

wifi.powersave = 2

powersave = 2 means off. :ok_hand: