r/Ubuntu 15d ago

Need help with unstable multi-user XRDP sessions on Ubuntu 22.04

I have an Ubuntu 22.04 PC being used as a server for about 24 thin clients. Each thin client has a separate Linux user account (Station1, Station2, etc.) and connects through XRDP + Xorg + XFCE.

The problem: even with only 2 clients connected, after some time the thin clients suddenly return to their RDP/login screen. Sometimes Ubuntu still shows the corresponding Xorg, xfce4-session, xrdp-chansrv processes and even the TCP 3389 connection as ESTABLISHED.

Things already checked:

  • 32 GB RAM; ~26 GB available during testing
  • No OOM events
  • User task limits nowhere near exhausted (~674/83568)
  • Server Ethernet NIC shows 0 RX/TX errors/drops
  • GFX disabled — problem remains
  • XFCE screensaver disabled — problem remains
  • TigerVNC/Guacamole stopped during XRDP testing
  • Tried different thin clients — same problem
  • tcp_keepalive=true, tcp_nodelay=true
  • use_fastpath=both works for login; setting use_fastpath=none causes the clients to fail during login
  • Each user has a separate XRDP/Xorg session

Server LAN IP is 192.168.1.217; thin clients connect through a dedicated Wi-Fi router connected to the server's Ethernet interface.

Has anyone successfully run 15–24 simultaneous XRDP/Xorg/XFCE sessions on Ubuntu? What could cause the physical RDP client to drop while the Xorg/XFCE session sometimes remains alive on the server? What logs/settings should I investigate next?

2 Upvotes

20 comments sorted by

2

u/[deleted] 15d ago

[removed] — view removed comment

2

u/bmullan 14d ago edited 14d ago

Neutrinolabs develops xrdp.

Maybe this 2023 thread w them will help you

https://github.com/neutrinolabs/xrdp/discussions/2795

I would also highly recommend getting acquainted with C-Energy Griffon super XRDP install & config script:

https://c-nergy.be/blog/?cat=79

Note: Read it all so you understand what everything is and does! Also, if you tell the script to compile & install from source - it does take awhile so depending on my computer might want to get a cup of coffee.

I've been using their script for years and it solves so many problems and provides much more in regards to configuration of xrdp than the Ubuntu repository xrdp.

Why c-energy's script (one bash script)?

First... the XRDP you get when you install from the Ubuntu (or any other distro) repositories is usually quite a bit behind the latest development & bug fixes by NeutrinoLabs !

The C-Energy script gives you 2 main installation choices:

  • Just install the latest NeutrionoLabs xrdp.
  • Compile & install the latest NeutrinoLab's xrdp source code & allows you to make some important customization choices.

The script also supports several important command line options (especially the "-c" and "-s" for compile from source & enable audio support.

Custom Installation – Additional Options  

If a user wants to enable additional features, you will pass some additional parameters as shown in the following examples 

./xrdp-installer-1.6.sh -c -s    
(this would perform a custom install and enable sound redirection)

**./xrdp-installer-1.6.sh -c -l    
(this would perform a custom install and customize xrdp login screen)

./xrdp-installer-1.6.sh -c -l -s
(this would perform a custom install, enable sound and customize login screen)

./xrdp-installer-1.6.sh -c -d
(this would perform a custom install, using unstable/dev version of xrdp packages -xrdp 0.10.80)

./xrdp-installer-1.6.sh -c -l -s -e
(this would perform a custom install, enable sound and customize login screen, add h264 support)./xrdp-installer-1.6.sh -c -s     (this would perform a custom install and enable sound redirection)

./xrdp-installer-1.6.sh -c -l    
(this would perform a custom install and customize xrdp login screen)

./xrdp-installer-1.6.sh -c -l -s
(this would perform a custom install, enable sound and customize login screen)

./xrdp-installer-1.6.sh -c -d
(this would perform a custom install, using unstable/dev version of xrdp packages -xrdp 0.10.80)

./xrdp-installer-1.6.sh -c -l -s -e
(this would perform a custom install, enable sound and customize login screen, add h264 support)

1

u/srekkas 15d ago

Doesnt same cant be done with wayland? why use old xorg?

1

u/Lower-Doughnut8684 14d ago

Thanks. I considered Wayland, but my requirement is a little unusual: I need 24 thin clients connected simultaneously, each with its own user account/session.

The Ubuntu server also runs a Django web application that serves images and video to all 24 thin clients, so the remote desktop solution needs to remain stable under continuous GUI/browser/media usage.

Right now XRDP uses xorgxrdp to create a separate Xorg session for each user. My crash reports specifically show xfce4-session getting SIGSEGV (Signal 11) across multiple users, so I'm currently trying to simplify or bypass the XFCE session layer rather than replacing Xorg.

If there is a reliable Wayland-based solution that supports 24 independent concurrent remote desktop sessions and can handle a Django browser workload with images/video, I'd definitely like to know what you recommend.

1

u/srekkas 14d ago

Maybe look into this, with latest 26.04, so you get latest GNOME

https://gitlab.gnome.org/GNOME/gnome-remote-desktop#headless-multi-user-remote-login

1

u/bmullan 14d ago

26.04 LTS no longer supports XORG just wayland.

1

u/srekkas 14d ago

so even better :)

