No wifi after sleep

When my laptop wakes up from sleep, I see no wifi connections. Enabling and disabling airplane mode doesn’t solve it. Neither does sudo systemctl restart NetworkManager.

rfkill list produces


1: phy0: Wireless LAN
        Soft blocked: no
        Hard blocked: no
2: hci0: Bluetooth
        Soft blocked: no
        Hard blocked: no

and sudo modprobe -r iwlwifi

modprobe: FATAL: Module iwlwifi is in use.

and sudo modprobe iwlwifi doesn’t help.

Here is my hardware info: https://0x0.st/KuEz.txt

I am a newbie and so I just tried what I found on the internet. I am puzzled that none of these commands shows that something is out of order.

After talking with AI (a dangerous thing, I know), what worked was adding

pcie_port_pm=off

to the options line in /efi/loader/entries/XXX.conf file.

Perhaps it might help to somebody, or perhaps somebody might comment whether doing it is actually a good idea.

I wouldn’t know that.

However what I do know is that the changes made to

will be overwritten next time when the kernel is updated.

If you want the change to be persistent:

How to modify kernel options

In systemd-boot, it is actually quite simple. You edit the appropriate entry file which can be found on your EFI partition in the loader/entries directory. Each entry is a boot option on the menu and each has a line called options. You can modify these entries directly, however, these changes may be overwritten when packages are installed or updated.

To make the changes, instead of modifying the entries, modify the file /etc/kernel/cmdline which is a one-line file containing a list of kernel options. Then run sudo reinstall-kernels which will populate the entries and regenerate the initrds.

https://discovery.endeavouros.com/installation/systemd-boot/2022/12/

Thanks a lot!

1 Like