114

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
9
  • You can get more information by running journalctl --follow in a terminal window. Then, when your WiFi drops, look at the messages.
    – waltinator
    Commented May 1, 2018 at 15:42
  • @waltinator What does that command do? Commented May 1, 2018 at 15:45
  • Read man journalctl. The --follow option is documented asShow only the most recent journal entries, and continuously print new entries as they are appended to the journal
    – waltinator
    Commented May 1, 2018 at 15:49
  • 1
    Which suggestions did you try that did not work? Were there any error messages you received that you can include in your question?
    – Hee Jin
    Commented May 1, 2018 at 16:05
  • @Emily The first option I tried is to install resolvconf package, add nameserver 8.8.8.8 to /etc/resolvconf/resolv.conf.d/tail file and regenerate /etc/resolv.conf file using sudo resolvconf -u command. The second one is to edit /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf file and change wifi.powersave = 3 to wifi.powersave = 0. Commented May 2, 2018 at 2:20

8 Answers 8

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;
13
  • 7
    I had the same issue with a Realtek WiFi AC1200 USB and the internal that is. Broad... . Tried the power configuration and the IPv6 disabled. None worked. Finally setting an static IPv4 to the laptop works. Hope this option help someone.
    – Sposmen
    Commented Oct 13, 2018 at 11:43
  • 1
    @Sposmen I've also tried all that and yet the connection kept dropping every 10m or so. Which ubuntu you did this successfully? Was it 18.04? As qwr said,I also suggest to add this as an answer. Commented Nov 27, 2018 at 22:33
  • 1
    This solved my problem a few months back with Ubuntu v16.04. However, the problem has returned with v18.04.1.
    – josephwb
    Commented Nov 29, 2018 at 10:53
  • 13
    Does not fix the issue for me on Ubuntu 18.04.2 LTS, unfortunately.
    – Cleb
    Commented May 25, 2019 at 11:33
  • 3
    Disabling the power saving worked for me. Damn if it has a problem then maybe they should not enable the power saving by default.
    – vishal
    Commented Aug 14, 2020 at 11:35
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.

2
  • Disabling ipv6 did the job for me. Thanks. Commented Jul 13, 2019 at 23:36
  • I ran into this by accident when I discovered that my ping to google.com (an IPv6 address) was failing but existing ipv4 connections were still working. DNS was using IPv6 so all new connections would fail. The really WEIRD thing is, earlier today it got into a state where even a power off and back on didn't fix it, and I had to reset the ROUTER even though several other devices could still see the internet just fine.
    – Michael
    Commented May 19, 2020 at 4:44
9

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    
4
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 )

7
  • 1
    It seems good, but it does not has any shortcut or icon on the top menu!
    – SaidbakR
    Commented Oct 28, 2018 at 16:49
  • 1
    Yeah, it doesn't quite switch network manager's icon/reference and it also doesn't create a new one for it. But at least you get a stable connection, and you can access WICD through gnome overview/applications almost as quickly. Commented Nov 3, 2018 at 4:18
  • Great solution, worked for me. Commented May 14, 2019 at 11:34
  • 1
    Working on Ubuntu 18.04.2 LTS, this has made it even worse, unfortunately. After calling sudo apt remove network-manager-gnome network-manager, WICD did not detect a single Wifi network anymore; also the settings button was gone. I could recover the settings part using sudo apt install gnome-control-center and then also reinstalled the network-manager, but now also this one does not detect networks anymore. So, make sure you also have a lan connection, otherwise you'll be in trouble :)
    – Cleb
    Commented May 25, 2019 at 14:55
  • After removing network-manager the wifi settings section on ubuntu settings doesn't work, because it uses network-manager for it so it's to be expected. As for wicd, you can check if the network interface is configured correctly (for bionic it should be wlp3s0) or if the issue is related to the WPA Supplicant (In a certain occasion I had an issue like that, and I managed to fix it by selecting nl80211 as the supplicant -- but after an update i switched back to wext and the issue seemed to be resolved). Commented May 28, 2019 at 8:10
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.

1
  • 1
    This together with DESGUA's answer worked for me. Just setting wifi.powersave = 2 didn't have any effect.
    – Leo
    Commented Sep 14, 2020 at 7:49
3

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

6
  • how to change frequency? any reason why it works? Commented Feb 11, 2019 at 4:34
  • You can change the frequency on the web page of router. You can find it written on the router or in the docs that come with router. I do not know the reason why it woked on my machine :( Commented Feb 11, 2019 at 5:34
  • Most routers today offer a 2.4 interface along side the 5 GHz, so technically you don't actually need to alter the 5G interface. Commented May 15, 2019 at 14:21
  • This "can" work because 2.4GHz passes through walls/barriers better than 5GHz because those numbers represent oscillations per second. Think of it as 2.4GHz has about half of the wiggly-ness (waves) in travelling across any medium as 5GHz, which translates to less opportunities for obstruction/deflection, linearly-speaking. But 2.4GHz is often much more crowded, with there only being three standard, friendlier bands available, 1, 6 and 11. Advantages of 5GHz, though, are higher capacity data rates (therefore less transmit time/interference) by virtue of the extra wiggly-ness, and many bands.
    – Hypocritus
    Commented Mar 17, 2020 at 22:33
  • My router has 'SmartSteering' so I set my laptop's MAC to only use 2.4Ghz. My wifi strength then jumped from 1/3 to 2/3. I previously had this problem with another laptop too (Linux). Thx.
    – Peter L
    Commented Mar 28, 2020 at 17:41
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 ;-) ).

3
  • Thanks. I have the same router and indeed manual channel setting helps, although does not fix the problem completely - disconnects are now more rare and shorter, but still exist.
    – katafrakt
    Commented Jul 30, 2020 at 22:52
  • Turning off the 802.11b/g/n (default) mode in my router and switching 802.11b/g did the trick for me.
    – SanD
    Commented Dec 13, 2020 at 15:02
  • Can you show me where that option is available in WiFi settings? Some brief steps? Can't figure out from your answer or the reference.
    – ARK
    Commented May 21, 2021 at 14:36

You must log in to answer this question.

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