Intel WiFi not working after resume from sleep

Hello,
I know this is an old topic, but I’ve recently purchased a new laptop, decided to give Manjaro a try and ran into the same problem - after sleep (but not hibernation) wifi networks get disconnected and disappear from NetworkManager.

The given solution in the other topic did not help me as it solves the issue by re-enabling the network hardware enable/disable button, which is not present on my laptop.

After fiddling around with this issue and trying the other given options (I frankly tried so many things that I forgot more than half of them in the process, including many modifications to udev rules, grub configuration, modprobe .conf files, getting new firmware, etc.).
Eventually I noticed that the network card

0000:2c:00.0 Network controller: Intel Corporation Wi-Fi 7(802.11be) AX1775*/AX1790*/BE20*/BE401/BE1750* 2x2 (rev 1a)
        Subsystem: Rivet Networks Device 1774
        Kernel driver in use: iwlwifi
        Kernel modules: iwlwifi

failed to return from D3cold state after sleep

[ 1751.155237] iwlwifi: unknown parameter 'd0i3_disable' ignored
[ 1751.156063] iwlwifi 0000:2c:00.0: Unable to change power state from D3cold to D0, device inaccessible
cat /sys/bus/pci/devices/0000:2c:00.0/power_state
D3cold

and

cat /sys/bus/pci/devices/0000:2c:00.0/d3cold_allowed

would always be 1 after restart.

So I created a service /etc/systemd/system/disable-d3cold.service to disable d3cold_allowed

[Unit]
Description=Disable D3cold for Wi-Fi PCI Device
After=multi-user.target

[Service]
Type=oneshot
ExecStart=/bin/bash -c "echo 0 > /sys/bus/pci/devices/0000:2c:00.0/d3cold_allowed"

[Install]
WantedBy=multi-user.target
sudo systemctl enable disable-d3cold.service

Now that the device does not enter D3cold it can not fail to recover from it.

I understand that this is more a workaround than an actual solution, but for my case (since I’m only using sleep when laptop is connected to AC power) this is acceptable.

Perhaps there is a more elegant solution, but throwing this in here so if somebody has the same issue has this option and can save themselves the frustration.

Hello and welcome to the Manjaro Community! I’ve moved this into a new thread as you may get better attention this way, rather than bumping an old one.

I have a suspicion you have the same issue as me re. these particular Intel WiFi cards. I have found that with some kernel revisions, a hibernate and resume cycle brings it back up.

I also find that the card tends to “brick” under heavy load, requiring a hibernate (when that works) or a reboot. Is this also the case with yours? Mine reports as an Intel Wireless 7260 via inxi -Nnxxx.

I’d probably try unloading and reloading the wireless module … rather than what appears to be an unknown quantity of loss of power efficiency.

You can check yourself by removing your changes … then just something like

sudo rmmod iwlwifi

~suspend~

sudo modprobe iwlwifi

Maybe a restart of networkmanager would be needed

systemctl restart NetworkManager

If it is effective then a similar systemd approach to the one you already have could be implemented.

1 Like

I’ve tried removing and adding the module after suspension, haven’t tried removing it pre-suspend and then adding it back in, will need to check if that works. Though wouldn’t removing the module pre-suspend essentially remove control of the device and leave it in whatever state it was before removal?

Also tried:

  • Using different kernel versions (6.1, 6.6, 6.11, 6.12);
  • Downloading and installing the current, dev branch, and backports iwlwifi firmware;
  • Adding /etc/NetworkManager/conf.d/wifi-powersave.conf, /etc/NetworkManager/conf.d/wifi.conf, /etc/NetworkManager/conf.d/iwlwifi.conf files with with wifi.powersave = 2;
  • Using nmcli networking off/on ( though it probably would act similarly to NetworkManager restart);
  • Setting iw dev wlp44s0f0 set power_save off;
  • Adding /etc/modprobe.d/iwlwifi.conf with options iwlwifi power_save=0 and restarting drivers with modprobe;
  • Running rfkill unblock 1;
  • Running nmcli radio wifi on;
  • Adding a udev rule with ACTION=="add", SUBSYSTEM=="pci", ATTR{power/control}="on", ATTR{vendor}=="0x8086", ATTR{device}=="0x272b";
  • Adding pcie_aspm=off pci=noaer to /etc/default/grub GRUB_CMDLINE_LINUX (and GRUB_CMDLINE_LINUX_DEFAULT), though I wouldn’t want to keep such a setting, nor did it help - just made system crash after return from sleep;
  • Atempting PCIe device restart with: echo 1 | sudo tee /sys/bus/pci/devices/0000:2c:00.0/reset
  • Removing the PCIe device with echo 1 | sudo tee /sys/bus/pci/devices/0000:2c:00.0/remove, then trying to add it back in with rescan echo 1 | sudo tee /sys/bus/pci/rescan (note: the device was no longer found when doing rescan);

Probably some other stuff as well, really hard to keep track of it at some point I kind of just started throwing things at the wall and seeing what sticks.

I understand that this will incur some amount of power loss, though the way I have it set up now is that I only use sleep mode when the lid is not closed and AC power is connected and using hibernation for almost everything else, so not too worried.

Yes, a hibernate and resume cycle does bring it back up, though if I have to enter hibernate or reboot - kind of defeats the purpose of having a sleep mode.

Can’t really say of how the card performs under load - only got this device (if that is useful information MSI Stealth 16 AI A13VG) about a two weeks ago and still have most of my projects on my old laptop.

The reported network device from inxi -Nnxxxx

Device-1: Intel Wi-Fi 7 AX1775 /AX1790 /BE20 /BE401/BE1750 2x2
    vendor: Rivet Networks driver: iwlwifi v: kernel bus-ID: 0000:2c:00.0
    chip-ID: 8086:272b class-ID: 0280

Hello again.

Just wanted to update. Seems that yes - removing the iwlwifi module before entering sleep and adding it back in afterwards does avoid the problem.

I still wonder about the state that the nic is left in when the module gets removed, but anyways this does seem like it might be a bit better of a solution as this would also stop network traffic to the sleeping device (might not be suitable for every case, but works for me).

Initialy I tried creating a service that activated before/after sleep, but that didn’t seem to function properly, so instead I created a script in /usr/lib/systemd/system-sleep/iwlwifi-sleep.sh

#!/bin/bash

case "$1" in
  pre)
    /usr/sbin/modprobe -r iwlmvm iwlwifi
    ;;
  post)
    /usr/sbin/modprobe iwlwifi iwlmvm
    ;;
esac
sudo chmod +x /usr/lib/systemd/system-sleep/iwlwifi-sleep.sh

This shuts down iwlwifi before sleep and restarts it after returning. In my case restarting NetworkManager doesn’t seem to be necessary.

1 Like

Thanks for posting the script. I guess this could be adapted for the common trackpad issues too (I have seen one posted on the Forum which does this, I’ll have to compare it when I find it). :smiley_cat:

I also have the same issue on MSI Claw. Ubuntu 24.04, CachyOS, ChimeraOS etc all have this issue as well. (NOTE: Shumas fix works)

0000:2b:00.0 Network controller: Intel Corporation Wi-Fi 7(802.11be) AX1775*/AX1790*/BE20*/BE401/BE1750* 2x2 (rev 1a)
        Subsystem: Rivet Networks Device 1774
        Kernel driver in use: iwlwifi
        Kernel modules: iwlwifi

I have made others using systemd such as

etc.

By the by

This is ‘fine’ … but why use sbin ?
The direct path is /usr/bin/bin and /usr/sbin are both symlinked there.

1 Like