OPINIONATED OMARCHY
TROUBLESHOOTING CORPUS
790
RECORDS
790
AUDITED
0
UNCHECKED
2388
SOURCES
LIVE
network high common DISPUTE

Recover a Realtek RTL8852BE that wedges after suspend

archomarchyendeavouroscachyoslaptopwayland
CORRECTED An auditor found the fix wrong or incomplete and rewrote it.
AUDIT NOTE

Diagnosis, PCI ID 10ec:b852 and the sleep-hook module list are correct. The bug is in the second block: the already-wedged recovery uses a *shorter* module list (rtw89_8852be rtw89_pci rtw89_core) than the sleep hook. On kernels 6.9+ rtw89_8852b and rtw89_8852b_common are also loaded and hold a reference on rtw89_core, so modprobe -r rtw89_core fails with 'Module rtw89_core is in use' and the recovery silently does nothing.

The cause above was not rewritten and may still contain the error described. The fix below is the corrected version.
RISK

Unloading the Wi-Fi stack drops any active connection. Do not run the manual modprobe -r sequence over SSH on Wi-Fi, because you will disconnect yourself.

Symptom

Closing and reopening the lid kills Wi-Fi until reboot. omarchy-restart-wifi / rfkill unblock wifi do nothing. Kernel log on resume:


rtw89_8852be 0000:02:00.0: failed to write DBI register, addr=0xB48
rtw89_8852be 0000:02:00.0: failed to read PCI cap, ret=134
rtw89_8852be 0000:02:00.0: xtal si not ready(W): offset=90 val=10 mask=10
rtw89_8852be 0000:02:00.0: mac preinit fail, ret: -110

followed by wpa_supplicant: Could not set interface wlp2s0 flags (UP): Connection timed out.

Cause

The rtw89 resume path leaves the RTL8852BE PHY wedged on s2idle systems. Userspace tools like rfkill unblock / nmcli radio wifi on operate a layer above the dead PHY, so they cannot recover it. The usual rtw89_pci workaround module options (disable_clkreq=y disable_aspm_l1=y disable_aspm_l1ss=y) do not help.

Fix

Recover an already-wedged machine with the same full module list the sleep hook uses:


lsmod | grep rtw89          # see what is actually loaded
sudo modprobe -r rtw89_8852be rtw89_8852b rtw89_8852b_common rtw89_pci rtw89_core
lsmod | grep rtw89          # must now be empty
sudo modprobe rtw89_8852be
sudo systemctl restart NetworkManager

The sleep hook itself is fine as written. Add exit 0 at the end so a failed modprobe -r never returns non-zero into the sleep pipeline.

Verify

lspci -n | grep 10ec:b852 confirms the chip. Close and reopen the lid. ip link show lists the wireless interface UP and it reassociates without a reboot.

Sources

rtw89-rtl8852be-dead-after-s2idle