Skip to content
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

Xvnc faster (less laggy) than x11rdp/Xorg drivers #386

Closed
nktl opened this issue Jun 16, 2016 · 23 comments
Closed

Xvnc faster (less laggy) than x11rdp/Xorg drivers #386

nktl opened this issue Jun 16, 2016 · 23 comments

Comments

@nktl
Copy link

nktl commented Jun 16, 2016

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.

@metalefty
Copy link
Member

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.

@nktl
Copy link
Author

nktl commented Jun 17, 2016

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.

@metalefty
Copy link
Member

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

@nktl
Copy link
Author

nktl commented Jun 23, 2016

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

@bolkedebruin
Copy link
Contributor

@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.

@johnarnold
Copy link

johnarnold commented Mar 21, 2017

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.

@johnarnold
Copy link

johnarnold commented Mar 21, 2017

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.

@johnarnold
Copy link

johnarnold commented Mar 21, 2017

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
...

@coolemza
Copy link

coolemza commented Oct 22, 2017

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

@kaysond
Copy link

kaysond commented Dec 15, 2017

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)

@trytone
Copy link

trytone commented Jun 26, 2018

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!

@overpod
Copy link

overpod commented Aug 22, 2018

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

@mailinglists35
Copy link

mailinglists35 commented Oct 25, 2018

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"

@mailinglists35
Copy link

mailinglists35 commented 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

@mailinglists35
Copy link

mailinglists35 commented Oct 25, 2018

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

@mailinglists35
Copy link

mailinglists35 commented Oct 25, 2018

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

@myset
Copy link

myset commented Apr 3, 2020

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

@Bartolomejka
Copy link

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.

@wsdookadr
Copy link

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.

Truly a hidden gem

@metalefty
Copy link
Member

Note: using Xvnc is not a silver bullet, Xvnc is not always faster than Xorg driver. Sometimes Xorg driver is faster, sometimes Xvnc is faster. It depends on the graphic type to show. The only fact is Xvnc is faster FOR YOU. Xorg driver might be faster for someone else.

@metalefty
Copy link
Member

Let's turn back to the original topic, "Xvnc faster (less laggy) than x11rdp/Xorg drivers"It depends on the use case but some causes that Xorg driver is slower are already fied, for example in neutrinolabs/xorgxrdp#94.

Any further reports should be posted with using the latest version. Not with outdated versions.

@wsdookadr
Copy link

wsdookadr commented Oct 28, 2021

@metalefty you're right. I did more than Xvnc in the above setting. I also bought a wifi adapter, specifically AC1300 TP-Link Archer T4U, had to change my router as well, now things are moving well.
iptraf reveals that RDP traffic is quite big, there's quite a bit of that going on, and the wifi adapter, as well as router need to support that kind of traffic. I found problematic that even some of the newer laptops come with low performance wifi built-in.
I think a note to users in the documentation of xrdp would be helpful here.

@apivovarov
Copy link

Xvnc (tigervnc-server) has an annoying bug - it does not support Input Language change in GNOME.
It ignores the selection of the input language and keyboard always prints in English.

Affected distros are RHEL, Alma, Fedora, CentOS, Rocky. For some reason they have [Xorg] session type commented out in xrdp.ini.

Ubuntu 22.04 and Debian 11 work fine - they have both [Xorg] and [Xvnc] sessions types enabled in xrdp.ini and [Xorg] is the default

Related Links and The Solution to the issue:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests