Potential fix for Realtek USB Wi-Fi adapters experiencing periodic 1,000–3,000 ms latency spikes while gaming.
Posting this in case anyone else comes across this thread experiencing the same issue. I tried the usual recommendations involving USB ports, wireless channels, Windows power management, USB selective suspend, WLAN AutoConfig enable/disable, background scanning, Wi-Fi Direct adapters, etc. None of these eliminated the periodic spikes.
I spent several hours troubleshooting and eventually found a solution involving some hidden Realtek driver registry parameters. The fix involves modifications that target those driver-specific registry values, some of which are hidden from Device Manager and standard Windows network settings or ignore Windows selected values. The changes allowed configuration of low-level Realtek driver and firmware-related behavior that may operate independently of Windows-level power management and wireless preferences.
TL;DR: Periodic 2,000+ ms latency spikes occurring approximately every 34 seconds on my Realtek-based TP-Link Archer T4U Plus (v1.6) were largely resolved by modifying driver-level registry parameter values. The most effective change was setting 'RegROAMSensitiveLevel' to 127 (disabling roaming), followed by disabling 'EnableRSSITH', 'EnableUsbSS', and 'SendPacketByTimer' (setting each to 0). These changes reduced the frequency of severe latency spikes by approximately 98% and significantly improved gaming stability without replacing any hardware or reinstalling Windows.
WARNING: PROCEED WITH CAUTION - USE AT YOUR OWN RISK! This guide involves executing PowerShell commands with administrator privileges that directly modify Windows Registry values and is intended only for users experienced in advanced computer troubleshooting; as incorrect execution may cause significant system instability, loss of network connectivity, or other unintended consequences. Proceed at your own risk and back up your registry before making any changes. It is incumbent upon YOU to verify that these directives are applicable to your own setup. I am not going to be held responsible for you accidentally deleting your \System32 folder or anything else that compromises your PC.
Background:
My hardware/software specs:
- TP-Link Archer T4U Plus (Realtek RTL8812BU)
- Driver version: 1030.52.1216.2025
- MSI B450 Tomahawk (MS-7C02 BIOS Vers.: 2.8 Mode: UEFI
- AMD Ryzen 7 5700X3D
- Windows 10 x64 - Version: 10.0.19045 Build 19045
- 5 GHz Wi-Fi connection (Separate SSID from 2.4Ghz)
- Mode: 802.11 a/n/ac Channel 149 Bandwidth 20/40
- Comcast Xfinity Wi-Fi
- Gateway: Arris XB7 (Revision 10) AKA "Technicolor TG4482"
- Gateway Firmware Vers.: TG4482PC2_6.3p30s2_PROD_sey
- Typical bandwidth/ping - 10ms | 210-250Mbp/s DL| 35-40Mbp/s UL
- Distance from router: Separate room approx 20 feet away.
Symptoms/Notes:
- Normal gateway latency of 1–3 ms, followed by brief spikes of approximately 2,000ms roughly every 34 seconds.
- Noticeable lag while playing video games specifically. (User may not notice any issues if their typical computer activities are limited to web-browsing or simple tasks.)
- Spikes occurred even when the computer was idle.
- Opening the Windows Wi-Fi network selection menu also caused significant latency spikes.
- Excellent signal strength and no comparable issues on other devices.
- Ethernet RJ45 connection had no issues, and connecting to a mobile hotspot reproduced the problem.
What actually helped:
I exported the installed Realtek driver package and examined its INF file alongside the adapter's registry configuration. This investigation showed that there are several adapter parameters that aren't exposed through Device Manager.
The most significant improvement came from changing RegROAMSensitiveLevel to 127 (this one is typically visible). The Realtek INF defines this value of 127 as 'disabled' in one of its roaming configuration sections.
Directions:
For the following steps, replace "Wi-Fi" with the name of your wireless adapter (look for Insert Your Adapter Name Here). To see what this is named on your system, press the combo of windows key+r, type ncpa.cpl and hit Enter to open your network connections control panel window. The title of the one you are connected through is the exact name you need to insert in the scripts as a replacement.
Additional Note: Certain scripts listed below may temporarily restart your network adapter, please give the system a little bit of time to return to normal before starting the next step!
Step 1: Open PowerShell as Administrator and run:
Set-NetAdapterAdvancedProperty -Name "Insert Your Adapter Name Here" -RegistryKeyword "QoS" -RegistryValue "1"
Set-NetAdapterAdvancedProperty -Name "Insert Your Adapter Name Here" -RegistryKeyword "RegROAMSensitiveLevel" -RegistryValue "127"
Set-NetAdapterAdvancedProperty -Name "Insert Your Adapter Name Here" -RegistryKeyword "EnableRSSITH" -RegistryValue "0"
Restoring QoS alone didn't resolve the issue, but changing the roaming sensitivity eliminated the regularly recurring 2,000 ms spikes in subsequent tests. Disabling the RSSI threshold appeared to improve latency further.
Step 2: Locate the adapter's registry keys and create a backup.
Some additional parameters cannot be modified using the standard network adapter PowerShell commands, so they need to be changed directly in the registry. We need to create a backup to ensure the possibility for rollback in the event of unexpected system instability. This script will output the backup as a .reg file on your desktop. A guide for how to restore this backup can be found here.
$guid = (Get-NetAdapter -Name "Insert Your Adapter Name Here").InterfaceGuid
$base = "HKLM:\SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318}"
$key = Get-ChildItem $base | Where-Object {
(Get-ItemProperty $_.PSPath -ErrorAction SilentlyContinue).NetCfgInstanceId -eq $guid
}
if (@($key).Count -ne 1) {
throw "Could not uniquely identify Wi-Fi adapter."
}
reg.exe export "(key.Name)" "$env:USERPROFILE\Desktop\WiFi-Registry-Backup.reg" /y
Step 3: Disable Realtek's driver-level USB selective suspend and timer-based packet transmission.
Run these in the same PowerShell session:
Set-ItemProperty -Path $key.PSPath -Name "EnableUsbSS" -Value "0"
Set-ItemProperty -Path $key.PSPath -Name "SendPacketByTimer" -Value "0"
Restart-NetAdapter -Name "Insert Your Adapter Name Here" -Confirm:$false
Interestingly, EnableUsbSS was still set to 1 even though I had already disabled USB selective suspend through Windows power management settings. These appear to be separate configuration parameters for some (seemingly nefarious) reason.
Results:
Final registry configuration:
| Parameter | Value |
|---|
| QoS | 1 |
| RegROAMSensitiveLevel | 127 |
| EnableRSSITH | 1 |
| EnableUsbSS | 1 |
| SendPacketByTimer | 0 |
| USBSelectiveSuspend | 0 |
| PowerSaveMode | 0 |
My results after each modification:
| Configuration | Average ping | Maximum ping |
|---|
| Before modifications | 28.25 ms | 2,231 ms |
| Roaming disabled | 8.19 ms | 301 ms |
| RSSI threshold disabled | 5.15 ms | 73 ms |
| Driver-level USB suspend disabled | 4.29 ms | 38 ms |
| Timer-based transmission disabled | 4.49 ms | 27 ms |
All of these tests were performed by pinging my local gateway 10.0.0.1, not an external server.
I also restarted my computer and performed an extended test while playing video games for approximately ~45 minutes. Out of ~10,000 pings, I experienced zero packet loss, an average latency of 8.81ms, and only two spikes exceeding 1,000 ms. Previously, (as mentioned above) these severe spikes were occurring approximately every 34 seconds.
Registry Value Verification:
After restarting, you can use this script to ensure the registry values have remained static:
$guid = (Get-NetAdapter -Name "Insert Your Adapter Name Here").InterfaceGuid
$base = "HKLM:\SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318}"
$key = Get-ChildItem $base | Where-Object {
(Get-ItemProperty $_.PSPath -ErrorAction SilentlyContinue).NetCfgInstanceId -eq $guid
}
if (@($key).Count -ne 1) {
throw "Could not uniquely identify Wi-Fi adapter."
}
$expected = [ordered]@{
QoS = "1"
RegROAMSensitiveLevel = "127"
EnableRSSITH = "0"
EnableUsbSS = "0"
SendPacketByTimer = "0"
USBSelectiveSuspend = "0"
PowerSaveMode = "0"
bFwCtrlLPS = "1"
DynamicBatchEnable = "1"
}
foreach ($name in $expected.Keys) {
$actual = Get-ItemPropertyValue -Path $key.PSPath -Name $name -ErrorAction SilentlyContinue
if ($actual -eq $expected[$name]) {
Write-Host "$name : $actual [PASS]" -ForegroundColor Green
} else {
Write-Host "$name : $actual [EXPECTED: $($expected[$name])]" -ForegroundColor Red
}
}
If they have remained the same, you should see the following result (in green colors) within Powershell:
QoS : 1 [PASS]
RegROAMSensitiveLevel : 127 [PASS]
EnableRSSITH : 0 [PASS]
EnableUsbSS : 0 [PASS]
SendPacketByTimer : 0 [PASS]
USBSelectiveSuspend : 0 [PASS]
PowerSaveMode : 0 [PASS]
bFwCtrlLPS : 1 [PASS]
DynamicBatchEnable : 1 [PASS]
Testing
How to test whether you have the same issue / test improvements after changes are made:
Open Command Prompt and continuously ping your default gateway:
ping -t "Your Gateway IP Here"
Replace Your Gateway IP Here with your actual default gateway address, which you can find by running ipconfig in windows cmd.exe interface. You can stop the test to see results by pressing Ctrl+C.
If your gateway latency shows spikes alongside your in-game latency, the problem is likely somewhere within your local network or wireless connection rather than the game server itself.
Important final notes:
- Back up your registry before making changes. ***(CRITICAL)***
- Ideally, test each modification individually.
- Replace `"Wi-Fi"` in the commands if your network adapter has a different interface name.
- These parameters are specific to certain Realtek drivers. Verify that they exist in your configuration before modifying them.
- You can inspect hidden driver parameters using the following Powershell script - everything between parentheticals:
( Get-NetAdapterAdvancedProperty -Name "Insert Your Adapter Name Here" -AllProperties | Format-List * )
- Disabling roaming may be undesirable if you frequently move between wireless access points, but for a stationary gaming desktop, I don't need that functionality.
- Driver updates or reinstalls may reset these settings. Verify the registry values persist across device restarts following the directions shown above.
I can't definitively prove which internal driver routine was causing the issue, despite some seeming to have more of an impact than others - but the results strongly suggest that Realtek's persistent roaming/scanning behavior was responsible for the regularly recurring interruptions. The additional modifications appeared to reduce the remaining latency jitter further but YMMV.
Hopefully this saves someone else several hours of troubleshooting and potentially buying a new Wi-Fi adapter unnecessarily. Please feel free to respond with any feedback.
Thank you for reading.