Closed mansr closed 3 years ago
I am experiencing exactly the same behaviour. I blamed my very slow notebook at first, but it seems like an issue with the wifi driver.
I did a little digging, and it appears that the latency is caused by incoming packets sitting in the device for some time before being received over USB. Is there a newer (or older) version of the firmware available anywhere? There seem to exist newer driver releases from Realtek, but I can't find anywhere to download them.
I sent a message to my contact at Realtek asking him if a newer version is available. I'll let you know his response.
Meanwhile, I tracked the problem down to the driver periodically initiating a roaming scan, blocking normal communication. This trivial change makes it not do that:
diff --git a/core/rtw_mlme.c b/core/rtw_mlme.c
index 364e819f59a7..789bfde9444f 100644
--- a/core/rtw_mlme.c
+++ b/core/rtw_mlme.c
@@ -102,8 +102,7 @@ static int _rtw_init_mlme_priv(struct adapter *adapt)
pmlmepriv->roam_flags = 0
| RTW_ROAM_ON_EXPIRED
- | RTW_ROAM_ON_RESUME
- | RTW_ROAM_ACTIVE;
+ | RTW_ROAM_ON_RESUME;
pmlmepriv->roam_scanr_exp_ms = RTW_ROAM_SCAN_RESULT_EXP_MS;
pmlmepriv->roam_rssi_diff_th = RTW_ROAM_RSSI_DIFF_TH;
That leaves you with the problem that the device will not roam. For you, that might not be important, but perhaps it is for others.
My Realtek contact just came through and I just pushed v5.13.4 in a new branch. Please check that out and try it to see if Realtek fixed this.
Thanks. That version stalls in the same way only once every 30 seconds (instead of every 2 s). It's an improvement, but it's still not great.
If you do not want roaming, then change "y" to "n" in line 136 of the Makefile to disable that "feature". I hesitate to do it globally as some users might want to have roaming.
I'm fine with this as is. Will you be updating the master branch to this version?
No. The new code will remain in the v5.13.4 branch. That way users that found no problems with the master branch will have a stable source.
I'm seeing a strange behaviour with the RTL8723DU. Every 2 seconds or so, there is a huge spike in latency, easily observable with a simple ping command:
Notice how every second reply takes several hundred ms.
I have tried disabling every power management feature I could find without seeing any improvement, though I might have missed something. Any suggestions for fixing this would be appreciated.