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

xrdp is slow if compare with Windows Server or NoMachine #2506

Closed
thenik opened this issue Jan 18, 2023 · 14 comments
Closed

xrdp is slow if compare with Windows Server or NoMachine #2506

thenik opened this issue Jan 18, 2023 · 14 comments

Comments

@thenik
Copy link

thenik commented Jan 18, 2023

Hello,

Many thanks for your great solution. It works really good and I like it!
But I got performance issue with xrdp on vps servers/ ubuntu.

I purchased 2 vps servers and tried to installed xrdp + xfce and got the same performance issues ,
1st server is slow enought, but 4 cores + 8RAM
2nd has higher CPU + 16 RAM,
they have good network, ping is ok, more over I had the same problems with xrdp in the past even on local servers.
I always got windows redrawing performarce issues.

server - os linux \ ubuntu 22.04 LTS
How I installed, it is really simple

apt install xfce4 xfce4-goodies xorg dbus-x11 x11-xserver-utils
apt install xrdp

_I tried to play with xrdp.ini ,

  • adjusted compression , set to NONE,
  • changed max_bbp
    yes it halped but without dramatic changes._

Client - ubuntu 22.04 via xfreerdp from console
I connect to server via xrdp from ubuntu
xfreerdp /v:ip:port -compression -wallpaper /w:1366 /u:user /f /p:pwd /rfx /gfx +glyph-cache /timeout:20000 /jpeg

I tried all variants (from my opinion) how to connect to xrdp server but they give worst results.

Comparison with windows server
When I install windows server on the same vpsI see RDP works nice and performance is OK,
it is possible to develop on that machine.

Comparison with ubuntu/nomachine
When I install nomachine I see that performance is similar to windows RDP (maybea little slower)
but it good and it is possible to work this way.

Question
What I do wrong with xrdp setup?
My Idea that maybe some codecs / drivers were not installed at vps server and it works so slow.
Any idea how to adjust performance?

@matt335672
Copy link
Member

@thenik - the best you can do at the moment is make sure RFX is enabled in the client. See #2136 for how to do this from Windows 10.

We're currently working on a solution based on GFX but it isn't there yet. See #1422 and neutrinolabs/librfxcodec#52 for more information.

@thenik
Copy link
Author

thenik commented Jan 18, 2023

@thenik I do not use windows because I use ubuntu 22.04 in the client.

Here is parapeters that I use for running RDP session form ubuntu (you can find that rfx is enabled ).
xfreerdp /v:ip:port -compression -wallpaper /w:1366 /u:user /f /p:pwd /rfx /gfx +glyph-cache /timeout:20000

@matt335672
Copy link
Member

If you've got RFX enabled, that's the best you can do at the moment.

I'm assuming you're using the Xorg backend(?)

@thenik
Copy link
Author

thenik commented Jan 18, 2023

@matt335672 not sure =) here is of list of comands that I used for setup XRDP

apt install xfce4 xfce4-goodies xorg dbus-x11 x11-xserver-utils
apt install xrdp

@matt335672
Copy link
Member

When you log in automatically, xrdp will pick the first section you have in your xrdp.ini file to select the X server.

The xrdp-sesman.log will tell you whether Xorg or Xvnc is being run for the session.

@thenik
Copy link
Author

thenik commented Jan 18, 2023

log

