-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Low performance (fps) in perfect conditions #1977
Comments
Thanks for the detailed report. It helps a lot.
BTW, xrdp doesn't support h264 yet. Same with GFX. RFX is the best codec supported by xrdp so far. |
HI @ValdikSS , For the improvements you need GFX I think. We have some GFX branches where h264 is working but not main xrdp develop branch yet. |
is this in the context you were responding (GFX) or it does apply generally? what can happen if we recompile after changing the hardcoded value from 40ms to 10ms? can we do this safely, is the program behaviour the same or something else will be affected? what was the original reason for this value, was it chosen high enough to prevent high cpu usage? |
I tried to modify the hard-coded limitation a bit. Not sure if it would eventually work. Anyway, here is the patch file for xorgxrdp: diff --git a/module/rdpClientCon.c b/module/rdpClientCon.c
index e4e0317..4273a00 100644
--- a/module/rdpClientCon.c
+++ b/module/rdpClientCon.c
@@ -2603,8 +2603,8 @@ rdpDeferredUpdateCallback(OsTimerPtr timer, CARD32 now, pointer arg)
/******************************************************************************/
-#define MIN_MS_BETWEEN_FRAMES 40
-#define MIN_MS_TO_WAIT_FOR_MORE_UPDATES 4
+#define MIN_MS_BETWEEN_FRAMES 16
+#define MIN_MS_TO_WAIT_FOR_MORE_UPDATES 1
#define UPDATE_RETRY_TIMEOUT 200 // After this number of retries, give up and perform the capture anyway. This prevents an infinite loop.
static void
rdpScheduleDeferredUpdate(rdpClientCon *clientCon) At least it didn't crash on my computer... |
@Seas0 I've patched it and it still couldn't reach 60 FPS. testufo.com showed that the frame rate was |
There is definitely some issues like VSync and/or fresh blocking lurking around, but unfortunately I am NOT familiar enough with Linux/X11 graphic stack, so I can't pinpoint the problem right now, especially without any Log/extra info. With this patch applied on my settings I suspect the real FPS is around 40~50 on my iPad with occasional frame-dropping. Also notice that your connection quality shall contribute to actual performance. |
It was performant enough (using GPU-accelerated xrdp) to render 60 FPS and they were in a local network under the same home router. It might be a limitation imposed by the protocol (RDP) itself.. Not sure though. I've found this MSDN documentation:
|
Hmm, seems a possible reason. Would investigate if I can spare some time. |
Also could you try to lower the color depth to 16 or 15 bits? |
When I tried
|
There were several issues regarding xrdp performance (#1600, #386), but none of the recommendations and workarounds helped me.
I'm testing xrdp in a perfect network conditions and can't get good performance.
Server configuration: Debian 11 with xrdp 0.9.15-1 (xorgxrdp 0.2.15-1) in a VM, openbox session.
Client 1 configuration: Fedora 34 over virtual VM network (~localhost) with freerdp 2.3.2 (manually recompiled with h264 support)
Client 2 configuration: Windows 10 with Wi-Fi connection
xrdp in xorgxrdp mode, freerdp as a client
Graphics output is capped to 25 fps. For some reason, it also introduces significant load to server's CPU (60-120%), even if just dragging window.
Enabling
/gfx:avc420
reduces CPU load a bit but does not help fps.xrdp-freerdp-xorgxrdp-2021-08-29_15.27.45_.mp4
xrdp in xvnc mode, tigervnc as a server, freerdp as a client
Noticeable tearing, especially in doom. Strange lags when dragging windows.
xrdp-freerdp-xvnc-2021-08-29_15.35.30_.mp4
tigervnc
Steady 60 fps (this video is not very smooth due to screen recording), no lags, very light CPU load (10-20%).
tigervnc-2021-08-29_15.30.42_.mp4
How to achieve better results with xorgxrdp in terms of fps? Is it possible to eliminate tearing with xvnc? Is it possible to reduce CPU load?
I've tried to change many options is xrdp.ini, neither helped the performance.
The text was updated successfully, but these errors were encountered: