Ubuntu – Randomly slow wifi connection on Ubuntu 16.04


I know many other posts have been made about having slow wifi on Ubuntu 16.04, but I have yet to find a fix that actually works for me.

I recently setup Ubuntu 16.04 to run on my Lenovo PC alongside Windows 10.
I haven't had any other issues, but from the beginning I noticed that sometimes my internet will work fine, but occasionally it will become extremely slow and sometimes just time out and not load any pages (gives me a "no internet" error in chromium.

This is very odd because my wifi works perfectly on Windows 10, and on my other devices. It also shows a perfectly fine connection on the top right corner where it shows signal strength.

tldr; wifi will work normally for a bit, but randomly become extremely slow/time out.

My network information:

       description: Wireless interface
       product: RTL8821AE 802.11ac PCIe Wireless Network Adapter
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 0
       bus info: pci@0000:04:00.0
       logical name: wlp4s0
       version: 00
       serial: c8:ff:28:80:43:ab
       width: 64 bits
       clock: 33MHz

my iwconfig results (i put censored to hide my last name in wifi ssid):

wlp4s0    IEEE 802.11  ESSID:"censored_5G"  
          Mode:Managed  Frequency:5.22 GHz  Access Point: 10:86:8C:70:6D:F1   
          Bit Rate=200 Mb/s   Tx-Power=17 dBm   
          Retry short limit:7   RTS thr=2347 B   Fragment thr:off
          Power Management:off
          Link Quality=48/70  Signal level=-62 dBm  
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:48   Missed beacon:0

enp1s0    no wireless extensions.

lo        no wireless extensions.

Best Answer

I had regular lag-spikes (3000-4000ms) about every minute because NetworkManager kept actively looking for other Networks in the area, though i was connected. It did not really break the connection but was really annoying in some cases.

My solution was to use wicd as an alternative to the default NetworkManager.

First i uninstalled NetworkManager, but after a while i had to install it again(profiles with passwords+connection via umts modem) and they both seem to run fine in parallel, when NetworkManager is told not to automatically connect to the specific network.