6

Everything was working fine until I upgraded my Ubuntu version to 16.04 recently.My wifi gets disconnected after every 10-20 mins. Sometimes it gets even worse and it gets disconnected in just 5 mins. I have read this another question in AskUbuntu and tried to implement what the OP accepted as the answer.

16.04 LTS wifi connection issues

Now what I have done till now is I got my wifi details using

sudo lshw -C network

And here is what I got

 *-network               
   description: Wireless interface
   product: AR9285 Wireless Network Adapter (PCI-Express)
   vendor: Qualcomm Atheros
   physical id: 0
   bus info: pci@0000:02:00.0
   logical name: wlo1
   version: 01
   serial: 78:e4:00:6f:e0:e6
   width: 64 bits
   clock: 33MHz
   capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
   configuration: broadcast=yes driver=ath9k driverversion=4.13.0-45-generic firmware=N/A ip=192.168.0.3 latency=0 link=yes multicast=yes wireless=IEEE 802.11
   resources: irq:16 memory:c3400000-c340ffff
 *-network
   description: Ethernet interface
   product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
   vendor: Realtek Semiconductor Co., Ltd.
   physical id: 0
   bus info: pci@0000:03:00.0
   logical name: enp3s0
   version: 03
   serial: c8:0a:a9:d2:bf:d3
   size: 10Mbit/s
   capacity: 1Gbit/s
   width: 64 bits
   clock: 33MHz
   capabilities: pm msi pciexpress msix vpd bus_master cap_list rom ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
   configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=half firmware=rtl_nic/rtl8168d-2.fw latency=0 link=no multicast=yes port=MII speed=10Mbit/s
   resources: irq:24 ioport:2000(size=256) memory:c1404000-c1404fff memory:c1400000-c1403fff memory:c2400000-c240ffff

The output for iwconfig is:

enp3s0 no wireless extensions.

lo no wireless extensions.

wlo1 IEEE 802.11 ESSID:"One Piece"
Frequency:2.472 GHz Access Point: 70:62:B8:8B:A9:6F
Bit Rate=6.5 Mb/s Tx-Power=15 dBm
Retry short limit:7 RTS thr:off Fragment thr:off Power Management:off Link Quality=42/70 Signal level=-68 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0 Tx excessive retries:1 Invalid misc:2293 Missed beacon:0

I also tried installing WICD and using it after removing all the configuration files of Network-Manager but it also loses connection after 20-30 mins and then gets worse by disconnecting randomly. Any solutions?

john400
  • 303
  • 2
    Please [edit] your question and copy-paste text instead of posting screenshots so the next user having the same problem as you can google search for the same output. :-) Also seems like you are on an old kernel for being on 16.04. What happens if you plug in an Ethernet cable and connect over a wired connection and perform a sudo apt update && sudo apt dist-upgrade ? – Fabby Jun 26 '18 at 21:33
  • @Fabby, I tried connecting it from Ethernet but it doesn't connect and shows Disconnected all the time. I also tried using WICD and removed network-manager but I don't know why it also gets disconnected randomly after 5-10 mins. Can you please help me, I don't want to do a fresh installation as I have many important softwares on this machine? – john400 Jun 27 '18 at 05:07
  • I'll have to call in someone who knows much more about WiFi connectivity than me if an Ethernet cable doesn't work neither... – Fabby Jun 27 '18 at 09:48
  • What are you running now? WICD or Network Manager? ps aux | grep -e network -e wicd – chili555 Jun 27 '18 at 13:04
  • 1
    Your link was missing in your question. I used google search to find what I think is the one you intended to use. Please click on the link now in your question and confirm it is the correct one. Also please update your question to include the output from iwconfig. – WinEunuuchs2Unix Jun 30 '18 at 15:59

1 Answers1

4

Sometimes, wireless gets disconnected because of settings in the router. First, most routers are set by default to the lowest common denominators including WPA and WPA2 auto-select, AES and TKIP auto-select and, worse of all, auto channel select. Here is a very interesting thread about auto channel select and why it doesn’t work at all well: https://superuser.com/questions/1311149/why-do-wifi-routers-do-such-a-bad-job-of-channel-selection

First, check the settings in the router. WPA2-AES is preferred; not any WPA and WPA2 mixed mode and certainly not TKIP. Second, if your router is capable of N speeds, you may have better connectivity with a channel width of 20 MHz in the 2.4 GHz band instead of automatic 20/40 MHz, although it is likely to affect N speeds. I also have better luck with a fixed channel, either 1, 6 or 11, rather than automatic channel selection. Also, be certain the router is not set to use N speeds only; auto B, G and N is preferred. After making these changes, reboot the router.

Next, I recommend that your regulatory domain be set explicitly. Check yours:

sudo iw reg get

If you get 00, that is a one-size-maybe-fits-all setting. Find yours here: http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 Then set it temporarily:

sudo iw reg set IS

Of course, substitute your country code if not Iceland. Set it permanently:

sudo nano /etc/default/crda

Change the last line to read:

REGDOMAIN=IS

Proofread carefully, save and close the text editor.

After rebooting the router and the computer, please tell us if there is any improvement.

chili555
  • 60,188
  • Actually I installed 18.04 just yesterday and I was again facing wifi problems in it's fresh installation also. As for router I changed the encryption to Wpa2-aes. Channel to 1 and bandwidth to 20M. Also I set the regulatory domain as you told. But still I am getting the error Connection failed on ubuntu 18.04 also. – john400 Jun 29 '18 at 04:37
  • Actually I think that there is no problem with my router settings because I am using my cellphone with that connection also. I thought if there is a bug in 16.04 it might have been fucked in 18.04 but I don't know what to do now. Will you please help me? I don't want to revert back to Windows after so much time. – john400 Jun 29 '18 at 04:42
  • Please run this terminal command: cat /var/log/syslog | grep -e wlo -e ath As the result will be lengthy, paste the result here and give us the link: http://paste.ubuntu.com – chili555 Jun 29 '18 at 15:52
  • This is the link https://paste.ubuntu.com/p/DWBXXjtkGf/ – john400 Jul 01 '18 at 08:03