[20230116-05:06:58] [INFO ] Found X server running at /tmp/.X11-unix/X10
[20230116-05:06:58] [INFO ] Starting the xrdp channel server for display 10
[20230116-05:06:58] [INFO ] Found X server running at /tmp/.X11-unix/X10
[20230116-05:06:58] [INFO ] Session started successfully for user root on display 10
[20230116-05:06:58] [INFO ] Starting the default window manager on display 10: /etc/xrdp/startwm.sh
[20230116-05:06:58] [INFO ] Session in progress on display 10, waiting until the window manager (pid 24735) exits to end the session
[20230116-05:07:54] [INFO ] Socket 8: AF_INET6 connection received from ::ffff:127.0.0.1 port 58432
[20230116-05:07:54] [INFO ] ++ reconnected session: username root, display :10.0, session_pid 24734, ip ::ffff:212.58.119.202:3596 - socket: 12
[20230116-05:07:54] [INFO ] Starting session reconnection script on display 10: /etc/xrdp/reconnectwm.sh
[20230116-05:07:54] [ERROR] sesman_data_in: scp_process_msg failed
[20230116-05:07:54] [ERROR] sesman_main_loop: trans_check_wait_objs failed, removing trans
[20230116-05:23:54] [INFO ] Socket 8: AF_INET6 connection received from ::ffff:127.0.0.1 port 58434
[20230116-05:23:54] [INFO ] ++ reconnected session: username root, display :10.0, session_pid 24734, ip ::ffff:212.58.119.202:3832 - socket: 12
[20230116-05:23:54] [INFO ] Starting session reconnection script on display 10: /etc/xrdp/reconnectwm.sh
[20230116-05:23:54] [ERROR] sesman_data_in: scp_process_msg failed
[20230116-05:23:54] [ERROR] sesman_main_loop: trans_check_wait_objs failed, removing trans
[20230116-05:34:53] [INFO ] Socket 8: AF_INET6 connection received from ::ffff:127.0.0.1 port 58436
[20230116-05:34:54] [INFO ] ++ reconnected session: username root, display :10.0, session_pid 24734, ip ::ffff:212.58.119.202:3713 - socket: 12
[20230116-05:34:54] [ERROR] sesman_data_in: scp_process_msg failed
[20230116-05:34:54] [INFO ] Starting session reconnection script on display 10: /etc/xrdp/reconnectwm.sh
[20230116-05:34:54] [ERROR] sesman_main_loop: trans_check_wait_objs failed, removing trans
[20230116-05:35:31] [INFO ] Socket 8: AF_INET6 connection received from ::ffff:127.0.0.1 port 58438
[20230116-05:35:31] [INFO ] ++ reconnected session: username root, display :10.0, session_pid 24734, ip ::ffff:212.58.119.202:3729 - socket: 12
[20230116-05:35:31] [ERROR] sesman_data_in: scp_process_msg failed
[20230116-05:35:31] [INFO ] Starting session reconnection script on display 10: /etc/xrdp/reconnectwm.sh
[20230116-05:35:31] [ERROR] sesman_main_loop: trans_check_wait_objs failed, removing trans
[20230116-05:37:21] [INFO ] Socket 8: AF_INET6 connection received from ::ffff:127.0.0.1 port 58440
[20230116-05:37:21] [INFO ] ++ reconnected session: username root, display :10.0, session_pid 24734, ip ::ffff:212.58.119.202:3795 - socket: 12
[20230116-05:37:21] [ERROR] sesman_data_in: scp_process_msg failed
[20230116-05:37:21] [ERROR] sesman_main_loop: trans_check_wait_objs failed, removing trans
[20230116-05:37:21] [INFO ] Starting session reconnection script on display 10: /etc/xrdp/reconnectwm.sh
[20230118-17:23:11] [INFO ] Socket 8: AF_INET6 connection received from ::ffff:127.0.0.1 port 58442
[20230118-17:23:11] [INFO ] ++ reconnected session: username root, display :10.0, session_pid 24734, ip ::ffff:212.58.119.202:3816 - socket: 12
[20230118-17:23:11] [ERROR] sesman_data_in: scp_process_msg failed
[20230118-17:23:11] [INFO ] Starting session reconnection script on display 10: /etc/xrdp/reconnectwm.sh
[20230118-17:23:11] [ERROR] sesman_main_loop: trans_check_wait_objs failed, removing trans

@matt335672
Copy link
Member

That's not got the info in it. When the session is created the log contains details of the X server. When you reconnect this isn't logged.

@thenik
Copy link
Author

thenik commented Jan 19, 2023

Any ideas where to find that ? I can share server ip login pwd =)

@matt335672
Copy link
Member

Log out of xrdp (rather than disconnecting) and log in again :-)

@thenik
Copy link
Author

thenik commented Jan 19, 2023

yes, I found , looks like that it is XORG

20230119-11:04:28] [INFO ] Terminal Server Users group is disabled, allowing authentication
[20230119-11:04:28] [INFO ] ++ created session (access granted): username root, ip ::ffff:212.58.119.202:3750 - socket: 12
[20230119-11:04:28] [INFO ] starting Xorg session...
[20230119-11:04:28] [INFO ] Starting session: session_pid 539, display :10.0, width 1366, height 768, bpp 24, client ip ::ffff:212.58.119.202:3750 - socket: 12, user name root
[20230119-11:04:28] [INFO ] [session start] (display 10): calling auth_start_session from pid 539
[20230119-11:04:28] [ERROR] sesman_data_in: scp_process_msg failed
[20230119-11:04:28] [ERROR] sesman_main_loop: trans_check_wait_objs failed, removing trans
[20230119-11:04:29] [INFO ] Starting X server on display 10: /usr/lib/xorg/Xorg :10 -auth .Xauthority -config xrdp/xorg.conf -noreset -nolisten tcp -logfile .xorgxrdp.%s.log
[20230119-11:04:30] [INFO ] Found X server running at /tmp/.X11-unix/X10
[20230119-11:04:30] [INFO ] Found X server running at /tmp/.X11-unix/X10
[20230119-11:04:30] [INFO ] Starting the xrdp channel server for display 10
[20230119-11:04:30] [INFO ] Found X server running at /tmp/.X11-unix/X10
[20230119-11:04:30] [INFO ] Session started successfully for user root on display 10
[20230119-11:04:30] [INFO ] Session in progress on display 10, waiting until the window manager (pid 548) exits to end the session
[20230119-11:04:30] [INFO ] Starting the default window manager on display 10: /etc/xrdp/startwm.sh

@matt335672
Copy link
Member

It is indeed.

If your client's running RFX, that's probably the best you'll get for now I'm afraid.

You can try the Xvnc backend. That is a bit less sensitive to latency in general, but don't expect amazing improvements.

@thenik
Copy link
Author

thenik commented Jan 19, 2023

Xvnc is a part of Xrdp ? How to try it?

@matt335672
Copy link
Member

  • Install tigervnc-standalone-server
  • Get rid of the autologin
  • Connect to the server using 24 or 32 bit colour
  • On the login dialog, select Xvnc as the session type and fill in the rest of the login details.

You won't get RFX support, but the latency should be a bit less of an issue.

@akarl10
Copy link
Contributor

akarl10 commented Jan 22, 2023

@thenik Sometime ago I made some packages for ubuntu 22.04 and 22.10 that are based on the gfx branch mentioned by @matt335672 here.
If you are interested to see where development is going you may have a look on #2383 .

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

3 participants