No Wifi networks after hibernation

Hi!

I´m having issues with my wifi on Tumbleweed. Wifi works great until i hibernate the laptop.
After hibernation the wifi icon is gone. I can expand the wifi controls and choose to select a network, however, the list is empty and the laptop just keeps searching.

Information:
Device: Surface Pro 4

Wifi hardware:


lspci
02:00.0 Ethernet controller: Marvell Technology Group Ltd. 88W8897 [AVASTAR] 802.11ac Wireless

lspci -n
02:00.0 0200: 11ab:2b38

Module being used:
lsmod
mwifiex_pcie           40960  0

What i have tried so far:

  1. After booting up from hibernation i have tried to just modprobe the wifi module. I have also tried to first remove the module with rmmod and then modprobe.
  2. Tried to restart both network.service and NetworkManager.service

An interesting thing is that rmmod and modprobe works perfectly before the system has been hibernated.

I have no clue what could be causing this behavior :confused:

After hibernation the wifi icon is gone.

Which desktop environment are you using? I occasionally have a missing NetworkManager icon from the system tray (after suspend resume cycle), but I can click on the empty space and the connection manager is still active. Restarting NetworkManager is usually sufficient to correct this. However, you’ve also described the fact that you can no longer connect to a wifi network?

To get a better handle on this, report back following a resume from hibernation with the output of the following…

nmcli g
nmcli d

At a wireless device level, I assume the wireless NIC device node is still present?
After resuming from hibernation what is reported by the following commands?

/usr/sbin/iwconfig
sudo /usr/sbin/iwlist wlan0 scan

If necessary, capture the commands and output to a text file, and post when you are connected again.

Hi deano_ferrari!

Thank you very much so far for all your help.

Yeah, the Network Manager is probably not the problem in my case, after an hibernation it´s impossible for me to connect to any wireless networks, it´s completely dead, even after restarting the services.

Here is the information you wanted me to gather.

I´m running Gnome environment.


nmcli g
STATE         CONNECTIVITY  WIFI-HW  WIFI     WWAN-HW  WWAN    
disconnected  none          enabled  enabled  enabled  enabled


nmcli d
DEVICE  TYPE      STATE         CONNECTION 
wlp2s0  wifi      disconnected  --         
lo      loopback  unmanaged     --


/usr/sbin/iwconfig
wlp2s0    IEEE 802.11  ESSID:off/any  
          Mode:Managed  Access Point: Not-Associated   
          Retry short limit:9   RTS thr=2347 B   Fragment thr=2346 B   
          Power Management:off
          
lo        no wireless extensions.


sudo /usr/sbin/iwlist wlp2s0 scan
wlp2s0    Interface doesn't support scanning : Bad address

Hope this helps.

The output from the last command is concerning…

sudo /usr/sbin/iwlist wlp2s0 scan
wlp2s0    Interface doesn't support scanning : Bad address

That could be due to the marvell driver or the hardware itself I guess, and if related to the former it likely will need a bug report submitted to resolve.

In the meantime this might be worth a shot…

After resuming, try removing the device and rescan the PCI bus with

echo 1 > /sys/bus/pci/devices/0000:02:00.0/remove
echo 1 > /sys/bus/pci/rescan

Hopefully this will re-initialize it and bring it back to life. Can you scan/connect after that? (If this works it could be automated via a custom service.)

This sadly did not work :confused:


nichlas@portable:~> echo 1 > /sys/bus/pci/devices/0000:02:00.0/remove
nichlas@portable:~> echo 1 > /sys/bus/pci/rescan
portable:/home/nichlas # lspci
00:00.0 Host bridge: Intel Corporation Skylake Host Bridge/DRAM Registers (rev 08)
00:02.0 VGA compatible controller: Intel Corporation HD Graphics 520 (rev 07)
00:05.0 Multimedia controller: Intel Corporation Skylake Imaging Unit (rev 01)
00:08.0 System peripheral: Intel Corporation Skylake Gaussian Mixture Model
00:14.0 USB controller: Intel Corporation Sunrise Point-LP USB 3.0 xHCI Controller (rev 21)
00:14.2 Signal processing controller: Intel Corporation Sunrise Point-LP Thermal subsystem (rev 21)
00:14.3 Multimedia controller: Intel Corporation Device 9d32 (rev 01)
00:15.0 Signal processing controller: Intel Corporation Sunrise Point-LP Serial IO I2C Controller #0 (rev 21)
00:15.1 Signal processing controller: Intel Corporation Sunrise Point-LP Serial IO I2C Controller #1 (rev 21)
00:15.2 Signal processing controller: Intel Corporation Sunrise Point-LP Serial IO I2C Controller #2 (rev 21)
00:15.3 Signal processing controller: Intel Corporation Sunrise Point-LP Serial IO I2C Controller #3 (rev 21)
00:16.0 Communication controller: Intel Corporation Sunrise Point-LP CSME HECI #1 (rev 21)
00:16.4 Communication controller: Intel Corporation Device 9d3e (rev 21)
00:1c.0 PCI bridge: Intel Corporation Sunrise Point-LP PCI Express Root Port #5 (rev f1)
00:1d.0 PCI bridge: Intel Corporation Sunrise Point-LP PCI Express Root Port #9 (rev f1)
00:1f.0 ISA bridge: Intel Corporation Sunrise Point-LP LPC Controller (rev 21)
00:1f.2 Memory controller: Intel Corporation Sunrise Point-LP PMC (rev 21)
00:1f.3 Audio device: Intel Corporation Sunrise Point-LP HD Audio (rev 21)
01:00.0 Non-Volatile memory controller: Samsung Electronics Co Ltd NVMe SSD Controller SM951/PM951 (rev 01)

Guess i will have to file a bug report regarding this.

Thank you for all your help!

Yes, I think that this will be necessary. Please post he link to your bug report once submitted.

BTW, I did wonder if perhaps the wireless device becomes soft/hard blocked following the hibernation/resume cycle?

/usr/sbin/rfkill list

You could write a systemd unit to release the card’s driver when going into suspend, and another one to load it when coming out of suspend. See https://wiki.archlinux.org/index.php/Power_management#Suspend.2Fresume_service_files

I had similar thoughts, but I’m not so sure that this approach will work based on the OP’s comments about attempts to unload and reload the driver failing.

Does not seem like it is being blocked.

Before hibernation:


nichlas@portable:~> sudo /usr/sbin/rfkill list[sudo] password for root: 
0: phy0: Wireless LAN
    Soft blocked: no
    Hard blocked: no
1: hci0: Bluetooth
    Soft blocked: yes
    Hard blocked: no

After hibernation:


nichlas@portable:~> sudo /usr/sbin/rfkill list
[sudo] password for root: 
0: phy0: Wireless LAN
    Soft blocked: no
    Hard blocked: no

It was a long shot… looks like it’s time to submit a bug report.