Skip to content

Linux Desktop: GPU acceleration

Visualisation using GPU hardware acceleration relies on VirtualGL. It is only possible on the visualisation nodes with dedicated GPU.

Step 1: Prerequisites

You must install on your own computer:

Step 2: Create a Linux Desktop virtual machine

Run a Linux Desktop Job as decribed in login section.

Step 3: Use alternative VNC connection

Instead of using the "Launch Desktop (VNC)" button in noVNC Connection tab, please go to Native Client VNC tab.

Native Client

Step 3.1: Create a ssh tunnel

Click on the "Copy to clipboard" button, open a terminal, and do a paste in it (click on the "Start local terminal" button in mobaXterm in order to open a terminal). A command similar to following one must appear.

$ ssh -N -L5901:visu01:5901 <my-login>@genobioinfo.toulouse.inrae.fr

Run it. Enter your GenoToul-Bioinfo password when asked.

The command gives the impression to never finish and it is something normal. You must keep it in this state in order to connect to the Linux Desktop.

You can stop it by hitting the Ctrl+C combination. If you stop it by mistake, run the command again.

Only with mobaXterm

Click on the "Copy to clipboard" and do a paste in a text editor. A command similar to following one must appear. Keep it next to you, we will use it latter.

$ ssh -N -L5901:visu01:5901 <my-login>@genobioinfo.toulouse.inrae.fr

Now run mobaXterm and do the following steps:

  • Click on "Tunneling" button.

    mobaXterm main windows

  • Following window opens. Click on the "New SSH Tunnel" button.

    mobaXterm main windows

  • You must register the ssh tunnel configuration. From the ssh command you paste before, extract information as described in the next picture

    mobaXterm main windows

    Warning

    Each time you run a new Linux VM, the configuration can change, in particular the remote port and remote server values.

  • The tunnel is ready!

    mobaXterm main windows

    Now start it by clicking on the "play" button in 1.

    First connection

    On first connection, you will get a message asking to validate the connection. Click "Accept" in order to connect.

    Enter you password when asked and you must be connected.

    Usefull buttons

    From MobaSSHTunnel windows, you can also:

    • stop it by clicking on the "stop" button in 1,
    • modify its configuration by clicking on button 2 (usefull for changing remote port and remote server values),
    • delete it by clicking on button 3.

    For next connections, you can either modify the tunnel configuration, or create a "New SSH Tunnel".

Step 3.2: Connect to the Linux Desktop

Then download the .vnc file from the Native Client VNC tab and open it with TurboVNC.

It opens a text file

Under Linux, if you double-click on the .vnc file, it will probably launch a text editor instead of TurboVNC.

In this case, open it this way (or something similar): right-click -> Open with ... -> TurboVNC Viewer

The Linux Desktop must appear.

Step 3.3: Run a program with GPU acceleration

Now you can run a program with GPU acceleration by prefixing the program name with vglrun in a terminal. For example:

vglrun glxgears

glxgears with VGL

Step 3.4: Stop everything

First, close the Desktop windows.

Then, stop the ssh tunnel by hitting Ctrl+C in the terminal where the ssh tunnel runs (or by clicking the "stop" button in mobaXterm if you didn't used the command line).

Finally stop the job.

How to know if GPU acceleration is enabled

A VGL filligram appears if GPU acceleration is enabled. You can also use the following command as an alternative:

vglrun glxinfo | grep -A1 vendor

The command must return VirtualGL as vendor string and the underlying GPU used:

server glx vendor string: VirtualGL
server glx version string: 1.4
--
client glx vendor string: VirtualGL
client glx version string: 1.4
--
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: Quadro RTX 6000/PCIe/SSE2

Additional ressources