Wifi doesn't work after waking up from suspend

Hi, I’ve been trying to solve the exact same issue across multiple Linux distributions.
In short words, Wifi connection works great after booting up/restarting the system, but won’t work after waking up from suspend.
When I open the Wifi UI on GNOME, it displays all the available networks, as it should.
However, after waking from suspend it won’t display a single one.
Here are some clues and information I’ve been collecting (I use Fedora Workstation 39):

lspci -k

01:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8723DE 802.11b/g/n PCIe Adapter
	DeviceName: Realtek Wireless LAN + BT
	Subsystem: Hewlett-Packard Company Device 8319
	Kernel driver in use: rtw_8723de
	Kernel modules: rtw88_8723de

Right after restart/boot up (Wifi works fine):

rfkill

ID TYPE      DEVICE      SOFT      HARD
 0 bluetooth hci0   unblocked unblocked
 1 wlan      phy0   unblocked unblocked

ip link

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: wlo1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DORMANT group default qlen 1000
    link/ether b0:68:e6:ae:df:25 brd ff:ff:ff:ff:ff:ff
    altname wlp1s0

Suspending…*
Right after waking up (Wifi doesn’t work anymore):

rfkill

ID TYPE DEVICE      SOFT      HARD
 1 wlan phy0   unblocked unblocked

ip link

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: wlo1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DORMANT group default qlen 1000
    link/ether b0:68:e6:ae:df:25 brd ff:ff:ff:ff:ff:ff
    altname wlp1s0

I’ve tried restarting NetworkManager.service, but it won’t do anything
Also, journalctl | grep -E “X.*NetworkManager” (X being today’s date) shows that NetworkManager behaves differently, here are some clues I found:

Right after restarting/booting up (Successful connection):

