Network is unavailable after sleep

I already try that as mentioned in here, but it did not work.
Now i have to try what brahma mentioned here

and see if it helps. I will report when i can try it!!

ok, i’m back…
I tried to do what you mentioned but it did not work.
I also uninstall my vpn software then reboot, seep, wake up, but still network hard block.

Also tried to unload the wifi module runing
sudo rmmod /lib/modules/6.1.19-1-MANJARO/kernel/drivers/net/wireless/intel/iwlwifi/iwlwifi.ko.zst
but i got these answer:

rmmod: ERROR: Module iwlwifi is in use by: iwlmvm

:pensive:

The remove this as well.

rmmod iwlmvm
rmmod iwlwifi

I have tried to remove the wifi module runing the following:

sudo rmmod /lib/modules/6.1.19-1-MANJARO/kernel/drivers/net/wireless/intel/iwlwifi/mvm/iwlmvm.ko.zst

followed by…
sudo insmod /lib/modules/6.1.19-1-MANJARO/kernel/drivers/net/wireless/intel/iwlwifi/iwlwifi.ko.zst

then sleep, then wake up and tried to reload the module runing:
sudo insmod /lib/modules/6.1.19-1-MANJARO/kernel/drivers/net/wireless/intel/iwlwifi/mvm/iwlmvm.ko.zst

and i got the following output :

insmod: ERROR: could not insert module /lib/modules/6.1.19-1-MANJARO/kernel/drivers/net/wireless/intel/iwlwifi/mvm/iwlmvm.ko.zst: File exists

also tried: sudo insmod /lib/modules/6.1.19-1-MANJARO/kernel/drivers/net/wireless/intel/iwlwifi/iwlwifi.ko.zst

and i got the following output :

insmod: ERROR: could not insert module /lib/modules/6.1.19-1-MANJARO/kernel/drivers/net/wireless/intel/iwlwifi/iwlwifi.ko.zst: File exists

so was not able to reload, then i had to reboot.

i also create a new file in /etc/modprobe.d/iwl.conf similar as mentioned (here), but in a different file with the following parameters :

options iwlwifi 11n_disable=1
options iwlwifi swcrypto=0
options iwlwifi bt_coex_active=0
options iwlwifi power_save=0
options iwlwifi uapsd_disable=1
options iwlmvm power_scheme=1

save it, reboot, then sleep, then wake up. But as always network was Hard Bloked…

so try removing the drivers before suspend with:
sudo modprobe -r iwlmvm iwlwifi
suspend, wake up, and load them again:
sudo modprobe iwlmvm iwlwifi
and check

so try removing the drivers before suspend with:
sudo modprobe -r iwlmvm iwlwifi
suspend, wake up, and load them again:
sudo modprobe iwlmvm iwlwifi
and check

I tried, but didn´t work still continued with the same problem.
After load the driver rfkill list wifi :

2: phy1: Wireless LAN
	Soft blocked: no
	Hard blocked: yes


I get a new Wireless Network Adapter (device-3), to see if a was able to solve the problem some how
$ inxi -xN

Network:
  Device-1: Intel Cannon Lake PCH CNVi WiFi driver: iwlwifi v: kernel
    bus-ID: 00:14.3
  Device-2: Qualcomm Atheros QCA8171 Gigabit Ethernet
    vendor: Micro-Star MSI driver: alx v: kernel port: 3000
    bus-ID: 3d:00.0
  Device-3: Realtek RTL8188EUS 802.11n Wireless Network Adapter
    type: USB driver: r8188eu bus-ID: 1-4:10

But it did not solve it. After wake up, the adapter light is blinking which indicates it is working and i can enable the WiFi but it do no connect.


