The automatic disabling of a Realtek Wi-Fi adapter after rebooting Ubuntu is typically caused by the
rtw88 or
rtl8xxxu driver failing to initialize correctly due to power management conflicts or incomplete firmware loading. This issue often arises in dual-boot systems where Windows 10’s Fast Startup feature leaves the hardware in a suspended state that Linux cannot properly resume. To resolve this, you must disable Windows Fast Startup and adjust Linux kernel parameters to prevent aggressive power saving on the specific Realtek chipset.
Understanding the Root Cause
When Ubuntu fails to detect or enable the Wi-Fi adapter upon boot, the system logs usually indicate a failure in the driver initialization sequence. The most common culprit for Realtek adapters is the interaction between the kernel's power management features and the hardware's expectation of being in a fully powered-on state. If the system hibernates or if the previous operating system did not fully release control of the network interface, the driver may hang during the startup phase.
Additionally, many modern Realtek chips require specific firmware files located in
/lib/firmware. If these files are missing or corrupted, the kernel module will load but fail to bring the interface up. This is particularly prevalent with newer chipsets found in laptops manufactured after 2020. The problem is exacerbated when using dual-boot configurations, as the secondary operating system may retain exclusive access to certain hardware resources.
Disabling Windows Fast Startup
If your computer runs both Windows 10/11 and Ubuntu, the primary suspect is Windows "Fast Startup." This feature is a hybrid shutdown mode that saves the state of the kernel to disk rather than performing a full shutdown. Consequently, when you boot into Ubuntu, the Wi-Fi card remains in a suspended state from Windows, preventing the Linux driver from initializing it.
To fix this, you must perform a full shutdown from within Windows:
1. Open the
Control Panel and navigate to
Hardware and Sound.
2. Select
Power Options and click on
Choose what the power buttons do.
3. Click
Change settings that are currently unavailable to reveal administrative options.
4. Uncheck the box next to
Turn on fast startup (recommended).
5. Click
Save changes and then select
Shut down from the Start menu. Do not use Restart; you must shut down completely.
After shutting down Windows, start Ubuntu. The Wi-Fi adapter should now be detected and enabled automatically. This step resolves the majority of cases involving dual-boot setups and Realtek hardware.
Adjusting Kernel Power Management Settings
If disabling Fast Startup does not solve the issue, the problem likely lies within the Linux kernel's power management settings for the PCI Express bus or the specific Wi-Fi device. The kernel may be putting the adapter into a low-power state immediately after boot, causing it to drop connection or fail to initialize.
You can test this by modifying the GRUB configuration to pass specific parameters to the kernel at boot time. These parameters disable ASPM (Active State Power Management) for the PCIe link, which often stabilizes Realtek adapters.
1. Open a terminal and edit the GRUB configuration file:
sudo nano /etc/default/grub
2. Locate the line starting with
GRUB_CMDLINE_LINUX_DEFAULT. It usually contains quotes around text like
"quiet splash".
3. Add
pcie_aspm=off inside the quotes. For example:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash pcie_aspm=off"
4. Save the file (Ctrl+O, Enter) and exit (Ctrl+X).
5. Update GRUB to apply the changes:
sudo update-grub
6. Reboot your system. Check if the Wi-Fi adapter is active using
nmcli device status.
If this works, you have successfully stabilized the hardware interface. Note that disabling ASPM may slightly increase battery consumption on laptops, but it ensures network stability.
Updating or Reinstalling the Driver
In some cases, the default driver included in the Ubuntu kernel is outdated or buggy for your specific Realtek model. You can attempt to install the latest drivers from the official repository or compile them from source. However, before doing so, check if your system has installed the
linux-firmware package, which contains the necessary binary blobs for Realtek chips.
Ensure your firmware is up to date:
sudo apt update
sudo apt install --reinstall linux-firmware
For older or specific Realtek adapters, such as the RTL8821CE or RTL8723DE, users often need to install drivers from GitHub repositories maintained by community developers. Be cautious when installing third-party drivers, as they may break during kernel updates. Always check the compatibility of the driver with your current kernel version.
Checking BIOS/UEFI Settings
Finally, verify your BIOS/UEFI settings. Some manufacturers include options for "Wi-Fi Power Saving" or "PCIe Link State Power Management" that can interfere with Linux drivers. Navigate to your BIOS settings (usually by pressing F2, Del, or F12 during boot) and look for advanced power management options. Disable any power-saving features related to the wireless adapter or PCIe slots. Additionally, ensure that Secure Boot is either disabled or that the drivers are signed and compatible with Secure Boot, depending on your distribution's requirements.
Frequently Asked Questions
Why does my Wi-Fi work in Windows but not Ubuntu?
This discrepancy is almost always caused by Windows Fast Startup leaving the hardware in a suspended state. Linux requires a clean hardware reset to initialize devices, which a full shutdown provides but Fast Startup does not. Disabling Fast Startup in Windows resolves this conflict by ensuring the hardware is fully powered off before Linux boots.
How can I tell if my Realtek adapter is blocked by software?
Run the command
rfkill list all in the terminal. If the Wi-Fi adapter shows "Soft blocked: yes," it is disabled by software settings. You can unblock it using
sudo rfkill unblock wifi. If it shows "Hard blocked: yes," the physical switch or BIOS setting is disabling it, requiring a hardware or firmware change.
Does disabling pcie_aspm affect battery life?
Yes, disabling Active State Power Management for PCIe links can lead to increased power consumption because the system prevents the Wi-Fi card from entering low-power states during idle periods. While this stabilizes the connection, laptop users may notice reduced battery endurance. Consider reverting the change if you prioritize battery life over absolute network stability.
What should I do if the driver still fails to load after updating GRUB?
If the kernel parameter change fails, check the dmesg logs for errors related to the
rtw88 or
rtlwifi modules using
dmesg | grep -i wifi. Look for firmware loading errors. If firmware is missing, reinstall the
linux-firmware package. If the driver itself is faulty, consider compiling the latest driver from the manufacturer's GitHub repository instead of relying on the kernel default.
Can I use a USB Wi-Fi adapter as a workaround?
Yes, using an external USB Wi-Fi adapter with a chipset known to have good Linux support, such as those using the Atheros or Intel chipsets, is a reliable workaround. Many USB adapters are plug-and-play and do not suffer from the same internal hardware integration issues as built-in Realtek cards. This allows you to maintain connectivity while troubleshooting the internal adapter.