WIFI Slow to re-connect on Resume from Suspend or Hiibernate

Questions about Wi-Fi and other network devices, file sharing, firewalls, connection sharing etc
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
royg

WIFI Slow to re-connect on Resume from Suspend or Hiibernate

Post by royg »

Linux Mint 18.1 Serena
Intel Corporation Wireless 7260 (rev 73)

My System 76 laptop is three years old and has been successfully running Linux Mint since I bought it. Commencing from when I did a fresh install of Linux Mint 18.1 Cinnamon, I have found that WIFI takes up to 30 seconds to connect after the laptop resumes from Suspend or Hibernate. However, on initial cold boot from switched off state, WIFI is connected and available immediately the desktop is displayed, a second or so after the login/password dialog box is completed.

When resuming from Suspend or Hibernate, what I see is the following sequence of events:
  1. Login completed and desktop is displayed in normal time (i.e. a second or so after Login/Password dialog box is completed);
  2. No WIFI;
  3. Click on Network Manager icon. WIFI is not enabled;
  4. Wait, watching Network Manager dialog box. WIFI enables automatically after about 15 seconds;
  5. Network Manager then takes about another ten seconds to find the only two WIFI access point that are in range;
  6. WIFI then connects.
I tried booting Linux Mint 18.1 from a Live USB, and had the same symptoms. I then tried booting from a Ubuntu 17.04 Live USB, and DID NOT have these problems with Network Manager.

Can anyone advise what is causing this issue? Is it a bug in 18.1 ? Is it a known problem.

Many thanks,

Roy Gilby
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
mideal
Level 3
Level 3
Posts: 120
Joined: Fri Jan 18, 2013 10:28 am
Location: Germany - Wilhelmshaven & Frankfurt
Contact:

Re: WIFI Slow to re-connect on Resume from Suspend or Hiibernate

Post by mideal »

