Wifi connection failure after Hibernate or reboot

Hello,
I have a strange problem with my wifi connection. After each time my laptop goes to sleep or reboot, it seems to be stuck in “connecting” until failure. I have to disable/enable wifi every time and select manually my router. I tired deleting resolv.conf but the problem remains.
It used to work fine and I don’t know really how it started.
I’m using the last Tumbleweed Gnome.

Any help would be appreciated. Thank you very much :slight_smile: !

I’ve read of a few other similar reports impacting some TW users.

  1. Are you using NetworkManager? If so, does restarting NetworkManager after resume do the trick? That can be done with
sudo systemctl restart NetworkManager
  1. Upon resume, what is reported by the following commands?
nmcli g
nmcli d
/usr/sbin/iwconfig
  1. If you unload and reload your wireless driver, does that bring back the wifi operation?
modprobe -r ......
modprobe ......

A similar thread (without resolution yet)…
https://forums.opensuse.org/showthread.php/525578-No-Wifi-networks-after-hibernation

Yes I’m using NetworkManager and yes restaring it using this command does the trick since it takes along time in state “connecting”. But I just noticed that, if I wait enough until it fails to connect, I can connect manually by choosing my network (without the need to restart the NetworkManager)

nmcli g
STATE           CONNECTIVITY  WIFI-HW    WIFI       WWAN-HW    WWAN      
wird verbunden  kein          aktiviert  aktiviert  aktiviert  aktiviert 

nmcli d
DEVICE  TYPE      STATE                                         CONNECTION     
wlp3s0  wifi      wird verbunden (Legitimierung wird benötigt)  FRITZ!Box 7412 
enp2s0  ethernet  nicht verfügbar                               --             
lo      loopback  nicht verwaltet                               --   

/usr/sbin/iwconfig
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:off
          
enp2s0    no wireless extensions.

lo        no wireless extensions.


and after a minute or so (when it fails to reconnect)

nmcli g
STATE            CONNECTIVITY  WIFI-HW    WIFI       WWAN-HW    WWAN      
nicht verbunden  kein          aktiviert  aktiviert  aktiviert  aktiviert 

nmcli d
DEVICE  TYPE      STATE            CONNECTION 
wlp3s0  wifi      nicht verbunden  --         
enp2s0  ethernet  nicht verfügbar  --         
lo      loopback  nicht verwaltet  --  
                      --   

When I tried this command, I got the following answer

sudo modprobe -r wlp3s0
modprobe: FATAL: Module wlp3s0 not found.

As a workaround, you could use a script which will run at resume to restart NetworkManager. I’ll follow up with a link on how to do that.

When I tried this command, I got the following answer

sudo modprobe -r wlp3s0
modprobe: FATAL: Module wlp3s0 not found.

That’s because you used the device node name and not the applicable wireless driver. :wink:

The systemd-suspend.service can be used to execute custom scripts located in /usr/lib/systemd/system-sleep/ directory. Such a script could be used to restart the network upon post hibernation, similar to the one suggested here…
https://forums.opensuse.org/showthread.php/529138-No-network-after-hibernation?p=2851612#post2851612

Sine you’re using NM, something like the following (eg /usr/lib/systemd/system-sleep/restart-networkmanager.sh) should help automate restarting NM…

#!/bin/bash
if  "$1" = "post" ] ; then
    echo "Restarting NM..."
    systemctl restart NetworkManager
fi

Don’t forget to make the file executable when done…

chmod +x /usr/lib/systemd/system-sleep/restart-networkmanager.sh

Thank you very much :slight_smile:
I hope this problem will be fixed by future updates so other users don’t have to use custom scripts for basic functionalities. Thank you again :slight_smile:

Let us know if this does the trick for you. :slight_smile:

I hope this problem will be fixed by future updates so other users don’t have to use custom scripts for basic functionalities.

Only if those impacted like yourself take the time to submit a bug report (or add to an existing one if applicable).

The script works thank you :slight_smile: !
I just submitted a bug to Gnome NetworkManager.
I hope it will be fixed :slight_smile: