116

I installed Ubuntu 18.04 LTS in this week and now I have a problem with wifi connection. The WiFi connection auto disconnected every 5 - 10 minutes but wifi signal is still fine.
I did a search, found some answers for older versions of Ubuntu and tried it but the problem was not resolved.
Here is my wireless adapter information:

description: Wireless interface
       product: QCA9565 / AR9565 Wireless Network Adapter
       vendor: Qualcomm Atheros
       physical id: 0
       bus info: pci@0000:02:00.0
       logical name: wlp2s0
       version: 01
       serial: a4:db:30:03:32:8c
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress bus_master cap_list rom ethernet physical wireless
       configuration: broadcast=yes driver=ath9k driverversion=4.15.0-20-generic firmware=N/A ip=10.0.138.105 latency=0 link=yes multicast=yes wireless=IEEE 802.11
       resources: irq:18 memory:f0600000-f067ffff memory:f0680000-f068ffff

8 Answers8

84

Try disabling wifi power management by opening /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf and changing

wifi.powersave = 3

to

wifi.powersave = 2

Do not set it to 0, which is the default value. From nm-setting-wireless.h:

/**
 * NMSettingWirelessPowersave:
 * @NM_SETTING_WIRELESS_POWERSAVE_DEFAULT: use the default value
 * @NM_SETTING_WIRELESS_POWERSAVE_IGNORE: don't touch existing setting
 * @NM_SETTING_WIRELESS_POWERSAVE_DISABLE: disable powersave
 * @NM_SETTING_WIRELESS_POWERSAVE_ENABLE: enable powersave
 *
 * These flags indicate whether wireless powersave must be enabled.
 **/
typedef enum {
    NM_SETTING_WIRELESS_POWERSAVE_DEFAULT       = 0,
    NM_SETTING_WIRELESS_POWERSAVE_IGNORE        = 1,
    NM_SETTING_WIRELESS_POWERSAVE_DISABLE       = 2,
    NM_SETTING_WIRELESS_POWERSAVE_ENABLE        = 3,
    _NM_SETTING_WIRELESS_POWERSAVE_NUM, /*< skip >*/
    NM_SETTING_WIRELESS_POWERSAVE_LAST          =  _NM_SETTING_WIRELESS_POWERSAVE_NUM - 1, /*< skip >*/
} NMSettingWirelessPowersave;
Sahin
  • 250
qwr
  • 2,969
15

You could try to turn OFF IPV6 in the settings for your connection between your computer and the router. Sometimes there is a problem in Ubuntu, with IPV6 - and most old routers still use IPV4. This worked for me on my old Pocket wifi(the new one don't have problem). Since you have not specified excactly which version of 18.04 you are using I can't guide you more.

I have Xubuntu 16.04, and I would go to network connection in the notification, then open Edit connections, find the connection to the router and edit it. Set IPV6 to Ignore. After this it never dropped the connection.

11

This is what stopped my wifi to get unstable, disconnecting all the time, although my wifi is Centrino (not Atheros): disabling IPV6.

Add the following lines to the file /etc/sysctl.conf

net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1

Then run to reload the settings:

sudo sysctl -p    
desgua
  • 33,215
7

I was having the same issue with bionic. First i thought it was related with Qualcomm Atheros QCA6174 802.11ac Wireless Network Adapter, but even after updating it the signal continued to fluctuate.

It appears to be related to gnome's network manager. After switching to WICD, the wi fi hasn't been unstable anymore (that was almost 4 months ago). [EDIT: Still no issues as of today 05/28/2019] Here are a few steps to apply this fix:

Open up a Terminal and execute the following commands:

First, install WICD:

 sudo apt install wicd-gtk

Next, we uninstall NetworkManager:

sudo apt remove network-manager-gnome network-manager

After everything is confirmed to be working (best to check this after rebooting), you can remove config files for NetworkManager:

sudo dpkg --purge network-manager-gnome network-manager

(source https://help.ubuntu.com/community/WICD )

6

In furtherance to DESGUA's answer, I changed /etc/dhcp/dhclient.conf. More specifically, I deleted line 18:

dhcp6.name-servers, dhcp6.domain-search, dhcp6.fqdn, dhcp6.sntp-servers,

I eventually disconnected wifi and reconnected.

My Lenovo T460p laptop running Ubuntu 18.04 no longer randomly disconnects from wifi. It seems (the implementation of) IPv6 is the culprit.

dzmanto
  • 371
3

In my case changing the router frequency from 5 GHz to 2.4 GHz solved the problem to a great extent.

3

My setup might be a bit different, but maybe my answer helps too...

My setup is as follows:

laptop <-> wifi (bridge mode) <-> router <-> internet
  • Laptop is Ubuntu 18.04.2.
  • WiFi bridge is a TP-Link TL-WR940N.
  • Router is an Arris 703A.

I had the same issue of connection dropping from time to time. I believe it was happening because all services are running in the Arris router and the connection between the TP-Link and the Arris suffer with oscillations, so everything connected to the TP-Link "thinks" there is no network connection, so the connection is dropped.

The only thing that worked for me to keep the connection more stable was setting up static IP address, gateway and DNS servers, instead of using DHCP.

I still get oscillations, but at least wifi doesn't drop; just takes a bit longer sometimes to complete the requests.

Well, that's a very simple answer, but hope it can help someone out there.

3

I had the same issue for a long time (Ubuntu 18.04, 19.04 and also 20.04) and none of the solutions from above worked properly for me; the answer here worked ok, but running on 2.4GHz instead of 5 GHz gave performance issues.

What seems to have worked is to switch off the automatic choice of the channel, but set it to manual for the 2.4 GHz option in my router settings (and use auto for the 5GHz option):

enter image description here

I did this a couple of days ago and have not had any issues since then: 5GHz is used for all my devices, performance is excellent and I have not seen any drops anymore (hopefully it remains like this after posting this answer here ;-) ).

Cleb
  • 293