I can only confirm this behaviour still exists even in 18.2 (cinnamon//64bit).
Additionally it's very annoying that there is no way to force the networkmanager to reconnect immediately.
Yoga 910 16GB/2TB running Mint 20.3 Cinnamon 64Bit
__________________________
…trust me - I’m the sunscreen.
User avatar
Pjotr
Level 24
Level 24
Posts: 20118
Joined: Mon Mar 07, 2011 10:18 am
Location: The Netherlands (Holland) 🇳🇱
Contact:

Re: WIFI Slow to re-connect on Resume from Suspend or Hiibernate

Post by Pjotr »

mideal wrote:I can only confirm this behaviour still exists even in 18.2 (cinnamon//64bit).
Additionally it's very annoying that there is no way to force the networkmanager to reconnect immediately.
Try the terminal:

1. Establish the logical name of your wifi chipset (for example: wlx6cfdb83af4d5) with:

Code: Select all

inxi -Nn
2. Then kick the lazy bugger back to work (example that uses the example name):

Code: Select all

sudo ifconfig -v wlx6cfdb83af4d5 up
Tip: 10 things to do after installing Linux Mint 21.3 Virginia
Keep your Linux Mint healthy: Avoid these 10 fatal mistakes
Twitter: twitter.com/easylinuxtips
All in all, horse sense simply makes sense.
magicchance

Re: WIFI Slow to re-connect on Resume from Suspend or Hiibernate

Post by magicchance »

Pjotr wrote:
mideal wrote:I can only confirm this behaviour still exists even in 18.2 (cinnamon//64bit).
Additionally it's very annoying that there is no way to force the networkmanager to reconnect immediately.
Try the terminal:

1. Establish the logical name of your wifi chipset (for example: wlx6cfdb83af4d5) with:

Code: Select all

inxi -Nn
2. Then kick the lazy bugger back to work (example that uses the example name):

Code: Select all

sudo ifconfig -v wlx6cfdb83af4d5 up
Pjotr, from the below example, which is the appropriate code snippet for kicking it back to work...?:

Code: Select all

Card-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
           driver: r8169
           IF: enp1s0 state: down mac: 28:d2:44:92:73:2f
           Card-2: Qualcomm Atheros QCA9565 / AR9565 Wireless Network Adapter
           driver: ath9k
           IF: wlp2s0 state: down mac: b8:ee:65:d6:b9:d9
           Card-3: Realtek RTL8812AU 802.11a/b/g/n/ac WLAN Adapter
           IF: null-if-id state: N/A mac: N/A
magicchance

Re: WIFI Slow to re-connect on Resume from Suspend or Hiibernate

Post by magicchance »

Pjotr wrote:
mideal wrote:I can only confirm this behaviour still exists even in 18.2 (cinnamon//64bit).
Additionally it's very annoying that there is no way to force the networkmanager to reconnect immediately.
Try the terminal:

1. Establish the logical name of your wifi chipset (for example: wlx6cfdb83af4d5) with:

Code: Select all

inxi -Nn
2. Then kick the lazy bugger back to work (example that uses the example name):

Code: Select all

sudo ifconfig -v wlx6cfdb83af4d5 up
Pjotr, from the below example, which is the appropriate code snippet for kicking it back to work...?:

Code: Select all

Card-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
           driver: r8169
           IF: enp1s0 state: down mac: 28:d2:44:92:73:2f
           Card-2: Qualcomm Atheros QCA9565 / AR9565 Wireless Network Adapter
           driver: ath9k
           IF: wlp2s0 state: down mac: b8:ee:65:d6:b9:d9
           Card-3: Realtek RTL8812AU 802.11a/b/g/n/ac WLAN Adapter
           IF: null-if-id state: N/A mac: N/A
User avatar
Pjotr
Level 24
Level 24
Posts: 20118
Joined: Mon Mar 07, 2011 10:18 am
Location: The Netherlands (Holland) 🇳🇱
Contact:

Re: WIFI Slow to re-connect on Resume from Suspend or Hiibernate

Post by Pjotr »

Try: wlp2s0
Tip: 10 things to do after installing Linux Mint 21.3 Virginia
Keep your Linux Mint healthy: Avoid these 10 fatal mistakes
Twitter: twitter.com/easylinuxtips
All in all, horse sense simply makes sense.
magicchance

Re: WIFI Slow to re-connect on Resume from Suspend or Hiibernate

Post by magicchance »

Pjotr wrote:Try: wlp2s0
What is supposed to happen then? (In my case, nothing happened and I had to reboot like always when the platform goes into suspend mode after a few minutes of inactivity.)
User avatar
Pjotr
Level 24
Level 24
Posts: 20118
Joined: Mon Mar 07, 2011 10:18 am
Location: The Netherlands (Holland) 🇳🇱
Contact:

Re: WIFI Slow to re-connect on Resume from Suspend or Hiibernate

Post by Pjotr »

magicchance wrote:
Pjotr wrote:Try: wlp2s0
What is supposed to happen then? (In my case, nothing happened and I had to reboot like always when the platform goes into suspend mode after a few minutes of inactivity.)
Just to make sure, this is of course what I meant:

Code: Select all

sudo ifconfig -v wlp2s0 up
Tip: 10 things to do after installing Linux Mint 21.3 Virginia
Keep your Linux Mint healthy: Avoid these 10 fatal mistakes
Twitter: twitter.com/easylinuxtips
All in all, horse sense simply makes sense.
magicchance

Re: WIFI Slow to re-connect on Resume from Suspend or Hiibernate

Post by magicchance »

Pjotr wrote:
magicchance wrote:
Pjotr wrote:Try: wlp2s0
What is supposed to happen then? (In my case, nothing happened and I had to reboot like always when the platform goes into suspend mode after a few minutes of inactivity.)
Just to make sure, this is of course what I meant:

Code: Select all

sudo ifconfig -v wlp2s0 up
I understand. That's what I did. The actual result was to remove the "Disconnect" option for the Realtek inside the WIFI tray, and to give the illusion that it is working/always On, but in reality it does not enhance the reception at all. In fact, my WIFI signal is now defaulting to my much weaker internal WIFI and ignoring the much stronger 5G Realtek signal altogether.

(Interesting side note on the Sonya OS: I just tried to make a Printscreen grab in order to show you my WIFI tray for the above problem, and Sonya does not allow me to make one with an open WIFI tray - only once it is closed again.)
User avatar
Pjotr
Level 24
Level 24
Posts: 20118
Joined: Mon Mar 07, 2011 10:18 am
Location: The Netherlands (Holland) 🇳🇱
Contact:

Re: WIFI Slow to re-connect on Resume from Suspend or Hiibernate

Post by Pjotr »

magicchance wrote:in reality it does not enhance the reception at all. In fact, my WIFI signal is now defaulting to my much weaker internal WIFI and ignoring the much stronger 5G Realtek signal altogether.
It only kicks the wifi chipset back to work when down (i.e. turned off); it doesn't improve reception. Two entirely different things.
Tip: 10 things to do after installing Linux Mint 21.3 Virginia
Keep your Linux Mint healthy: Avoid these 10 fatal mistakes
Twitter: twitter.com/easylinuxtips
All in all, horse sense simply makes sense.
magicchance

Re: WIFI Slow to re-connect on Resume from Suspend or Hiibernate

Post by magicchance »

Pjotr wrote:
magicchance wrote:in reality it does not enhance the reception at all. In fact, my WIFI signal is now defaulting to my much weaker internal WIFI and ignoring the much stronger 5G Realtek signal altogether.
It only kicks the wifi chipset back to work when down (i.e. turned off); it doesn't improve reception. Two entirely different things.
Wrong choice of words then on my part. What I am seeing, is 2 systems competing with each other for dominance. And the weaker system is winning. What I would prefer, is a situation where I was able to turn off the Qualcomm Altheros (the built in system) and rely on the Realtek (the auxiliary system.) To make matters worse, is that Sonya has a tendency to kick off when you stop typing or moving the mouse for maybe 5 minutes, forcing you to reboot since a WIFI right-click forced reconnect takes 3 times longer than a reboot, or it won't reconnect at all even if you try waiting it out. Which is what the thread OP was seeing as well, and my reason for posting to this thread too. But there are a couple different issues which seem to overlap with the OP, all having to do with the general working condition of the WIFI tray.
Minterator

Re: WIFI Slow to re-connect on Resume from Suspend or Hiibernate

Post by Minterator »

On my hardware, LM18.2 also connects much slower than LM17.3, even the panel network animation in 18.2 gets permanently stuck in "connecting..." even after it has connected.

You should have waited for LM19 or LM20 :idea:

Also, LM18.2 takes 10+ seconds to suspend, whereas LM17.3 suspends instantly, but there's a fix for that: viewtopic.php?f=90&t=235251&p=1349780#p1349780
magicchance

Re: WIFI Slow to re-connect on Resume from Suspend or Hiibernate

Post by magicchance »

Minterator wrote:On my hardware, LM18.2 also connects much slower than LM17.3, even the panel network animation in 18.2 gets permanently stuck in "connecting..." even after it has connected.

You should have waited for LM19 or LM20 :idea:

Also, LM18.2 takes 10+ seconds to suspend, whereas LM17.3 suspends instantly, but there's a fix for that: viewtopic.php?f=90&t=235251&p=1349780#p1349780
My issue is not with me wanting to suspend operations. My issue, is that I prefer to keep my laptop and WIFI up and running 24/7, but with Sonya this is not possible (yet). Still hoping for a fix. The last distro worked great for me in this regard. But Sonya kicks the WIFI off any time you leave the computer unattended for maybe 5 minutes or so. The only step after that is to try and force a WIFI reconnect, which always takes WAYYYY too long. So then a full reboot is the only option left, with the WIFI connecting on start-up. With the last distro I had to do this maybe 3 times a week. I am doing it 15 times a day with Sonya.
Minterator

Re: WIFI Slow to re-connect on Resume from Suspend or Hiibernate

Post by Minterator »

magicchance wrote:
Minterator wrote:On my hardware, LM18.2 also connects much slower than LM17.3, even the panel network animation in 18.2 gets permanently stuck in "connecting..." even after it has connected.

You should have waited for LM19 or LM20 :idea:

Also, LM18.2 takes 10+ seconds to suspend, whereas LM17.3 suspends instantly, but there's a fix for that: viewtopic.php?f=90&t=235251&p=1349780#p1349780
My issue is not with me wanting to suspend operations. My issue, is that I prefer to keep my laptop and WIFI up and running 24/7, but with Sonya this is not possible (yet). Still hoping for a fix. The last distro worked great for me in this regard. But Sonya kicks the WIFI off any time you leave the computer unattended for maybe 5 minutes or so. The only step after that is to try and force a WIFI reconnect, which always takes WAYYYY too long. So then a full reboot is the only option left, with the WIFI connecting on start-up. With the last distro I had to do this maybe 3 times a week. I am doing it 15 times a day with Sonya.

Disconnects may be due to wifi power-saving mode or interference from nearby devices.

I wrote a script that will detect disconnected wifi and will reconnect it automatically. I can post it if you're interested.
magicchance

Re: WIFI Slow to re-connect on Resume from Suspend or Hiibernate

Post by magicchance »

Minterator wrote:Disconnects may be due to wifi power-saving mode or interference from nearby devices.

I wrote a script that will detect disconnected wifi and will reconnect it automatically. I can post it if you're interested.
Already fixed the potential power-saving bug with a script from another thread. Disconnect/time outs only happen when User action is paused. Would be willing to see what your script looks like if it helps to keep the wifi running full time.

Also, I have 2 wifi signals incoming: the built in and the 5G auxiliary. I need to be able to single out which one I want to augment with the script, or even both at the same time.
Last edited by magicchance on Sat Sep 16, 2017 10:44 pm, edited 1 time in total.
magicchance

Re: WIFI Slow to re-connect on Resume from Suspend or Hiibernate

Post by magicchance »

Pjotr wrote:Just to make sure, this is of course what I meant:

Code: Select all

sudo ifconfig -v wlp2s0 up
Pjotr, this command isn't helping, and may actually be slowing my machine down. I've been having extra trouble with my Realtek side ever since using it. Please tell me how to reverse it so I can compare and see. Thanks!
User avatar
Pjotr
Level 24
Level 24
Posts: 20118
Joined: Mon Mar 07, 2011 10:18 am
Location: The Netherlands (Holland) 🇳🇱
Contact:

Re: WIFI Slow to re-connect on Resume from Suspend or Hiibernate

Post by Pjotr »

magicchance wrote:Please tell me how to reverse it so I can compare and see.
Reboot.
Tip: 10 things to do after installing Linux Mint 21.3 Virginia
Keep your Linux Mint healthy: Avoid these 10 fatal mistakes
Twitter: twitter.com/easylinuxtips
All in all, horse sense simply makes sense.
Minterator

Re: WIFI Slow to re-connect on Resume from Suspend or Hiibernate

Post by Minterator »

magicchance wrote:
Minterator wrote:Disconnects may be due to wifi power-saving mode or interference from nearby devices.

I wrote a script that will detect disconnected wifi and will reconnect it automatically. I can post it if you're interested.
Already fixed the potential power-saving bug with a script from another thread. Disconnect/time outs only happen when User action is paused. Would be willing to see what your script looks like if it helps to keep the wifi running full time.

Also, I have 2 wifi signals incoming: the built in and the 5G auxiliary. I need to be able to single out which one I want to augment with the script, or even both at the same time.

I've never heard of inactivity timeout for wifi, it's supposed to stay up all the time. I'd download Atheros firmware, load a newer kernel and try one piece of wifi hardware at a time. If you have another wireless device nearby, such as a cellphone/tablet sitting next to the machine, I'd try moving it to prevent interference.

If all else fails, my script will automatically reconnect your wifi if it stops. Script is intended for people that use their PC as a TV replacement. If the video stream stops, it will reload the browser page and reconnect wifi if necessary. Script will create a settings file the first time you run it, open .ini file and change “Mozilla” to “xMozilla” to disable page reloading. For LM 18.x comment out lines 60 & 61, and un-comment lines 62 & 63

Start script in Terminal, it will run in the background indefinitely until you stop it by pressing Ctrl+C, or closing the terminal, or rebooting. Download here: https://www.dropbox.com/s/sv89w57pic1qy ... e.sh?raw=1


.
mideal
Level 3
Level 3
Posts: 120
Joined: Fri Jan 18, 2013 10:28 am
Location: Germany - Wilhelmshaven & Frankfurt
Contact:

Re: WIFI Slow to re-connect on Resume from Suspend or Hiibernate

Post by mideal »

magicchance wrote:(Interesting side note on the Sonya OS: I just tried to make a Printscreen grab in order to show you my WIFI tray for the above problem, and Sonya does not allow me to make one with an open WIFI tray - only once it is closed again.)
Pretty much off topic, but you can configure the screenshot function (in my config via task bar icon, maybe an applet/plugin for cinnemon) to copy the screen after n seconds.
Yoga 910 16GB/2TB running Mint 20.3 Cinnamon 64Bit
__________________________
…trust me - I’m the sunscreen.
mideal
Level 3
Level 3
Posts: 120
Joined: Fri Jan 18, 2013 10:28 am
Location: Germany - Wilhelmshaven & Frankfurt
Contact:

Re: WIFI Slow to re-connect on Resume from Suspend or Hiibernate

Post by mideal »

Pjotr wrote:
mideal wrote:I can only confirm this behaviour still exists even in 18.2 (cinnamon//64bit).
Additionally it's very annoying that there is no way to force the networkmanager to reconnect immediately.
Try the terminal:

1. Establish the logical name of your wifi chipset (for example: wlx6cfdb83af4d5) with:

Code: Select all

inxi -Nn
2. Then kick the lazy bugger back to work (example that uses the example name):

Code: Select all

sudo ifconfig -v wlx6cfdb83af4d5 up
As I can start/stop any connection without enhanced permissions there should be another solution without any password entries necessary.
WHY does it take so long to detect a new WIFI?
Example: sitting in a train using the public WIFI til there is no internet connection, starting my mobile hotspot, waiting for ~1 min til it is found
even when switching WIFI off/on several times. That's annoying especially if the network coverage is intermittent.
Yoga 910 16GB/2TB running Mint 20.3 Cinnamon 64Bit
__________________________
…trust me - I’m the sunscreen.
Locked

Return to “Networking”