Improving performance of GNOME 3 in a NoMachine virtual desktop running on a RHEL host with GPU and NVIDIA drivers

Added on: 2019-01-24 Last Modified: 2020-11-13
ID: AR01Q01012 Applies To: NoMachine Software

This article applies to NoMachine server v. 6.4.x or later running on Red Hat Enterprise Linux  (or CentOS) 7.5 or later.

For NoMachine versions older than v. 6.4.x and RHEL versions previous than 7.5, please refer to: and:

This article is intended to address performance issues that could arise when the following conditions are all met:

    1. A NoMachine virtual desktop session is running on Red Hat Enterprise Linux (or CentOS)
    2. GNOME 3 desktop is running in the NoMachine virtual desktop
    3. Proprietary NVIDIA drivers are installed on the system

GNOME 3 provides 3D desktop effects (e.g. shadows, animations, fading menu etc..) that are realized by using the software rendering when the graphics hardware is not available. This is the case of NoMachine virtual desktop sessions.

In this case it's necessary to adopt the OpenGL direct rendering with LLVMpipe software rasterizer in order to get a software rendering with proper performance.

In RHEL/CentOS, LLVMpipe is often enabled out-of-the-box and GNOME 3 works flawlessly in the NoMachine virtual desktops.

However, performance issues could arise if NVIDIA proprietary software package is installed. Along with the video card driver, NVIDIA-specific OpenGL libraries are installed and the library search order used by the system is modified. The LLVMpipe rasterizer is switched off; as a consequence NoMachine virtual desktops use indirect rendering for OpenGL. This often produces noticeable effects on performance, for example less responsiveness to keyboard and mouse input.

There are two possible alternative solutions to restore proper performance without removing the NVIDIA package:
    1. Change the OpenGL library configuration to turn LLVMpipe on so that it can be used in the NoMachine virtual desktops or
    2. Benefit from the NVIDIA card to accelerate OpenGL applications in the NoMachine virtual desktop through VirtualGL

First solution - turn LLVMpipe ON

In the latest RHEL 7 releases (7.5 and later), multiple OpenGL API implementations are arbitrated by a vendor-neutral dispatch layer called libglvnd.

In order to get llvmpipe working in virtual desktops, ensure that Mesa GL dispatch is used as fallback.
In a terminal, change directory to /usr/lib64 and list the GLX libraries by running:
cd /usr/lib64
ls -l libGLX_*

Search in the list the symbolic link ''. Usually it points to the NVIDIA libGLX library. Change the link to point to the Mesa library:

Verify if libGLX_mesa library exists:
ls -l

Move the link to the Mesa library:
ln -snf 

Check if variable __GLX_VENDOR_LIBRARY_NAME is set in the environment:
env | grep GLX_VENDOR

If variable is set to "nvidia" you need to edit file /usr/NX/node.cfg and change the NoMachine desktop startup command in order to clear variable or force it to "mesa":

DefaultDesktopCommand "/etc/gdm/Xsession 'env __GLX_VENDOR_LIBRARY_NAME=mesa XDG_SESSION_TYPE=x11 gnome-session --session=gnome'"

Second solution - Enable VirtualGL

By enabling the VirtualGL support, it's possible to use the graphics card (GPU) for rendering the desktop.
More details are available here:

Execute the following procedure from a terminal.

1)Setup VirtualGL on the system:
sudo /etc/NX/nxserver --virtualgl-install

2) Restart the display manager:
systemctl restart gdm

3) Edit /usr/NX/etc/node.cfg and change DefaultDesktopCommand and CommandStartGnome keys to have:
 DefaultDesktopCommand "/etc/gdm/Xsession 'env XDG_SESSION_TYPE=x11 /usr/NX/scripts/vgl/vglrun gnome-session --session=gnome'"
 CommandStartGnome "/etc/gdm/Xsession 'env XDG_SESSION_TYPE=x11 /usr/NX/scripts/vgl/vglrun gnome-session --session=gnome'"

4) Keep the EnableVirtualGLSupport key disabled (default):
#EnableVirtualGLSupport 0


A: How to find which renderer is in use

In the NoMachine virtual desktop session, open a terminal and launch the command:

$ glxinfo | grep -i "direct rendering|opengl renderer"

If LLVMpipe and direct rendering are enabled, you'll get this:

    direct rendering: Yes
    OpenGL renderer string: llvmpipe (LLVM 6.0, 256 bits)

B: How to check if libglvnd is installed

Use the command:

yum list installed libglvnd*


rpm -qa libglvnd*

C: How to check if GNOME is accelerated by VirtualGL

In the remote session, open a terminal and launch the command:


you should get a result similar to:


To check that acceleration is effective, run

glxinfo | grep -i "direct rendering|opengl renderer"

It is expected that the OpenGL renderer string reports the name of the graphics card, e.g.:

    direct rendering: Yes
    OpenGL renderer string: Quadro K600/PCIe/SSE2