<SOLVED> WiFi won't connect or reconnect after standby

Questions about WIFI networks and devices
Forum rules
Before you post please read how to get help
Post Reply
mackinlay53
Level 1
Level 1
Posts: 8
Joined: Wed Nov 16, 2016 5:08 pm

<SOLVED> WiFi won't connect or reconnect after standby

Post by mackinlay53 »

Problem Solved:
I think I have found a solution for my problem, as disabling wifi power management seems like it has fixed the issue. I did this by changing the value from 3 (Enable) to 2 (Disable) in /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf.

Code: Select all

# File to be place under /etc/NetworkManager/conf.d
#
[connection]
# Values are 0 (use default), 1 (ignore/don't touch), 2 (disable) or 3 (enable).[connection]
wifi.powersave = 2
I have also found that with my new mesh router I can set the Network Connection for the SSID to select the Band to A ( 5GHz) to force a connection to the higher speed AP...at least it seems to be getting more reliable fast connections rather than a slower B/G (2.4GHz) Band on a more distant AP in my home mesh.

Thanks to all for your help!
...Patrick

-----------------------------------------------------------

Hi
I am running LM20 on a Lenovo Thinkpad, and it is a great experience....until I try to resume after standby and the WiFi will not automatically reconnect or manually connect. I can use the GUI to scan and see the available SSIDs, I can select either my primary and secondary connection and it goes off like it is connecting but then fails to connect.
  • Turning WiFi Off/On does not fix it
  • Using the laptop Fn-F5 key to disable WiFi and then enable does not fix the problem
  • Using the staus bar wifi GUI control for Network Connections I changed the Connection config to switch Band between Auto | A (5GHz) | B/G (2.4GHz), none of these Band options work. I believe this problem began when I upgraded my home Router to a TP-Link Deco M5 (x3) from a ASUS RT-AC68U. The new Router provides a single SSID for both A and B/G bands, and there are 3 mesh AP points, so I was suspecting that switching from one AP to another or switching between bands upon Resume from Standby may affect this problem. But so far setting the specific band does not fix the problem.

My only means to get back online is to reboot.

Does anyone have a suggestion on what else I can try to resolve this?

Thank you,
...Patrick

Code: Select all

patrick@Woody:~$ inxi -Fxz
System:    Kernel: 5.4.0-42-generic x86_64 bits: 64 compiler: gcc v: 9.3.0 Desktop: Cinnamon 4.6.6 
           Distro: Linux Mint 20 Ulyana base: Ubuntu 20.04 focal 
Machine:   Type: Laptop System: LENOVO product: 4242A68 v: ThinkPad T520 serial: <filter> 
           Mobo: LENOVO model: 4242A68 serial: <filter> UEFI [Legacy]: LENOVO v: 8AET64WW (1.44 ) date: 07/26/2013 
Battery:   ID-1: BAT0 charge: 28.6 Wh condition: 29.8/86.6 Wh (34%) model: SANYO 42T4799 status: Unknown 
           Device-1: hidpp_battery_0 model: Logitech MK700 charge: 70% (should be ignored) status: Discharging 
           Device-2: hidpp_battery_1 model: Logitech M705 charge: 85% status: Discharging 
CPU:       Topology: Dual Core model: Intel Core i5-2520M bits: 64 type: MT MCP arch: Sandy Bridge rev: 7 L2 cache: 3072 KiB 
           flags: avx lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 19934 
           Speed: 815 MHz min/max: 800/3200 MHz Core speeds (MHz): 1: 803 2: 806 3: 818 4: 819 
Graphics:  Device-1: Intel 2nd Generation Core Processor Family Integrated Graphics vendor: Lenovo driver: i915 v: kernel 
           bus ID: 00:02.0 
           Device-2: NVIDIA GF119M [Quadro NVS 4200M] vendor: Lenovo driver: nvidia v: 390.138 bus ID: 01:00.0 
           Display: x11 server: X.Org 1.20.8 driver: modesetting,nvidia unloaded: fbdev,nouveau,vesa 
           resolution: 1920x1080~60Hz 
           OpenGL: renderer: NVS 4200M/PCIe/SSE2 v: 4.6.0 NVIDIA 390.138 direct render: Yes 
Audio:     Device-1: Intel 6 Series/C200 Series Family High Definition Audio vendor: Lenovo ThinkPad T520 
           driver: snd_hda_intel v: kernel bus ID: 00:1b.0 
           Device-2: NVIDIA GF119 HDMI Audio vendor: Lenovo driver: snd_hda_intel v: kernel bus ID: 01:00.1 
           Sound Server: ALSA v: k5.4.0-42-generic 
