Short answer
Turn off desktop compositing and animations, then match the client to your network. On a fast local network, choose the LAN connection speed with 32-bit colour, so xrdp can use its faster RemoteFX codec. On a slow link, choose a slower speed and 16-bit colour. Test after each change.
Fast local network
RemoteFX
Connection speed LAN (10 Mbps or higher) and 32-bit colour. xrdp can then use RemoteFX, which is usually much smoother.
Slow or distant link
Less data
A slower connection speed and High Color (16 bit). Try both settings and compare: lower colour isn’t always faster.
Turn off compositing
Compositing adds effects such as transparency and shadows, which make every screen update heavier over RDP. In Xfce, run this in the remote session:
xfconf-query -c xfwm4 -p /general/use_compositing -s falseSome desktops, including GNOME Shell, need compositing, so use this with lighter desktops such as Xfce.
Turn off GNOME animations
gsettings set org.gnome.desktop.interface enable-animations falseChoose the connection speed and colour depth
In the Windows Remote Desktop Connection app:
- Select Show Options.
- On the Display tab, pick the colour depth: Highest Quality (32 bit) on a fast network, High Color (16 bit) on a slow one.
- On the Experience tab, pick the connection speed: LAN (10 Mbps or higher) on a fast network.
- Connect and compare.
xrdp starts RemoteFX only when three things are true: the connection type is LAN, the colour depth is 24-bit or more, and the client supports it. That’s why 16-bit colour and RemoteFX don’t go together. To cap the colour depth for everyone on the server, set max_bpp=16 in /etc/xrdp/xrdp.ini.
Raise the TCP send buffer (for experts)
xrdp’s sample config marks this setting “for experts”, and newer xrdp versions say it can hurt speed or waste memory. Try it only if the steps above aren’t enough, and keep it only if it helps.
- Open the config:
sudo nano /etc/xrdp/xrdp.ini - In the
[Globals]section, remove the#beforetcp_send_buffer_bytesand set a larger value, for exampletcp_send_buffer_bytes=4194304. - Linux caps a program’s send buffer at
net.core.wmem_max. Raise it:sudo sysctl -w net.core.wmem_max=8388608. To keep it after a restart, addnet.core.wmem_max=8388608to/etc/sysctl.conf. - Restart xrdp:
sudo systemctl restart xrdp
Don’t turn off encryption to gain speed: anyone on the network could then read the session.
Still slow?
- Latency matters more than bandwidth for remote desktops. Run
pingwith the server’s address from your computer: steady low numbers are what you want. - Check the server’s CPU and memory with
topwhile you work. - A lighter desktop such as Xfce is usually much faster over xrdp than GNOME.