systemd[1]: Starting NetworkManager.service - Network Manager...
NetworkManager[1032]: <info>  [1705863261.4870] NetworkManager (version 1.44.2-1.fc39) is starting... (boot:9fe57124-e1c0-4c1b-a661-96e1811e5eeb)
NetworkManager[1032]: <info>  [1705863261.4873] Read config: /etc/NetworkManager/NetworkManager.conf (lib: 20-connectivity-fedora.conf) (run: 15-carrier-timeout.conf)
NetworkManager[1032]: <info>  [1705863261.4932] manager[0x55e2c5e28a00]: monitoring kernel firmware directory '/lib/firmware'.
NetworkManager[1032]: <info>  [1705863261.4972] hostname: hostname: using hostnamed
NetworkManager[1032]: <info>  [1705863261.4972] hostname: static hostname changed from (none) to "barrier"
NetworkManager[1032]: <info>  [1705863261.4979] dns-mgr: init: dns=systemd-resolved rc-manager=unmanaged (auto), plugin=systemd-resolved
NetworkManager[1032]: <info>  [1705863261.5059] rfkill1: found Wi-Fi radio killswitch (at /sys/devices/pci0000:00/0000:00:1c.0/0000:01:00.0/ieee80211/phy0/rfkill1) (driver rtw_8723de)
NetworkManager[1032]: <info>  [1705863261.5062] manager[0x55e2c5e28a00]: rfkill: Wi-Fi hardware radio set enabled
NetworkManager[1032]: <info>  [1705863261.5063] manager[0x55e2c5e28a00]: rfkill: WWAN hardware radio set enabled
NetworkManager[1032]: <info>  [1705863261.5104] Loaded device plugin: NMAtmManager (/usr/lib64/NetworkManager/1.44.2-1.fc39/libnm-device-plugin-adsl.so)
NetworkManager[1032]: <info>  [1705863261.5131] Loaded device plugin: NMTeamFactory (/usr/lib64/NetworkManager/1.44.2-1.fc39/libnm-device-plugin-team.so)
NetworkManager[1032]: <info>  [1705863261.5185] Loaded device plugin: NMBluezManager (/usr/lib64/NetworkManager/1.44.2-1.fc39/libnm-device-plugin-bluetooth.so)
NetworkManager[1032]: <info>  [1705863261.5205] Loaded device plugin: NMWifiFactory (/usr/lib64/NetworkManager/1.44.2-1.fc39/libnm-device-plugin-wifi.so)
NetworkManager[1032]: <info>  [1705863261.5213] Loaded device plugin: NMWwanFactory (/usr/lib64/NetworkManager/1.44.2-1.fc39/libnm-device-plugin-wwan.so)
NetworkManager[1032]: <info>  [1705863261.5218] manager: rfkill: Wi-Fi enabled by radio killswitch; enabled by state file
NetworkManager[1032]: <info>  [1705863261.5219] manager: rfkill: WWAN enabled by radio killswitch; enabled by state file
NetworkManager[1032]: <info>  [1705863261.5220] manager: Networking is enabled by state file
NetworkManager[1032]: <info>  [1705863261.5226] settings: Loaded settings plugin: keyfile (internal)
NetworkManager[1032]: <info>  [1705863261.5260] dhcp: init: Using DHCP client 'internal'
NetworkManager[1032]: <info>  [1705863261.5264] manager: (lo): new Loopback device (/org/freedesktop/NetworkManager/Devices/1)
NetworkManager[1032]: <info>  [1705863261.5285] device (lo): state change: unmanaged -> unavailable (reason 'connection-assumed', sys-iface-state: 'external')
NetworkManager[1032]: <info>  [1705863261.5291] device (lo): state change: unavailable -> disconnected (reason 'connection-assumed', sys-iface-state: 'external')
NetworkManager[1032]: <info>  [1705863261.5303] device (lo): Activation: starting connection 'lo' (1896935b-be2c-417d-bfcf-e0107ad555b0)
NetworkManager[1032]: <info>  [1705863261.5308] device (wlo1): driver supports Access Point (AP) mode
NetworkManager[1032]: <info>  [1705863261.5319] manager: (wlo1): new 802.11 Wi-Fi device (/org/freedesktop/NetworkManager/Devices/2)
NetworkManager[1032]: <info>  [1705863261.5323] device (wlo1): state change: unmanaged -> unavailable (reason 'managed', sys-iface-state: 'external')
systemd[1]: Starting NetworkManager-dispatcher.service - Network Manager Script Dispatcher Service...
systemd[1]: Started NetworkManager-dispatcher.service - Network Manager Script Dispatcher Service.
audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=NetworkManager-dispatcher comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
NetworkManager[1032]: <info>  [1705863261.6892] device (wlo1): set-hw-addr: set MAC address to 6A:A9:63:80:A0:B6 (scanning)
NetworkManager[1032]: <info>  [1705863261.8375] bus-manager: acquired D-Bus service "org.freedesktop.NetworkManager"
NetworkManager[1032]: <info>  [1705863261.8392] device (lo): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'external')
systemd[1]: Started NetworkManager.service - Network Manager.
audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=NetworkManager comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
NetworkManager[1032]: <info>  [1705863261.8397] device (lo): state change: prepare -> config (reason 'none', sys-iface-state: 'external')
NetworkManager[1032]: <info>  [1705863261.8402] device (lo): state change: config -> ip-config (reason 'none', sys-iface-state: 'external')
NetworkManager[1032]: <info>  [1705863261.8412] device (lo): state change: ip-config -> ip-check (reason 'none', sys-iface-state: 'external')
NetworkManager[1032]: <info>  [1705863261.8426] modem-manager: ModemManager available
NetworkManager[1032]: <info>  [1705863261.8441] device (lo): state change: ip-check -> secondaries (reason 'none', sys-iface-state: 'external')
NetworkManager[1032]: <info>  [1705863261.8446] device (lo): state change: secondaries -> activated (reason 'none', sys-iface-state: 'external')
NetworkManager[1032]: <info>  [1705863261.8456] device (lo): Activation: successful, device activated.
systemd[1]: Starting NetworkManager-wait-online.service - Network Manager Wait Online...
NetworkManager[1032]: <info>  [1705863261.9049] device (wlo1): supplicant interface state: internal-starting -> disconnected
NetworkManager[1032]: <info>  [1705863261.9050] device (wlo1): state change: unavailable -> disconnected (reason 'supplicant-available', sys-iface-state: 'managed')
NetworkManager[1032]: <info>  [1705863262.9049] policy: auto-activating connection 'mynetwork' (3c7d6dba-3c1e-4f5b-a4ab-93ef228b02a5)
NetworkManager[1032]: <info>  [1705863262.9056] device (wlo1): Activation: starting connection 'mynetwork' (3c7d6dba-3c1e-4f5b-a4ab-93ef228b02a5)
NetworkManager[1032]: <info>  [1705863262.9058] device (wlo1): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')
NetworkManager[1032]: <info>  [1705863262.9061] manager: NetworkManager state is now CONNECTING
NetworkManager[1032]: <info>  [1705863262.9143] device (wlo1): set-hw-addr: reset MAC address to B0:68:E6:AE:DF:25 (preserve)
NetworkManager[1032]: <info>  [1705863263.0548] device (wlo1): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
NetworkManager[1032]: <info>  [1705863263.0553] device (wlo1): Activation: (wifi) access point 'mynetwork' has security, but secrets are required.
NetworkManager[1032]: <info>  [1705863263.0554] device (wlo1): state change: config -> need-auth (reason 'none', sys-iface-state: 'managed')
NetworkManager[1032]: <info>  [1705863263.0556] sup-iface[e9b5dd84acdb87a4,0,wlo1]: wps: type pbc start...
NetworkManager[1032]: <info>  [1705863263.0559] device (wlo1): supplicant interface state: disconnected -> interface_disabled
NetworkManager[1032]: <info>  [1705863263.0572] device (wlo1): state change: need-auth -> prepare (reason 'none', sys-iface-state: 'managed')
NetworkManager[1032]: <info>  [1705863263.0576] device (wlo1): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
NetworkManager[1032]: <info>  [1705863263.0579] device (wlo1): Activation: (wifi) connection 'mynetwork' has security, and secrets exist.  No new secrets needed.
NetworkManager[1032]: <info>  [1705863263.0580] Config: added 'ssid' value 'mynetwork'
NetworkManager[1032]: <info>  [1705863263.0580] Config: added 'scan_ssid' value '1'
NetworkManager[1032]: <info>  [1705863263.0580] Config: added 'bgscan' value 'simple:30:-70:86400'
NetworkManager[1032]: <info>  [1705863263.0580] Config: added 'key_mgmt' value 'WPA-PSK WPA-PSK-SHA256 FT-PSK SAE FT-SAE'
NetworkManager[1032]: <info>  [1705863263.0581] Config: added 'auth_alg' value 'OPEN'
NetworkManager[1032]: <info>  [1705863263.0581] Config: added 'psk' value '<hidden>'
NetworkManager[1032]: <info>  [1705863263.0616] device (wlo1): supplicant interface state: interface_disabled -> inactive
NetworkManager[1032]: <info>  [1705863263.3348] device (wlo1): supplicant interface state: inactive -> authenticating
NetworkManager[1032]: <info>  [1705863263.3353] device (wlo1): supplicant interface state: authenticating -> associating
NetworkManager[1032]: <info>  [1705863263.3429] device (wlo1): supplicant interface state: associating -> associated
NetworkManager[1032]: <info>  [1705863263.4726] device (wlo1): supplicant interface state: associated -> completed
NetworkManager[1032]: <info>  [1705863263.4726] device (wlo1): Activation: (wifi) Stage 2 of 5 (Device Configure) successful. Connected to wireless network "mynetwork"
NetworkManager[1032]: <info>  [1705863263.5558] device (wlo1): state change: config -> ip-config (reason 'none', sys-iface-state: 'managed')
NetworkManager[1032]: <info>  [1705863263.5567] dhcp4 (wlo1): activation: beginning transaction (timeout in 45 seconds)
NetworkManager[1032]: <info>  [1705863263.5977] dhcp4 (wlo1): state changed new lease, address=192.168.1.67
NetworkManager[1032]: <info>  [1705863263.5984] policy: set 'mynetwork' (wlo1) as default for IPv4 routing and DNS
NetworkManager[1032]: <info>  [1705863263.6047] device (wlo1): state change: ip-config -> ip-check (reason 'none', sys-iface-state: 'managed')
NetworkManager[1032]: <info>  [1705863263.6076] device (wlo1): state change: ip-check -> secondaries (reason 'none', sys-iface-state: 'managed')
NetworkManager[1032]: <info>  [1705863263.6078] device (wlo1): state change: secondaries -> activated (reason 'none', sys-iface-state: 'managed')
NetworkManager[1032]: <info>  [1705863263.6083] manager: NetworkManager state is now CONNECTED_SITE
NetworkManager[1032]: <info>  [1705863263.6090] device (wlo1): Activation: successful, device activated.
NetworkManager[1032]: <info>  [1705863263.6099] manager: startup complete
systemd[1]: Finished NetworkManager-wait-online.service - Network Manager Wait Online.
audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=NetworkManager-wait-online comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
NetworkManager[1032]: <info>  [1705863263.8206] manager: NetworkManager state is now CONNECTED_GLOBAL
NetworkManager[1032]: <info>  [1705863265.7819] dhcp6 (wlo1): activation: beginning transaction (timeout in 45 seconds)
NetworkManager[1032]: <info>  [1705863265.7832] policy: set 'mynetwork' (wlo1) as default for IPv6 routing and DNS
NetworkManager[1032]: <info>  [1705863265.7904] dhcp6 (wlo1): state changed new lease
NetworkManager[1032]: <info>  [1705863266.9093] agent-manager: agent[ead3cfcf1fce4446,:1.37/org.gnome.Shell.NetworkAgent/42]: agent registered
systemd[1]: NetworkManager-dispatcher.service: Deactivated successfully.
audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=NetworkManager-dispatcher comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
NetworkManager[1032]: <info>  [1705863292.3754] agent-manager: agent[03f1b122398e0920,:1.86/org.gnome.Shell.NetworkAgent/1000]: agent registered

