Ubuntu 18.04+remote desktop: OpenGL 3.2 support?

I want to remote-desktop into an Amazon EC2 Ubuntu 18.04 instance with OpenGL 3.2 support, but I can’t get it to work. The EC2 instance has an Nvidia T4 card.

    3D controller: NVIDIA Corporation TU104GL [Tesla T4] (rev a1)

    NVIDIA-SMI 450.142.00 Driver Version: 450.142.00 CUDA Version: 11.0

This driver supports OpenGL 4.6

For remote desktop, I use vnc4server and cinnamon. My ~/.vnc/xstartup:

    cinnamon-session &

The problem: in a VNC / cinnamon session, the OpenGL support drops all the way to 1.3:

    glxinfo (in VNC / cinnamon terminal):
    client glx vendor string: NVIDIA Corporation
    client glx version string: 1.4
    OpenGL vendor string: Mesa project: www.mesa3d.org
    OpenGL renderer string: Mesa GLX Indirect
    OpenGL version string: 1.3 Mesa 4.0

Is there any remote desktop software / Linux GUI combination that will support at least OpenGL 3.2 in a remote session on a Ubuntu 18.04 Nvidia Tesla 4 machine?

vnc4server runs Xvnc, which is a virtual (headless, software) X server. To use the graphics card, you need to start a hardware X server then share access using tools such as gnome-remote-desktop, vino or x11vnc.

For assistance, you’re more likely to get usable advice from forums dedicated to EC2, Ubuntu, Gnome or X.org.

1 Like

Thanks, your reply is by far the most usable I got anywhere. By hardware X server, you mean something like Wikipedia → DirectFB ?

The Xorg server (or XWayland, if using Wayland). It will need the appropriate DRM (kernel) and DRI (user-space) drivers for the graphics hardware. AFAIK, Nvidia hardware needs an Nvidia-specific version of the OpenGL libraries.

DirectFB provides access to the video hardware without using X11. It’s mostly used on embedded systems, e.g. Linux-based smart TVs.

1 Like

Thanks. I may have found the perfect fit for my purpose: “VirtualGL” (virtualgl dot org): “VirtualGL works fine with headless nVidia GPUs (Tesla), but there are a few additional steps that need to be performed…”

The below links might be useful. You’re running on a Amazon AWS EC2 virtual machine trying to pass OpenGL rendering to a remote host, so you’re going to be limited by what Amazon supports well:

Thanks for EC2 the scripts. I also found this:

I’ll give VirtualGL a try and get back with results.

Ran the scripts linked to by Dark_Photon (thanks). I got the VirtualGL / TurboVNC working. OpenGL shows the glxgears fine (with vglrun), the “core” OpenGL version is reported as 4.6. However the VirtualGL “vglrun” command won’t start the software I’m interested in (Unity game IDE), so I’ll probably drop the whole remote desktop idea.

BTW, if someone wants to run the scripts above, note that there are some hard-coded device ID’s for Nvidia Tesla 4, which don’t match what the ID I see on the instance. You may want to simplify the expression to just “Tesla 4”. This refers to “configure.sh”, “start_vnc_server.sh” and the “fix_xorg_conf.py” scripts. Also, in one script, it checks for “VGA controller: Nvidia” whereas Nvidia is listed separately as a “3D accelerator”

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.