Skip to content

rdp: Deprecate the legacy graphics path

Pascal Nowack requested to merge pnowack/gnome-remote-desktop:misc3 into master

Built on top of !135 (merged) (commits included here).

Quoting the main commit here:

In the initial days the RDP backend in gnome-remote-desktop, the legacy
path (mostly the RemoteFX codec path) was an easy and fast way to
implement a way to submit frame updates to the client.
In addition to the RemoteFX codec path, a path for the NSCodec and for
raw bitmaps was added.
The reason for the latter two was a misconfiguration of popular
clients, namely Remmina and xfreerdp.

Remmina by default assumed, that the server side always supports AVC
and that the client side is able to choose the used codec.
The reality is that Remmina actually limited the supported codecs,
forcing the server side to use worse codecs, leading to a reduced
remote desktop experience.
xfreerdp also supported all codecs, but never advertised them, leading
to the same bad experience (high bandwidth usage, very low
performance).
Remminas issues were fixed two years ago in [0] by always advertising
all supported codecs by default.
xfreerdp does the same since version 2.7.0.
Distributions, like Ubuntu also backported the respective changes.

As times passed, the problems of the legacy path became visible:
Fastpath updates cannot be larger than a negotiated size, and therefore
PDUs using the fastpath must be split into multiple parts manually.
This is especially a problem for the NSCodec and the raw bitmaps path,
as their maximum output size is not predictable, resulting in bad
performance and dropped updates.
Both symptoms result in a horrible remote desktop experience.
The graphics pipeline and any other virtual channels are unaffected by
this, as virtual channels either run via the slowpath or via UDP.
Despite its name, the slowpath is not slow, but has additional overhead
on the network traffic.
PDUs of dynamic virtual channels (DVCs) are also split, but on a lower
level, basically not affecting any PDU usage in the channels
themselves.

Additionally, the raw bitmap path has certain alignment restrictions
(e.g. width and height MUST be a multiple of 4), making it unsuitable
for the usage of headless sessions, where arbitrary resolutions are
used.
Furthermore, users don't know any internals of the Remote Desktop
Protocol (RDP) and if they try to force the usage of the legacy path,
they will have a slow remote desktop experience and blame it on the
server.

Due to the amount of problems with the legacy path and the maintenance
cost, start deprecating the legacy path.
For this, only allow for now the legacy path to be used, when the
respective debug environment variable is set.
In the next development cycle, start removing the legacy path.
The graphics pipeline is already the default in Azure, where it is used
for the infamous RDP short path and with the aforementioned changes
both xfreerdp and Remmina also now always prefer the usage of the
graphics pipeline.

[0]: https://gitlab.com/Remmina/Remmina/-/merge_requests/2099

Merge request reports