Remote desktop with hardware acceleration on GPU servers using Linux

Remote desktop with hardware acceleration on GPU servers using Linux

by Emilien Maudet - Solutions architect @ Scaleway


Introduction : Use cases and difficulties

Why do some users want a remote desktop service with hardware acceleration on a Linux server in the cloud ?

When it comes to cloud Linux servers, people often use them with command in line instructions over an SSH access. But regularly, some users need a graphical environment.

Of course, there are users who are not yet familiar with CLI system administration, and looking for a graphical user interface : a desktop environment like the one on their computer (Ubuntu Desktop / Unity, Mate, KDE Plasma, etc.). But there are also experienced Linux users who need a graphical user interface for a totally different reason : They use hardware acceleration.

Hardware acceleration allows the server's GPU to be used to speed up graphics tasks and reduce CPU load. This results in a smoother and more responsive user experience.

There are plenty of users running software with graphical features coupled to GPU, for example :

  • a video game designer who edits files for Unreal Engine or Unity
  • a mechanical engineer who draws object for 3D printers with FreeCAD
  • an animation designer who wants to render his movie with Blender
  • a data scientist who does physical simulations (computer vision, fluid mechanics simulation) with CUDA
  • a designer of a real estate company using a virtual tour software.

What’s the challenge of setting this up in the cloud ?

In the cloud, having a screen like you would have if you're plugged on the HDMI/VGA port of the server is a little bit more tricky. The screen needs to be streamed on the network (between the cloud server and the user’s laptop). It’s where you need a remote desktop solution :

  • a remote desktop server application installed on the Linux server
  • a remote desktop client application installed on the user laptop (depending on the solution, it can be just a web browser)

When it comes to remote desktop using hardware acceleration, instead of using Linux, many users opt for Microsoft Windows or Apple MacOS environments, where remote desktop servers are easier to use.
Scaleway, for instance, caters to this demand with two primary options :

It is important to be careful with the Windows and Nvidia licensing, especially if you plan to do virtualisation where specific drivers may be needed.

In the Linux world, you need to set up your own remote desktop server application. But almost all open source remote access solutions based on VNC or XRDP do not have a simple graphical acceleration feature yet. It’s not easy at all to find an open source solution, especially if you are not an expert on this topic !

How to use Scaleway’s GPU acceleration on Linux remote desktop ?

On our GPU Instances, GPU Elastic Metal and GPU Dedibox, you can use our preconfigured Linux images.

Until now, to have a remote desktop and a graphical environment on Linux, we provided tutorials such as this one. But nothing with GPU acceleration on Linux.

Recently, we managed to find an open source solution to provide a full desktop streaming (this is also sometimes called a “webtop”) including the audio streaming of the server.

This solution is named Selkies, and it’s an open-source low-latency high-performance Linux-native GPU/CPU-accelerated WebRTC HTML5 remote desktop streaming platform. It streams content from the server to a web browser by using WebRTC, so that you can access any available GPUs for hardware encoding or decoding of real-time streams.

It runs inside this Docker container, provides a KDE Plasma graphical environment, and does not require the installation of a remote desktop client application on the user’s computer. It is accessible from the internet browser of the end user, and allows him to control the application.

You just have to run the container. And with only one docker run command, you have a remote desktop server fully operational. Optionally, if you want to encrypt the connection, you can use an ssh tunnel to do port forwarding.


As an example, I did a Terraform project containing a Cloud-init script to automate the deployment of Selkies remote desktop container at the boot of a GPU powered Scaleway Instance.

The Selkies website, the readme.md files of the Terraform example and the Selkies container will give you all the details about the infrastructure and software architecture.

Selkies remote desktop works on GPU powered Instances (Render, 3070, L4, L40S, H100 PCIe). Using the Ubuntu GPU OS image provided by Scaleway, the needed drivers and Docker engine are already installed. My Terraform project example works with all these instances.

It can also work on GPU powered Bare Metal servers Elastic Metal, Dedibox). Using one of the Linux OS images provided by Scaleway. This way, you have access to the power of a full physical server. But it comes with a few more steps to set up by hand : Docker engine installation, and Nvidia toolkit /CUDA driver installation.

Leveraging this technology on Linux provides significant advantages for a wide range of businesses. Common applications include :

  • Retail and Automotive - Product configurators with rendered 3D graphics.
  • Data Science - Remote interactive visualization of large datasets.
  • Industrial Design - Lightweight, ephemeral, low-cost virtual workstations for 3D design teams.

Video Demonstration: From Setup to Application

Here is a demonstration of remote desktop with hardware acceleration on 3 different environments :

👉 Watch the full demonstration here

---

Sources :

selkies-project
docker-selkies-glx-desktop
GPU Remote Desktop Container Project
Blender demo files of Oksana Dobrovolska and Piotr Krynski :
upertuxkart
Benchmark Unigine
Digital Twin Demo

Recommended articles