Opening your laptop lid or waking your Ubuntu desktop from sleep only to discover that your network menu reports ‘No Wi-Fi Adapter Found’ or ‘Wi-Fi is disabled’ completely severs internet connectivity. Before suspending, your wireless network functioned perfectly; yet after waking, the operating system treats your physical wireless card as if it was unplugged.
This persistent waking glitch predominantly stems from PCIe power management daemons failing to re-energise the wireless chipset upon resume, aggressive TLP/laptop-mode power-saving scripts, or proprietary wireless kernel modules (such as Broadcom, Realtek, or Intel wireless drivers) crashing during D3-hot power state transitions. Following this tutorial will restore reliable Wi-Fi recovery upon waking.
Identify and Reload the Active Wireless Kernel Module
When Ubuntu resumes from suspension, kernel modules responsible for communicating with your wireless chip can become trapped in a hung state. Unloading and reloading the kernel driver restores communication without needing a system reboot.
- Open your terminal and identify the kernel module handling your wireless hardware:
lspci -knn | grep -iA 3 net - Inspect the line reading Kernel driver in use: (common module names include
iwlwifi,r8822ce,rtl8821ce, orath9k). - Unload the stalled kernel driver:
sudo modprobe -r iwlwifi
(Substitute iwlwifi with your actual kernel driver name). - Reload the driver into kernel space:
sudo modprobe iwlwifi - Restart NetworkManager to re-scan for available wireless SSIDs:
sudo systemctl restart NetworkManager
Disable Wi-Fi Power Management Throttling
Ubuntu includes default wireless power-saving policies that instruct the wireless card to power down during idle periods. In many chipsets, power save causes sleep-wake state failures.
- Open the default NetworkManager configuration in a text editor:
sudo nano /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf - Locate the
wifi.powersavedirective. By default, it is typically set to3(enabled). - Change the value to
2(which explicitly disables wireless power saving):wifi.powersave = 2 - Save the file by pressing Ctrl + O and exit via Ctrl + X.
- Restart NetworkManager:
sudo systemctl restart NetworkManager
Create an Automated Systemd Resume Hook
If your specific wireless card consistently fails to re-energise upon wake, creating a dedicated systemd suspend script automates the driver reload handshake upon every resume event.
- Create a fresh resume script in systemd sleep directory:
sudo nano /lib/systemd/system-sleep/wifi-resume.sh - Paste the following bash script structure into the file:
#!/bin/sh case "$1/$2" in post/*) modprobe -r iwlwifi sleep 1 modprobe iwlwifi systemctl restart NetworkManager ;; esac
(Ensure you replace iwlwifi with your system specific driver name). - Save the file and grant it executable permissions:
sudo chmod +x /lib/systemd/system-sleep/wifi-resume.sh - Test your setup by putting your laptop to sleep and waking it; your wireless card will now reinitialise automatically upon wake.