So now i will do a resume of everything i have already tried which no positive effect on solving the problem

  1. Try blacklist the WiFi driver
    Sudo nano /etc/modprobe.d/blacklist.conf

  2. rfkill unblock wifi and
    rfkill unblock wlan and
    rfkill unblock all (no effect - only works on Soft blocks)

  3. systemctl stop NetworkManager and systemctl start NetworkManager

  4. Clicking the WIFI disable key on the keyboard (works before the suspend, but has no effect after the suspend. I also tried disabling WIFI before suspending, but that had the same outcome.)

  5. I uninstall TLP thinking that could be some tlp config but nothing.

  6. I also uninstall my vpn software then reboot, seep, wake up, but still network hard block.

  7. I try different kernels and nothing.

  8. Set the /etc/modprobe.d/wifi.conf:

    options iwlwifi power_save=0 # disables power management
    
  9. i modify the NetworkManager WiFi powersaving under /etc/NetworkManager/conf.d/

  10. Unloading the WIFI module (“sudo modprobe -r iwlwifi” suspend and did
    sudo modprobe iwlwifi”) No effect.

  11. Try blacklist the WiFi driver
    Sudo nano /etc/modprobe.d/blacklist.conf

  12. Cheked in BIOS but have no options related to WiFi.

  13. went check in the dual-booted windows, whether it is affected or not, The WiFi works there as usual,.

  14. Plugged in a Live USB, check if the Wifi loads or not., No its also shown as hard blocked

  15. create a new test user, log in with the test user and try. No positive results.

  16. Added some parameters to the WIFI:
    /etc/modprobe.d/iwl.conf
    and also tried in here
    /etc/modprobe.d/wifi.conf

    options iwlwifi 11n_disable=1 swcrypto=0 bt_coex_active=0 power_save=0
    options iwlmvm power_scheme=1 
    options iwlwifi d0i3_disable=1 
    options iwlwifi uapsd_disable=1 
    options iwlwifi lar_disable=1
    
  17. I have tried to remove the wifi module runing the following:

    sudo rmmod /lib/modules/6.1.19-1-MANJARO/kernel/drivers/net/wireless/intel/iwlwifi/mvm/iwlmvm.ko.zst

    followed by…
    sudo insmod /lib/modules/6.1.19-1-MANJARO/kernel/drivers/net/wireless/intel/iwlwifi/iwlwifi.ko.zst

    then sleep, then wake up and tried to reload the module runing:
    sudo insmod /lib/modules/6.1.19-1-MANJARO/kernel/drivers/net/wireless/intel/iwlwifi/mvm/iwlmvm.ko.zst

    and i got the following output :

    insmod: ERROR: could not insert module /lib/modules/6.1.19-1-MANJARO/kernel/drivers/net/wireless/intel/iwlwifi/mvm/iwlmvm.ko.zst: File exists
    
  18. Tried removing the drivers before suspend with:
    sudo modprobe -r iwlmvm iwlwifi
    suspend, wake up, and load them again:
    sudo modprobe iwlmvm iwlwifi
    But still hard blocked.



I did the list to order everything and see if it is helpful for someone in the future. In the meantime i still have the network hard blocked after perform sleep mode and wake up, but i still think it might be a stupid thing misconfigured thing that i want to resolve some day.

so you tried with a new usb wifi adapter and the same issue? and since it also didnt worked when you unloaded the driver before sleep and it is was blocked after resume, im out of ideas… is hibernation in windows completely disabled?

yes, i read in some blog that someone solved that way. But i got my my wifi adapter and continued the same.

when you unloaded the driver before sleep and it is was blocked after resume

Yes, i unloaded perform sleep, wake up, loaded the driver and it was hard bloked. :person_shrugging:

And hibernation in windows is completely disabled.


I will try starting from zero again, repeat every step see if i did something wrong or if i can find a solution.
If so i will report.

Also i would be glad if someone over there came with a new idea that could help.
Thanks you all !!

Hi there I’m back, in case you miss me!!!

