2

During the startup a wifi connection is established and everything works fine.

After a while, the connection disappears suddenly.

To fix this i do, sudo service network-manager restart and then my connection is up. But the same problems happens after a while.

I am not sure what is the issue with the wifi-driver.

system info:

$ sudo lshw -C network
  *-network
       description: Wireless interface
       product: Wireless 3165
       vendor: Intel Corporation
       physical id: 0
       bus info: pci@0000:05:00.0
       logical name: wlp5s0
       version: 79
       serial: 08:d4:0c:ac:d0:6e
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
       configuration: broadcast=yes driver=iwlwifi driverversion=5.4.0-73-generic firmware=29.1654887522.0 ip=192.168.0.8 latency=0 link=yes multicast=yes wireless=IEEE 802.11
       resources: irq:136 memory:df200000-df201fff

$ uname -r
5.4.0-73-generic

$ cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04.2 LTS"

Also there is a question mark on the wifi icon. So, it more looks like a DNS issue. Also i noticed that sometimes a few sites open and sometimes none of the sites work.

This is really annoying problem and any fix is very appreciated.

There seems to be a similar issue here: Wireless connection fails every few minutes

But the accepted solution there does not work for me. The root cause could be different. Many places this issue is reported but never there had been a fully working solution. Hopefully we could fix it here!

6
  • journalctl from the time of the deauth will give you a reason id around the deauth event. What does it say? there's an issue with intel cards since kernel 5.1 concerning beacon loss and I think you're affected, but the log line would confirm
    – wbob
    Commented Jun 5, 2021 at 1:49
  • Thank you. I will take a look. I cannot see an option to reopen the question. The solution in the marked duplicate does not solve my issue..
    – Sandeep
    Commented Jun 7, 2021 at 1:23
  • Please run: sudo dmesg | grep -e iwl -e wlp and also: nmcli device wifi list As the output may lengthy, post the result here and give us the link: paste.ubuntu.com
    – chili555
    Commented Jun 7, 2021 at 14:19
  • @chili555 Sorry for the delay in my reply. Here is the output: paste.ubuntu.com/p/wP3Qz4GF5Q This is when everything is stable. When i see the issue again, i will see if the result is any different
    – Sandeep
    Commented Jun 11, 2021 at 14:33
  • @wbob The issue is reproduced again and here are the logs: paste.ubuntu.com/p/tCd3nrxhQd
    – Sandeep
    Commented Jun 11, 2021 at 17:48

2 Answers 2

0

Your wireless may be dropping because of power management; that is, the feature where the card partially powers down to save battery power during periods of inactivity and then, ideally, powers back up seamlessly when activity resumes. Let's disable power saving to see if it helps. From the terminal:

sudo sed -i 's/3/2/' /etc/NetworkManager/conf.d/*

Your wireless may be dropping because the channel to which it was connected has suddenly changed.

Please 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 recommend 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.

Your wireless may be dropping because there are two wireless access points with the same name and password. This is typical when you have a 2.4 gHz segment and a 5 gHz segment of the same router. Your wireless may be roaming, looking for a better connection. If this is the case, I suggest that you rename the access points; something like myrouter2.4 and myrouter5.

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.

Is there any improvement?

6
  • thank you for the comment. This is same as the answer in the linked question. Note that the connection is very stable when i use windows on the same laptop. so i don't think the router configuration is the issue here
    – Sandeep
    Commented Jun 11, 2021 at 17:43
  • paste.ubuntu.com/p/tCd3nrxhQd The issue is reproduced again. Above are the logs
    – Sandeep
    Commented Jun 11, 2021 at 17:49
  • Your logs clearly show that the issue is, no doubt, the router configuration, specifically the channel switches. Linux is not Windows; a great many things work perfectly well in one but not the other.
    – chili555
    Commented Jun 11, 2021 at 19:59
  • The AP names for 2.4/5 are different. Also, further to your comment, i disabled 5 HZ option from my router. Sadly the problem still happens. Can you please explain which part of my logs "clearly state" that the problem is in router configuration. If i have more clarity, i can try to see if i can fix it in any other way!
    – Sandeep
    Commented Jun 13, 2021 at 13:42
  • "AP f8:b7:97:2b:32:93 changed bandwidth, new config is 2452 MHz, width 2 (2442/0 MHz)" In other words, the channel changed. Again, please set a fixed channel and WPA2-AES only and not autoselect.
    – chili555
    Commented Jun 13, 2021 at 13:52
0
sudo vim /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf

Disable WiFi power management .

wifi.powersave = 2

sudo systemctl restart NetworkManager

You must log in to answer this question.

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