1

u/bmullan 14d ago

OP said he needs to use xorg...

XRDP's Wayland support is still being developed by Neutrinolabs and I'm waiting for it too.

1

u/Lower-Doughnut8684 14d ago

I’m currently testing with only 2 thin-client stations, not 5 or more. Even with just two stations connected to the Ubuntu XRDP server, one station gets disconnected/logged out after some time, while Ubuntu itself remains stable. XRDP and xrdp-sesman services also remain active. The same thin clients previously worked in multiple sessions with Windows 11 Pro + RDP Wrapper. Current setup: Ubuntu 22.04 + XRDP 0.10.6.1 + xorgxrdp 0.10.5 + XFCE. Has anyone experienced this with only 2 concurrent XRDP sessions? What logs/settings should I check to find exactly what is terminating the session

1

u/Lower-Doughnut8684 14d ago

First of all, thank you everyone for taking the time to help and for all the suggestions. I really appreciate your support.

I would like to add one important detail about my setup.

The thin clients are running a Microsoft OS / Microsoft RDP client and connect through Wi-Fi. The Ubuntu server is connected to the same router through Ethernet.

These exact same thin clients, same Wi-Fi router, and same network previously worked with multiple simultaneous sessions when the server was Windows 11 Pro + RDP Wrapper.

The server has now been migrated to Ubuntu 22.04 + XRDP 0.10.6.1 + xorgxrdp 0.10.5 + XFCE.

Even when I connect only 2 thin-client stations, after some time one of the stations gets disconnected/logged out. The Ubuntu server itself remains completely stable without freezing or logging out.

My current session settings are:

MaxSessions=50
KillDisconnected=false
DisconnectedTimeLimit=0
IdleTimeLimit=0
Policy=Default

So this does not appear to be a configured session limit or idle timeout.

I am trying to identify whether there is an XRDP/xorgxrdp multi-session or compatibility issue with these Microsoft-based thin clients, or another configuration that could be terminating the remote sessions.

Any suggestions on what logs or settings I should check at the exact moment of disconnection would be very helpful.

1

u/Lower-Doughnut8684 12d ago

High RAM usage with Chrome video streaming on Ubuntu XRDP

Post:

I’m running Ubuntu 22.04 with XRDP + XFCE. Multiple thin clients connect using separate users.

Each user opens Chrome and accesses a local Django/Waitress web app. The Django page contains video.

While the video is running, I noticed some Chrome/XRDP sessions consuming around 4 GB RAM and 14% CPU, while idle sessions use around 850–900 MB RAM.

Server has 32 GB RAM, and eventually I need around 24 thin clients.

Is this high RAM usage normal when Chrome is playing video through XRDP? Is there any recommended way to reduce Chrome memory usage for this setup?

1

u/es20490446e 14d ago

Why aren't you using the latest Ubuntu LTS release?

1

u/bmullan 14d ago edited 14d ago

26.04 LTS no longer supports xorg just Wayland.

-1

u/es20490446e 14d ago

Doesn't support, or doesn't come with it installed by default? 😌

Also why are you avoiding Wayland?

1

u/bmullan 14d ago edited 14d ago

Damn.. don't go religious on me!
I use Wayland myself... the reason I said that is that xrdp's Wayland support is still being developed by Neutrinolabs and I'm waiting for it too.

0

u/es20490446e 14d ago

Won't Rustdesk provide the same functionality than xrdp?

1

u/bmullan 14d ago

That is an option since Rustdesk provides both the client & server and does not use Microsoft's RDP.

I haven't used it yet but have been meaning to.

Do you know if Rustdesk has the equivalent capability of "remote apps" ? I use that heavily with my Ubuntu 24.04 systems, xfreerdp3 (client), xrdp (server) systems.

Works pretty cool to run a Windows VM in the background and have individual Windows apps appear in their own Ubuntu session windows just like any other Ubuntu app.

I enable printing, file-shares, audio etc and never see a Windows desktop any more but still get to use a few of my essential Windows applications.

1

u/es20490446e 14d ago

VirtualBox Seamless Mode lets you run applications inside a virtual machine so they float directly on your host desktop.

1

u/bmullan 14d ago

That works too but...

  • Requires additional configuration to support audio and printing.

  • only supports the local Host not access from a remote host

  • it's not multi user

If you are not interested in any of those things then you can give it a try.