xrdp is quite slow

using xrdp with the Xorg window system to connect from win10 to ubuntu 20.04 in my local network. The connection is terrible slow. Compare to that a standard rdp connection (win10 to win10) via vpn through the internet is much faster then my local xrdp.

/etc/xrdp/xrdp.ini
max_bpp=32

After login via xrdp my desktop environment is:

~$ echo $XDG_CURRENT_DESKTOP
GNOME

Assuming you use Xfce4, try disabling compositing with

$ xfconf-query --channel=xfwm4 --property=/general/use_compositing --type=bool --set=false --create

You could make this setting permanent in xorg.conf with

Section "Extensions"
    Option "Composite" "Disable"
EndSection

You can also work this out via GUI (install it if need be)

$ xfwm4-tweaks-settings

If yo use KDE, try disabling compositor as well, Settings -> Display and Monitor -> Compositor.

Also, try using a lower number of colors in the configuration of the client (16 bits instead of 32 bits).

Also, try these options in /etc/xrdp/xrdp.ini.

Related:

  1. https://unix.stackexchange.com/questions/22077/xfce-or-pure-x11-commands-toggle-compositing-immediately-without-restarting-x
  2. https://unix.stackexchange.com/questions/4282/disable-composite-without-restarting-x
  3. https://superuser.com/questions/1539900/slow-ubuntu-remote-desktop-using-xrdp
  4. https://owendavies.net/articles/install-desktop-gui-on-ubuntu-server/
  5. https://github.com/neutrinolabs/xrdp/issues/1600
  6. xrdp and xfce4 Ubuntu > 18.04 Unusable
  7. https://github.com/neutrinolabs/xrdp/issues/501#issuecomment-262905321