7

I'm running a computer vision model on a headless remote VM (Ubuntu 16.04) over X11Forwarding with good ol' Putty and Xming as my Windows X Server.

All is well but seems there is no frame drop if the client-server bandwidth can't keep up, which means my application is slowed down and only renders a few frames a second when it can do hundreds if bandwidth is plenty.

Is there a force frame drop option built into X11 forwarding, and if there is, how do i turn it on?

  • 4
    The X11 protocol does not have a notion of frames, and hence does not support frame dropping (i.e. there is no resynchronisation point). – Simon Richter Sep 12 '18 at 13:29
8

I highly recommend Xpra for this sort of use-case: not only does it provide the ability to disconnect and reconnect to X applications running on a remote host, it also supports a variety of image encodings and window refresh settings to provide a decent experience in different circumstances.

It has a native Windows client so it should be easy enough to set up. You’ll need to install it on the remote VM too, but that’s as easy as apt install xpra on Ubuntu.

  • This looks very promising, however i can't seem to make it bind to a TCP port. – evilSnobu Sep 12 '18 at 8:54
  • Are you connecting using SSH, or directly? – Stephen Kitt Sep 12 '18 at 8:59
  • My Xorg was f****. Fixed it and it's all fine now, this Xpra thing is really good, especially when you switch to HEVC (x265) encoding. Very very nice and not blocking. Thanks! – evilSnobu Sep 12 '18 at 9:40
  • I cannot recommend Xpra any more. It's probably the best free option out there today. – wbkang Sep 13 '18 at 1:35
4

According to this related question, looks like X11Forwarding isn't the best option for graphics intesive applications, as the X11 protocol wasn't designed with bitmap drawing performance in mind.

It basically sends drawing instructions to the network, which is "all good" if we're talking about a couple of windows with text, but it's obviously overkill for millions of pixels changing every frame, expecially when network experiences high latency/jitter/packet loss.

As suggested in the answer to the question mentioned, you could try x2go and see if it fits your needs.

EDIT as per comment

If x2go won't do, you can try VNC which looks like has frame dropping capabilities. For example, I use x11vnc for connecting to my desktop from a remote connection with x11vnc -display :0 -auth .Xauthority which hooks to my display.

Don't know if it would work with Xming but you can give it a try.

  • Unfortunately the Windows port of x2go is completely broken, already tried it. – evilSnobu Sep 12 '18 at 8:00
  • In the past I also trying x2go with a Mac client, and gave up on it. – Rui F Ribeiro Sep 12 '18 at 8:25
3

The pure X11 protocol does not lend well itself for guaranteeing transmission, and much over SSH.

I recommend NoMachine. It can do bandwidth compression and network optimization. It also has clients for Mac, Windows and Linux.

PS. NoMachine has the free and the paid versions. I always used the free.

See NoMachine

For virtual desktops (case a) the X11 vector graphics mode (previously known as “lightweight” mode) is enabled by default. This method reduces the bandwidth usage (and the HW requirements because is less CPU intensive) on both client and server by optimizing the X11 protocol by means of compression techniques, round trip suppression and cache algorithms.

The X11 vector graphics mode is convenient to avoid loss of image quality and can be useful when working with traditional GUIs or large amount of text, but it's not suggested for multimedia contents or applications with many graphical effects.

More about the X11 vector graphics mode: https://www.nomachine.com/AR02L00779

For connections to the physical desktop or when the X11 vector graphics mode is disabled for virtual desktops (case b) NoMachine implements the display protocol using a combination of video and image encoding based on standard codecs and a number of techniques developed by NoMachine itself.

It also implements a network adaptive display quality technique. This means that NoMachine will automatically try to reduce the display quality when it detects that the network is congested. Purpose of this mechanism is to keep the session responsive through all the different network conditions.

More about finding the most suitable configuration for multimedia playing:

https://www.nomachine.com/AR01M00832

  • Is that "Free as in closed-source advertisement for our paid option" or "Free as in Stallman"? – pipe Sep 12 '18 at 13:47
  • @pipe Somewhere in the middle, I think. I have used the free version for personal use it with much satisfaction, I also was laterally involved and know of big projects that used the free version. The paid version can apparently save some trouble customizing things around in more complex environments from what more experienced people told me. – Rui F Ribeiro Sep 12 '18 at 14:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.