Right after waking up from suspend (Connectivity messed up):

NetworkManager[1032]: <info>  [1705863087.5980] manager: sleep: wake requested (sleeping: yes  enabled: yes)
NetworkManager[1032]: <info>  [1705863087.5985] device (wlo1): state change: unmanaged -> unavailable (reason 'managed', sys-iface-state: 'external')
NetworkManager[1032]: <info>  [1705863087.6099] device (wlo1): set-hw-addr: set MAC address to 62:95:7F:9C:7F:5E (scanning)
NetworkManager[1032]: <info>  [1705863087.7006] manager: NetworkManager state is now DISCONNECTED
NetworkManager[1032]: <info>  [1705863087.7205] device (wlo1): supplicant interface state: internal-starting -> disconnected
NetworkManager[1032]: <info>  [1705863087.7206] device (wlo1): state change: unavailable -> disconnected (reason 'supplicant-available', sys-iface-state: 'managed')
systemd[1]: NetworkManager-dispatcher.service: Deactivated successfully.
audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=NetworkManager-dispatcher comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
NetworkManager[1032]: <info>  [1705863092.8165] agent-manager: agent[28a49433d91516bc,:1.87/org.gnome.Shell.NetworkAgent/1000]: agent registered

Your help would be deeply appreciated
Thanks in advance! :smiley:

