-
-
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
Xrdp Slow #1600
Comments
Hi @gamersalpha
If you're trying to use a console login at the same time as a remote login on any version of 20.04, read this wiki page. |
Hello there, so i m on windows and i connect in rdp to my linux machine ubuntu 20.04 desktop |
Hi @gamersalpha Are you saying that just dragging Windows about on the desktop is slow? That doesn't sound like normal behaviour. What kind of network have you got between the two machines? Are they on the same LAN? Are you running wired or wireless? |
I'm having a similar issue with input lag, choppy rendering, etc. I am on the same LAN (both wired) connecting from a Windows 10 machine using Remote Desktop. What other information would be helpful? Ubuntu 20.04 |
Hi @ehaughee That sounds like a bandwidth or latency issue, or possibly packet drops. Are you running a graphically intensive application? First thing to do would be to establish the available bandwidth and latency between the server and the client, with the server sending. I can't stress enough that it's worth measuring this rather than just assuming all is OK with the link, and you're getting the advertised link speed at both ends. Measure bandwidth with iperf3. If you can it's best to stop xrdp and reuse its port to make sure packets are traversing host firewalls in the same way. So, on the server:-
On the client:-
On a wireless connection here I get around 52Mb/s from a cheap Windows laptop. That's going through two virtual routers (all on the same site). Latency (i.e. round-trip-time) can be measured by using ping from the windows side. I'm getting single-digit milliseconds. That's not a great link, but it's absolutely fine for running software development tools. Measure the actual bandwidth being used by xrdp by using 'iftop'. So once you've stopped iperf3, restarted xrdp and get a session going, you can use a command like this to look at the throughput in Mb/s :-
That'll give you a clear idea of exactly what capacity is available on the link, and what xrdp is demanding from it. |
@matt335672 thanks for the cool measuring tips! Below are my measurements. Ping from Windows --> Ubuntu
iperf output
iftop
I grabbed the highest peak number output I saw while doing the above actions. And this is iftop at rest. I just logged into the remote host and let it sit there. After about 20 seconds, I grabbed the below output.
|
Thanks for the comprehensive reply! There doesn't seem to be anything wrong with your network, so that's a good start. If I'm reading your numbers right (and I'm not entirely sure about that), you're using around 10% of the link bandwidth for the session. Depending on the round-trips needed for communication, this could be suffering from latency. I can't see anything else here which would account for it. What backend are you using? Xorg or Xvnc? Xorg can be a bit tricky to set up. If you're using it. see #1026 (comment) and try the settings there. |
I am using Xorg. I tried setting the connection speed to LAN and I already had the color depth set to 32 bit. I still see the same lag. Here is a video showing the input, rendering, and animation lag with LAN+32bit: https://www.dropbox.com/s/zzyqi4l13espvyn/input-lag.mp4?dl=0 I checked that the video (and the uploaded version played in the browser) accurately depicts the input lag I'm seeing (window lags behind the cursor) and the animation lag (clicking log out). The slowness is not an artifact of video compression. I have tested with direct access to the "remote" machine (monitor, keyboard, and mouse plugged in to the physical box) and do not see the same latencies. I have also tried changing the compositor settings in KDE Plasma based on some suggestions I saw elsewhere but saw no noticeable improvement. However, I also saw the same lag with Gnome 3. Below are my current (non-default) compositor settings: |
Hi @ehaughee Maybe the video's not doing your user experience justice, but that doesn't look entirely unexpected. The cursor is drawn locally, the mouse move is sent to the remote end and the remote end updates the screen and sends it back. That looks like a fairly high res screen you've got there to me (is it 2160p?), with a fairly nuanced backdrop. You're going to be sending a lot of data for each redraw, and that will explain the delay. You could try using a single colour backdrop for the remote session. Areas of a single colour pretty much compress to nothing, and that will reduce bandwidth and hence round-trip-times. Other than that, I can't think of anything else which would improve on that experience I'm afraid. |
The monitor is 1080p. If this is the best performance I can get from a local connection, that's fine, just wanted to make sure there wasn't something else I could do. For anyone else following along, I ended up turning off the KDE Plasma compositor (System Settings/Display and Monitor/Compositor) which helped a little but obviously disabled things like animations and transparency for the theme I was using. This is fine for my use-case but may not be for others. Thanks, @matt335672, for your help! |
After doing a lot of research, I got good performance with these settings: xfce4 Policy=UBDI sudo sysctl -w net.core.wmem_max=8388608 Disable compositor: xfconf-query -c xfwm4 -p /general/use_compositing -t bool -s false |
Hello there,
i m just installa frech install of ubuntu 20.04 and update evrything i just install
sudo apt_get install xrdp
so i can connect on my virtual machine got to issue very bad :
can u help me to fix this please
The text was updated successfully, but these errors were encountered: