Xrdp: Xvnc faster (less laggy) than x11rdp/Xorg drivers

Created on 16 Jun 2016  路  18Comments  路  Source: neutrinolabs/xrdp

Hi,

I have been testing xrdp and it is a great piece of software. In order to make experience better, I built x11rdp binary as well as Xorg drivers (all using RH-Matic).

The problem is that when using Xvnc dekstop reacts almost instantly - there is virtually no lag.
However, when using both x11rdp and Xorg driver the experience is slightly worse. The difference is tiny (we are talking about something like 50ms vs 100ms latency) but you can clearly feel it.

This is quite surprising, as Xorg drivers (or x11rdp - which actually is even slower, but it i based on older source, so I suppose it is understandable) are supposed to be 'native' and provide superior experience, witn no VNC overhead, etc.

Is this normal or am I doing something wrong?

OS: RHEL 7.2, xrdp with drivers/x11rdp build from RH-Matic (tried both master and devel), Xvnc TigerVNC 1.3.1.

Most helpful comment

Any update on this? I'm getting poor performance on xorg (though I haven't tried anything else; definitely way worse than native rdp on windows)

All 18 comments

When you feel slow, can you see the log like this in Xorg.*.log?

[903647.103] rdpDeferredUpdateCallback: reschedual rect_id 154481 rect_id_ack 154480
[903647.145] rdpDeferredUpdateCallback: reschedual rect_id 154481 rect_id_ack 154480

xorgxrdp and x11rdp are sometimes slow and sometimes fast. It's slow during above logs are dumped.
I think this may a bug of xorgxrdp/x11rdp.

Correct, this is what I am observing @metalefty

When this slight lag occurs (well, pretty much all the time), I am seeing a log of messages like the following one on the console:

rdpDeferredUpdateCallback: reschedual rect_id 318 rect_id_ack 317

The message is not there when using Xvnc (although I am not sure if this would even be visible in the log, due to different back-end).

Very quick test to replicate it (at least with my setup) is to click 'start' button in KDE 4 (vanilla RHEL 7.2, with "yum install @kde") - the menu appears virtually instantly with Xvnc, but with Xorg there is 200ms or so lag (with "rdpDeferredUpdateCallback" message in the log every time: usually it is just a single entry, but sometimes more - which introduces even more lag).

I would love to use xorgxrdp (better scaling, etc), but currently Xvnc delivers visibly better user experience with my setup. Any idea what the problem could be? I am happy to test this further.

In addition, you see high CPU consumption of xrdp process and high network bandwidth consumption during the slight lag, right? At least I see that.

I haven't clarified what the actual problem is however increasing log level may help us. I added the option --xorgxrdpdebug to RH-Matic in develop branch. Rerun RH-Matic with --xorgxrdpdebug and let's see ~/.local/share/xorg/Xorg.*.log

Thank you, attaching the log from a short session that has this problem.

Not entirely sure about network/CPU - it generally hoovers around 10-15% at periods of intense activity.
Xorg.17.txt

@metalefty were you able to track this down? We are in the same situation: we would like to use Xorg but cant because users find it unacceptable due to the lag.

Ping for update. I moved from xrdp 0.6.1-2 +Xvnc to 0.9.1-7 +Xorg on Ubuntu 16.04 and there's significantly more latency.

Also, I just tested setting /etc/xrdp/xrdp.ini:
autorun=Xvnc

(force Xvnc instead of Xorg, which is the default first option). Performace is better.

How do you turn on Xorg debug logging to Xorg.*.log?

*edit: nevermind. Found it under ~/.local/share/xorg

I have the same logs as above:

[2756639.255] rdpDeferredUpdateCallback: reschedule rect_id 823656 rect_id_ack 823655
[2756639.295] rdpDeferredUpdateCallback: reschedule rect_id 823656 rect_id_ack 823655
[2756639.335] rdpDeferredUpdateCallback: reschedule rect_id 823656 rect_id_ack 823655
[2756639.375] rdpDeferredUpdateCallback: reschedule rect_id 823656 rect_id_ack 823655
...

u can use alternative rdp client in windows, like mRemoteNG and set 256 color mode, in this case performace will be better

Any update on this? I'm getting poor performance on xorg (though I haven't tried anything else; definitely way worse than native rdp on windows)

I also confirm problem using build-in Windows 8.1 and Windows 10 RDP clients. Lag was about 1-2 seconds. mRemoteNG with 256 color mode ( Appearance bar ) works like a charm. No lags anymore. Thanks a lot @coolemza!

I also confirm problem using build-in Windows 10 RDP clients

is there any workaround that does not require user to recompile from source? "mRemoteNG with 256 color mode" does not make any improvement for me.

I asked also in neutrinolabs/xorgxrdp but as a kind response "@neutrinolabs locked and limited conversation to collaborators Oct 25, 2018"

FWIW, I noticed this lag straight from login window.
To reproduce:

Create multiple sessions in xrdp.ini
Open the session selection drop-down menu.
Move the mouse quickly over items. They will highlight with lag.

config https://pastebin.com/A0hJ7GdH https://pastebin.com/ha69thCZ
logs https://pastebin.com/kMyBZhXq

video in action (240 fps slow motion) https://youtu.be/2UzpAEa_UUM

using remmina with default settings (no channels enabled on client, connection type "fast") gives instant mouse highlight movement over login dropdown menu, but once logged in is laggy again. reducing colors to 256 make only a small difference and the lag is still annoying.

so I think there are two distinct issues, one with first connection screen, second with xrdp.

note that on login window there is no cpu spike, but on session afterwards I get high cpu from both xrdp and Xorg processes.

video https://youtu.be/zFfrmsBUjbQ

also xfreerdp client does seem to have a smaller lag but it is still annoying.

it's nowhere near turbovnc client connected to tigervnc server or remmina/xfreerdp/native windows rdp client connected to m$ servers

In my case on Ubuntu 18.04.04 is very fast (90% form console performance) on xorg X11 and laggy on VNC (tigervnc-standalone-server).
I'm using xrdp-0.9.5-2 x64

In case of Ubuntu Remmina connecting to Ubuntu xrdp use RemoteFX in Colordepth field in properties. In case of GFX RFX, it is laggy probably because its implementation in xrdp (0.9.5) is not final. It is similar in Windows Remote Desktop Client connecting to xrdp, but here I don't know how to force it. But if I use the highest bandwidth in the menu, the performance is OK so it is probably not using the GFX RFX variant. Just to mention, if I am not doing it this way, than the clients are always taking 2Mbit/s of network traffic even if they are minimized.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Rubarius picture Rubarius  路  5Comments

Kaydub00 picture Kaydub00  路  8Comments

Jay991 picture Jay991  路  6Comments

sblack1969 picture sblack1969  路  7Comments

fpemud picture fpemud  路  8Comments