I`m still not able to solve my problem, and i have tried some new stuff so here i am to report what have i done.

  • So what I did was turn my airplane mode on, and then try to unblock the hard block via
    sudo rfkill unblock [ID number] ,
    in my case was sudo rfkill unblock 0.

  • I read in other forum that Apparently NetworkManager had turned of wifi. To enable someone used nmcli radio wifi on, but it did not work in my case.

  • Disabled Windows 10 WiFi Power Saver, and be sure to leave wifi ON in windows before to shut down.

  • Remove the battery and AC power for several minutes.

  • I read here that it might be the pin 20 error in the wireless card, this is my WIFI card, but i’m not sure were is the pint 20 were i should put the tape, or what kind of tape can i use to avoid to getting melt.




Then i am leaving here the output of some Network Manager commands output.

nmcli g:

STATE         CONNECTIVITY  WIFI-HW   WIFI      WWAN-HW  WWAN
disconnected  none          disabled  disabled  missing  enabled

nmcli n:

enabled

nmcli r:

WIFI-HW   WIFI      WWAN-HW  WWAN
disabled  disabled  missing  enabled

nmcli d:

DEVICE        TYPE      STATE                   CONNECTION
lo            loopback  connected (externally)  lo
enp61s0       ethernet  unavailable             --
wlo1          wifi      unavailable             --
p2p-dev-wlo1  wifi-p2p  unavailable             --

nmcli m:

NetworkManager is running

nmcli -g g:

lo: connected (externally) to lo
	"lo"
	loopback (unknown), 00:00:00:00:00:00, sw, mtu 65536
	inet4 127.0.0.1/8
	inet6 ::1/128
	route6 ::1/128 metric 256

enp61s0: unavailable
	"Qualcomm Atheros QCA8171"
	ethernet (alx), 00:D8:61:07:7D:32, hw, mtu 1500

wlo1: unavailable
	"Intel Cannon Lake PCH CNVi"
	wifi (iwlwifi), 18:56:80:F3:98:D2, sw disabled, hw disabled, hw, mtu 1500

p2p-dev-wlo1: unavailable
	"p2p-dev-wlo1"
	wifi-p2p, sw disabled, hw disabled, hw

you have also the same issue with a different wifi that you mentioned above, so its not related to the wifi…
try booting into linux mint live usb, suspend, wake up and see if it has the same issue…

you have also the same issue with a different wifi that you mentioned above, so its not related to the wifi…

you are right, i just want to try everything i read that could solve it.

Ok, so i did it. I boot into linuxmint-21.1-cinnamon-64bit Live USB and surprise… Same Issue persist (network get hard blocked after suspend).!

Then i boot the same Live USB in other laptop, suspend and wakeup and it has no problem, network worked just fine and network was not hard blocked.

So at this point the problem is oviously my laptop, and if it is not hardware it might be some config somewere that is set to hard block.
The thing is that i have no idea were these config could be.

probably something related to linux + your bios/hardware + windows … and have no idea what to do… i saw somewhere that shutting down your pc, unplugging it from cable and pressing the power button for like 30-60 seconds could help

I did it by holding the power button for 60 sec, then i power up but it did not helped.


Here are some new stuff i have tried (non of those worked):

  • Enable the software and hardware for your wireless interface: sudo ip link set wlo1 up
    .
  • Restarting the network manager by using the following command: sudo systemctl restart NetworkManager.service
    .
  • Prevent tlp for turning off the network adapter when the system goes into suspend mode: sudo nano /etc/tlp.conf ,
    WIFI_PWR_ON_AC=on
    

.

  • Added the following lines to the TLP configuration file (/etc/tlp.conf):
    WIFI_CONTROL_RADIO_ON=false
    WIFI_DISABLE_ON_SLEEP=false
    

.

  • try disabling and re-enabling the wireless network running the following command:
    nmcli radio wifi off && nmcli radio wifi on
    

.

  • Edit the system sleep settings:
    sudo nano /etc/systemd/system.conf
    Change the value of the line to “ignore”:
    HandleLidSwitch=ignore
    

.

  • Addied the following line to the iwlwifi configuration file as well:

    options iwlwifi bt_coex_active=0 swcrypto=1 11n_disable=8
    

.

  • Type the following command to reload the iwlwifi module after wake up (when the wifi was already hard blocke):

    `sudo modprobe -r iwlwifi && sudo modprobe iwlwifi`
    

    output was:

    rmmod: ERROR: Module iwlwifi is in use by: iwlmvm
    

    then i tried:

     `sudo rmmod iwlwifi && sudo modprobe iwlwifi`
    

    output was:

    rmmod: ERROR: Module iwlwifi is in use by: iwlmvm

.

  • try reloading the kernel modules by typing the following command:

    sudo systemctl restart systemd-modules-load.service
    

.

  • Finally i perform the next, also when the wifi was hard blocked, different when i tried before to suspend as discussed in this post:

now i did it after suspend, and the newtwork was alrready hard blocked.

lsmod | grep iwlwifi

iwlwifi               491520  1 iwlmvm
cfg80211             1138688  3 iwlmvm,iwlwifi,mac80211

followed by:
sudo dmesg | grep iwlwifi

[    3.455177] iwlwifi 0000:00:14.3: enabling device (0000 -> 0002)
[    3.474569] iwlwifi 0000:00:14.3: WRT: Overriding region id 0
[    3.474573] iwlwifi 0000:00:14.3: WRT: Overriding region id 1
[    3.474575] iwlwifi 0000:00:14.3: WRT: Overriding region id 2
[    3.474577] iwlwifi 0000:00:14.3: WRT: Overriding region id 3
[    3.474578] iwlwifi 0000:00:14.3: WRT: Overriding region id 4
[    3.474580] iwlwifi 0000:00:14.3: WRT: Overriding region id 6
[    3.474581] iwlwifi 0000:00:14.3: WRT: Overriding region id 8
[    3.474582] iwlwifi 0000:00:14.3: WRT: Overriding region id 9
[    3.474583] iwlwifi 0000:00:14.3: WRT: Overriding region id 10
[    3.474585] iwlwifi 0000:00:14.3: WRT: Overriding region id 11
[    3.474586] iwlwifi 0000:00:14.3: WRT: Overriding region id 15
[    3.474588] iwlwifi 0000:00:14.3: WRT: Overriding region id 16
[    3.474589] iwlwifi 0000:00:14.3: WRT: Overriding region id 18
[    3.474591] iwlwifi 0000:00:14.3: WRT: Overriding region id 19
[    3.474592] iwlwifi 0000:00:14.3: WRT: Overriding region id 20
[    3.474593] iwlwifi 0000:00:14.3: WRT: Overriding region id 21
[    3.474595] iwlwifi 0000:00:14.3: WRT: Overriding region id 28
[    3.475087] iwlwifi 0000:00:14.3: loaded firmware version 46.ea3728ee.0 9000-pu-b0-jf-b0-46.ucode op_mode iwlmvm
[    3.793680] iwlwifi 0000:00:14.3: Detected Intel(R) Wireless-AC 9560 160MHz, REV=0x312
[    3.848648] iwlwifi 0000:00:14.3: base HW address: 18:56:80:f3:98:d2, OTP minor version: 0x4
[    3.917291] iwlwifi 0000:00:14.3: iwlmvm doesn't allow to disable HW crypto, check swcrypto module parameter
[    3.917294] iwlwifi 0000:00:14.3: iwlmvm doesn't allow to disable BT Coex, check bt_coex_active module parameter
[    3.926677] iwlwifi 0000:00:14.3 wlo1: renamed from wlan0
[  909.932188] iwlwifi 0000:00:14.3: reporting RF_KILL (radio disabled)
[  910.009231] iwlwifi 0000:00:14.3: Failed to start RT ucode: -132
[  910.021696] iwlwifi 0000:00:14.3: mac start retry 0
[  910.089603] iwlwifi 0000:00:14.3: Failed to start RT ucode: -132
[  910.102044] iwlwifi 0000:00:14.3: mac start retry 1
[  910.169205] iwlwifi 0000:00:14.3: Failed to start RT ucode: -132
[  910.181629] iwlwifi 0000:00:14.3: mac start retry 2
[  910.181753]  nvidia(POE) ac97_bus snd_hda_codec_hdmi snd_pcm_dmaengine kvm iwlmvm irqbypass joydev snd_hda_intel vfat crct10dif_pclmul mousedev snd_intel_dspcfg crc32_pclmul mac80211 fat snd_intel_sdw_acpi polyval_clmulni polyval_generic hid_multitouch gf128mul i915 libarc4 ghash_clmulni_intel snd_hda_codec sha512_ssse3 aesni_intel crypto_simd snd_hda_core iwlwifi cryptd iTCO_wdt drm_buddy snd_hwdep msi_wmi intel_pmc_bxt rapl mei_hdcp mei_pxp ee1004 iTCO_vendor_support gpio_keys snd_pcm intel_wmi_thunderbolt intel_cstate mxm_wmi wmi_bmof sparse_keymap cfg80211 intel_uncore ttm snd_timer intel_lpss_pci pcspkr psmouse drm_display_helper spi_nor intel_lpss mei_me snd cec alx i2c_i801 video i2c_hid_acpi mtd soundcore mdio i2c_nvidia_gpu i2c_smbus intel_gtt mei i2c_hid intel_pch_thermal idma64 rfkill wmi soc_button_array acpi_pad acpi_tad mac_hid squashfs vboxnetflt(OE) vboxnetadp(OE) vboxdrv(OE) acpi_call(OE) sg crypto_user loop fuse dm_mod bpf_preload ip_tables x_tables ext4 crc32c_generic
[  910.182083]  nvidia(POE) ac97_bus snd_hda_codec_hdmi snd_pcm_dmaengine kvm iwlmvm irqbypass joydev snd_hda_intel vfat crct10dif_pclmul mousedev snd_intel_dspcfg crc32_pclmul mac80211 fat snd_intel_sdw_acpi polyval_clmulni polyval_generic hid_multitouch gf128mul i915 libarc4 ghash_clmulni_intel snd_hda_codec sha512_ssse3 aesni_intel crypto_simd snd_hda_core iwlwifi cryptd iTCO_wdt drm_buddy snd_hwdep msi_wmi intel_pmc_bxt rapl mei_hdcp mei_pxp ee1004 iTCO_vendor_support gpio_keys snd_pcm intel_wmi_thunderbolt intel_cstate mxm_wmi wmi_bmof sparse_keymap cfg80211 intel_uncore ttm snd_timer intel_lpss_pci pcspkr psmouse drm_display_helper spi_nor intel_lpss mei_me snd cec alx i2c_i801 video i2c_hid_acpi mtd soundcore mdio i2c_nvidia_gpu i2c_smbus intel_gtt mei i2c_hid intel_pch_thermal idma64 rfkill wmi soc_button_array acpi_pad acpi_tad mac_hid squashfs vboxnetflt(OE) vboxnetadp(OE) vboxdrv(OE) acpi_call(OE) sg crypto_user loop fuse dm_mod bpf_preload ip_tables x_tables ext4 crc32c_generic
[  910.182472]  nvidia(POE) ac97_bus snd_hda_codec_hdmi snd_pcm_dmaengine kvm iwlmvm irqbypass joydev snd_hda_intel vfat crct10dif_pclmul mousedev snd_intel_dspcfg crc32_pclmul mac80211 fat snd_intel_sdw_acpi polyval_clmulni polyval_generic hid_multitouch gf128mul i915 libarc4 ghash_clmulni_intel snd_hda_codec sha512_ssse3 aesni_intel crypto_simd snd_hda_core iwlwifi cryptd iTCO_wdt drm_buddy snd_hwdep msi_wmi intel_pmc_bxt rapl mei_hdcp mei_pxp ee1004 iTCO_vendor_support gpio_keys snd_pcm intel_wmi_thunderbolt intel_cstate mxm_wmi wmi_bmof sparse_keymap cfg80211 intel_uncore ttm snd_timer intel_lpss_pci pcspkr psmouse drm_display_helper spi_nor intel_lpss mei_me snd cec alx i2c_i801 video i2c_hid_acpi mtd soundcore mdio i2c_nvidia_gpu i2c_smbus intel_gtt mei i2c_hid intel_pch_thermal idma64 rfkill wmi soc_button_array acpi_pad acpi_tad mac_hid squashfs vboxnetflt(OE) vboxnetadp(OE) vboxdrv(OE) acpi_call(OE) sg crypto_user loop fuse dm_mod bpf_preload ip_tables x_tables ext4 crc32c_generic 

So at this point if i’m not wrong the iwlwifi driver is already loaded after wake up from suspend, but i do not understand why it get hard blocked.

I will write to msi support to see if they can provide some specific hot key i can perform to unblock the wifi, but in the mean time, looking forward to find some answer.

Thank you people!

It does not appear you did.

If you cannot unload the iwlwifi module, check what is using it … likely the split power module for it iwlmvm.
lsmod | grep iwl

The procedure to attempt is to totally disable network manager, disable wifi, unload modules, -suspend-, reverse. The order is not sure - maybe disable wifi before nm, etc. Example:

sudo rfkill block all
systemctl disable NetworkManager --now
sudo rmmod iwlmvm iwlwifi

systemctl suspend

sudo modprobe iwlwifi
sudo modprobe iwlmvm
systemctl enable NetworkManager --now
sudo rfkill unblock all

I know this topic has been quiet for a couple of months, but I ran into the same issue on my MSI GS65 Stealth. I found some information on the Arch Linux website (search for “MSI GS65” and check out the “Function Keys” section) and also on Ask Ubuntu (search for “MSI GS65 wifi hardware switch disabled after suspend”) about enabling the airplane mode function key combination under Linux.

To summarize what I found, add acpi_osi=! acpi_osi='Windows 2009' to the GRUB_CMDLINE_LINUX variable in /etc/default/grub, and then run sudo update-grub and reboot your system. This should enable the airplane mode function key combo (Fn+F10).

With the airplane mode function key enabled, it is now possible for me to recover from the hardware locked wifi issue by pressing Fn+F10 twice - not the most elegant solution, but at least I don’t have to reboot.

Your MSI P65 is very similar to the GS65, so the same procedure could work in your case. I hope this helps somebody.

Hello,
Ok i’ve tried exactly what you said:

To summarize what I found, add acpi_osi=! acpi_osi='Windows 2009' to the GRUB_CMDLINE_LINUX variable in /etc/default/grub, and then run sudo update-grub and reboot your system. This should enable the airplane mode function key combo (Fn+F10).
With the airplane mode function key enabled, it is now possible for me to recover from the hardware locked wifi issue by pressing Fn+F10 twice - not the most elegant solution, but at least I don’t have to reboot.

and it worked… :partying_face:

i’m amazed, after all that i’ve been trying it worked. i’ll mark as solved but anyway as you just said, it is not the mos elegant solution but not having to reboot is quite good. Yet i do not understand what is causing network to get hard blocked, i’ll keep traing to findout.

Thanks to everyone who has given me ideas and possible solutions.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.