Wayland, Remote Desktop Sharing and Ubuntu 22.04 – Revisited

Early in April 2022, I couldn’t hold my curiosity anymore and had a closer look at Ubuntu 22.04’s remote desktop implementation. Instead of X11, Wayland is now the default compositor, so my X11 VNC screen sharing solution I use for remote work and remote support no longer works. At the time, only a beta version of 22.04 with broken screen-sharing was available, so I resorted to Ubuntu 21.10, hoping that the remote screen sharing solution would be the same as in 22.04. But as it turned out, this was not the case! While 21.10 used Wayland in combination with the VNC protocol, Ubuntu 22.04 now uses the RDP protocol, with VNC as a legacy backup that can be activated if required. That’s good news, as I was not happy at all with the Wayland/VNC combination in 21.10. So how does Wayland/RDP fare, particularly over slow WAN links?

At first, I had some trouble getting things working. On my Ubuntu 20.04 notebook, I use Remmina for remote desktop work, which failed to establish a connection to my Ubuntu 22.04 test notebook. After some back and forth, I decided to install the latest snap image of Remmina in a virtual machine and give that a try. This worked out of the box. I also tried xfreerdp as a client, installed from Ubuntu 22.04’s repositories, and this was also working fine. I decided to stay with Remmina, however, as that’s what I already know and use.

The first thing I checked out was how the RDP protocol and parameters used by Ubuntu 22.04 would work in the local area network with lots of bandwidth. Here, things look very nicely, and almost everything feels very snappy. Individual windows can be moved on the desktop smoothly, and one can even scroll with pleasant results in the web browser. All feels very natural. The only quirk I have detected is that when typing in text, the last 1 to 2 characters one types before stopping take 1 to 2 seconds to show up on the screen. This is very very strange. While typing text, the characters appear on the screen quickly, but once one stops, there’s a delay for the final characters. This is independent of the network speed and I’m really puzzled why that is so, as everything else is very fluid. Any ideas?

Next, I wanted to know how well Wayland/RDP/Ubuntu 22.04 works over a slow Internet connection. More often than not, some people I want to support remotely sit behind very restricted uplinks, typically 2-5 Mbps. This is the weak spot of many VNC and RDP remote desktop configurations. To simulate such a network, I put a Linksys Router with OpenWRT between my notebook and the test notebook with Ubuntu 22.04 and installed SQM (Smart Queue Management) and Net Emulation (netem). This way, I can set any uplink and downlink speeds I want, and I can add delay and create random packet loss on the link.

I started my bandwidth limited tests with a 5 Mbps uplink from the test notebook’s point of view. In addition, I configured an additional network delay of 50 and 100 ms, which is typical for many real live scenarios I find myself in frequently. I was very positively surprised, as windows could still be moved quite quickly, and the system was still very reactive. Like in the full speed scenario above, the last 1-2 characters one types had a delay. When nothing moves on the screen, no bandwidth is used, which is a very important point as well. Overall, I wouldn’t want to work with a remote system over such a link, as the delay and snappiness is somewhat reduced, but things still work very well for remote support.

Next, I reduced the uplink bandwidth to 2 Mbps while keeping the additional delay to 50 ms. This might seem very little, but I have many people sitting behind such links. Again, I was positively surprised, as for remote support, things still work quickly enough. But there’s a noticeable delay now when switching from one window to another. Scrolling through a complicated web page with many images is a bit of strain. But still usable.

A Remmina client setting that helps in the 5 and 2 Mbps scenarios is to set the link type to ‘modem’ instead of ‘auto’ (-detect). All other settings, like reducing the number of colors, seem to have no effect.

Unfortunately, the Remote Desktop does not work in two situations: When the screen lock is activated, e.g. after an inactivity timeout, the remote desktop connection is interrupted and can’t be reestablished until after the system is unlocked again. The RDP link is also disconnected when the screen blanks without the screen lock being activated. For working remotely on a system, that’s not ideal. On can of course disable screen blanking and the screen lock, but that’s also not ideal in many circumstances. Perhaps there are ways around this, but I haven’t check this out so far.

Summary

Overall, Ubuntu 22.04 screen-sharing with Wayland and RDP looks very nice. The RDP configuration that is used works o.k. over slow links, which is the main feature I require for many things. Very good to know, because migration to 22.04 will start at some point!