This guide fixes periodic ping spikes (100ms+) on Linux, specifically targeting Realtek cards (like RTL8852BE) that struggle with WiFi 6 (802.11ax) or aggressive power saving.
Identify your interface name (e.g., wlo1) and driver:
ip link show
lspci -nnk | grep -iA3 netReplace <YOUR_INTERFACE> below with your actual interface name.
Prevents the OS from putting the card to sleep during inactivity.
-
Create config file:
sudo tee /etc/NetworkManager/conf.d/wifi-powersave.conf <<EOF [connection] wifi.powersave=2 EOF
(Note:
2means "Disable Power Save") -
Apply immediately:
sudo iw dev <YOUR_INTERFACE> set power_save off
Disables hardware-level sleep (ASPM) and forces WiFi 5 (AC) mode, as WiFi 6 implementation on these drivers is often unstable.
-
Create driver options file:
sudo tee /etc/modprobe.d/rtw89.conf <<EOF options rtw89_core disable_ps_mode=Y disable_11ax=Y options rtw89_pci disable_aspm_l1=Y disable_aspm_l1ss=Y EOF
Note:
disable_11ax=Yturns off WiFi 6, which cures the micro-stutters. -
Reboot your system.
If you have a Mesh system or many routers nearby, this stops the card from scanning for "better" signals in the background.
-
Find your router's BSSID (MAC Address):
nmcli -f IN-USE,SSID,BSSID dev wifi
(Copy the BSSID from the line with the
*) -
Lock the connection:
nmcli connection modify "YOUR_WIFI_SSID" 802-11-wireless.bssid "YOUR_BSSID_HERE"
After rebooting:
-
Check Power Save is OFF:
iw dev <YOUR_INTERFACE> get power_save # Output should be: Power save: off
-
Check WiFi 6 is OFF:
iw dev <YOUR_INTERFACE> link # "tx bitrate" should say VHT (WiFi 5), not HE (WiFi 6)
-
Check Driver Options:
cat /sys/module/rtw89_core/parameters/disable_11ax # Output should be: Y
wifi.powersave=2: Stops OS from requesting sleep.disable_11ax=Y: Forces card to use WiFi 5 (AC). Realtek's WiFi 6 (AX) stack often buffers packets, causing spikes.disable_aspm_l1/l1ss: Prevents PCIe lane from powering down (fixes "waking up" lag).- BSSID Lock: Prevents background roaming scans.
Just what I was looking for!
Helped me out a ton! Thank you very much for this!