try this: add this to /etc/NetworkManager/NetworkManager.conf

[device]

wifi.scan-rand-mac-address=0


notes:

Hi, thanks for your suggestion
Tried it, rebooted, but the issue persisted

Are you using UEFI? One idea is Fastboot being enabled and not putting the wifi card in a clean state at boot.

Another is maybe the suspend type not being supported (maybe it’s Intel Rapid Start and/or only officially does s2idle and Linux does S3); in this case adding mem_sleep_default=s2idle as a kernel option could be a workaround.

I’ve also heard and experienced many odd things with Realtek wifi on Linux; did you compile a driver for that card? Some searches show a few DKMS repos and mentions about compiling on Mint implying that it isn’t natively-supported by the kernel, and in that case I’d fully go with Realtek’s driver just being odd and possibly having other workarounds.

Hi, thanks for your suggestion
I tried “s2idle” and “shallow”, both work, my wifi comes back to life correctly, but the fans stay on.
The parameter “deep” turns the fans off, but the wifi dies with this option.
Also, I didn’t compile any drivers.
I remember that a github repository (for my wifi card driver) read “if you are using a kernel version > 5.0, please use the drivers that are built in by default”
Something like that
I gonna try disabling fastboot now, thanks for your help :slight_smile:

Well, it turns out I don’t even have a fastboot option in my uefi settings