Network:   Device-1: Intel 82579LM Gigabit Network vendor: Lenovo ThinkPad T520 driver: e1000e v: 3.2.6-k port: 6080 
           bus ID: 00:19.0 
           IF: enp0s25 state: down mac: <filter> 
           Device-2: Intel Centrino Advanced-N 6205 [Taylor Peak] driver: iwlwifi v: kernel port: 5000 bus ID: 03:00.0 
           IF: wlp3s0 state: up mac: <filter> 
Drives:    Local Storage: total: 476.94 GiB used: 97.39 GiB (20.4%) 
           ID-1: /dev/sda vendor: SanDisk model: SD7SB7S512G1122 size: 476.94 GiB 
Partition: ID-1: / size: 191.25 GiB used: 97.39 GiB (50.9%) fs: ext4 dev: /dev/sda6 
Sensors:   System Temperatures: cpu: 51.0 C mobo: N/A gpu: nvidia temp: 51 C 
           Fan Speeds (RPM): cpu: 1957 
Info:      Processes: 251 Uptime: 1h 50m Memory: 7.66 GiB used: 4.50 GiB (58.8%) Init: systemd runlevel: 5 Compilers: 
           gcc: 9.3.0 Shell: bash v: 5.0.17 inxi: 3.0.38 
patrick@Woody:~$ rfkill list
0: phy0: Wireless LAN
	Soft blocked: no
	Hard blocked: no
patrick@Woody:~$ mokutil --sb-state
bash: mokutil: command not found
patrick@Woody:~$ 

Last edited by mackinlay53 on Mon Aug 03, 2020 7:54 pm, edited 3 times in total.
mackinlay53
Level 1
Level 1
Posts: 8
Joined: Wed Nov 16, 2016 5:08 pm

Re: WiFi won't connect or reconnect after standby

Post by mackinlay53 »

Here is some added info on my system while I am connected:

Code: Select all

patrick@Woody:~$ ifconfig wlp3s0
wlp3s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.68.121  netmask 255.255.255.0  broadcast 192.168.68.255
        inet6 fe80::b565:4ead:790e:27f  prefixlen 64  scopeid 0x20<link>
        ether a0:88:b4:74:c1:50  txqueuelen 1000  (Ethernet)
        RX packets 139911  bytes 78107116 (78.1 MB)
        RX errors 0  dropped 1279  overruns 0  frame 0
        TX packets 75097  bytes 19800710 (19.8 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Code: Select all

patrick@Woody:~$ iwconfig wlp3s0
wlp3s0    IEEE 802.11  ESSID:"patrick"  
          Mode:Managed  Frequency:2.452 GHz  Access Point: B0:95:75:C0:DC:EA   
          Bit Rate=121.5 Mb/s   Tx-Power=15 dBm   
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Power Management:on
          Link Quality=53/70  Signal level=-57 dBm  
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:2557   Missed beacon:0
mackinlay53
Level 1
Level 1
Posts: 8
Joined: Wed Nov 16, 2016 5:08 pm

Re: WiFi won't connect or reconnect after standby

Post by mackinlay53 »

I set the Network Connection configuration for BSSID device in my router mesh with the strongest signal, and then rebooted.
It did not connect.

Code: Select all

patrick@Woody:~$ iwconfig 
lo        no wireless extensions.

enp0s25   no wireless extensions.

wlp3s0    IEEE 802.11  ESSID:off/any  
          Mode:Managed  Access Point: Not-Associated   Tx-Power=15 dBm   
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Power Management:on

Then I removed the BSSID from the config and it then connected okay with Auto Band selection.

Code: Select all

patrick@Woody:~$ iwconfig 
lo        no wireless extensions.

enp0s25   no wireless extensions.

wlp3s0    IEEE 802.11  ESSID:"patrick"  
          Mode:Managed  Frequency:2.452 GHz  Access Point: B0:95:75:C0:DC:EA   
          Bit Rate=54 Mb/s   Tx-Power=15 dBm   
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Power Management:on
          Link Quality=46/70  Signal level=-64 dBm  
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:98   Missed beacon:0

So I can connect after booting without specifying the BSSID or the Band specifics.
But after Standby / Resume it will not reconnect automatically or manually...only after rebooting.

Are there any suggestions on how I can fix this to automatically reconnect?

...Patrick
User avatar
BG405
Level 8
Level 8
Posts: 2415
Joined: Fri Mar 11, 2016 3:09 pm
Location: England

Re: WiFi won't connect or reconnect after standby

Post by BG405 »

mackinlay53 wrote:
Sun Aug 02, 2020 5:46 pm

Code: Select all

Power Management:on
This could be the issue. I'm no networking guru but what is the output of this command?:

Code: Select all

cat /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf
Dell Inspiron 1525 - LM17.3 CE 64-------------------Lenovo T440 8GB - Manjaro KDE with Mint VMs
Toshiba NB250 - Manjaro KDE------------------------K7S5A AMD 1.2GHz - LM17.3 Xfce 32 & WinXP-Pro
Acer Aspire E11 ES1-111M - LM18.2 KDE 64 ----Two ROMS don't make a WRITE ...
mackinlay53
Level 1
Level 1
Posts: 8
Joined: Wed Nov 16, 2016 5:08 pm

Re: WiFi won't connect or reconnect after standby

Post by mackinlay53 »

Hi BG405
Thanks for the idea, it returns 3...which I researched and means Enable wifi powersaving...if I am correct on that. ?? see https://gist.github.com/jcberthon/ea8cf ... 5344bc8b55

BTW, the laptop power is plugged in.

Code: Select all

patrick@Woody:~$ cat /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf
[connection]
wifi.powersave = 3
patrick@Woody:~$ 
I think I will change to 2 (Disable) and see if that helps.

Thank you,
...Patrick
User avatar
BG405
Level 8
Level 8
Posts: 2415
Joined: Fri Mar 11, 2016 3:09 pm
Location: England

Re: WiFi won't connect or reconnect after standby

Post by BG405 »

That's a useful resource, I didn't know what the values meant (never had an issue like this on my systems). Thanks for posting the link.

I've put the first entry here for easy reference:

Code: Select all

NetworkManager WiFi Power Saving

NetworkManager supports WiFi powersaving but the function is rather undocumented.

From the source code: wifi.powersave can have the following value:

    NM_SETTING_WIRELESS_POWERSAVE_DEFAULT (0): use the default value
    NM_SETTING_WIRELESS_POWERSAVE_IGNORE (1): don't touch existing setting
    NM_SETTING_WIRELESS_POWERSAVE_DISABLE (2): disable powersave
    NM_SETTING_WIRELESS_POWERSAVE_ENABLE (3): enable powersave

Then I propose 2 files, only one of them needs to be put under /etc/NetworkManager/conf.d/.
One is forcing to disable powersaving, while the other one enable it.

Once you have put the file in the right folder, simply restart NetworkManager:

sudo systemctl restart NetworkManager
(Looks better in code rather than quote, IMHO).

I don't think it makes any difference whether the machine is plugged in or not.
Dell Inspiron 1525 - LM17.3 CE 64-------------------Lenovo T440 8GB - Manjaro KDE with Mint VMs
Toshiba NB250 - Manjaro KDE------------------------K7S5A AMD 1.2GHz - LM17.3 Xfce 32 & WinXP-Pro
Acer Aspire E11 ES1-111M - LM18.2 KDE 64 ----Two ROMS don't make a WRITE ...
sleeper12
Level 14
Level 14
Posts: 5174
Joined: Thu May 25, 2017 3:22 pm

Re: WiFi won't connect or reconnect after standby

Post by sleeper12 »

Try #2.1 here to disable power management:
https://easylinuxtipsproject.blogspot.c ... html#ID2.1
mackinlay53
Level 1
Level 1
Posts: 8
Joined: Wed Nov 16, 2016 5:08 pm

Re: WiFi won't connect or reconnect after standby

Post by mackinlay53 »

Hi

I think I have found a solution for my problem, as disabling wifi power management seems like it has fixed the issue. I did this by changing the value from 3 (Enable) to 2 (Disable) in /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf.

Code: Select all

# File to be place under /etc/NetworkManager/conf.d
#
[connection]
# Values are 0 (use default), 1 (ignore/don't touch), 2 (disable) or 3 (enable).[connection]
wifi.powersave = 2
I have also found that with my new mesh router I can set the Network Connection for the SSID to select the Band to A ( 5GHz) to force a connection to the higher speed AP...at least it seems to be getting more reliable fast connections rather than a slower B/G (2.4GHz) Band on a more distant AP in my home mesh.

Thanks to all for your help!
...Patrick
Post Reply

Return to “Wireless”