NoMachine Support

Your questions answered

Knowledge Base

Searching in: Articles & FAQs
Filter the search results
Applies to:
Last update:
Searching in: Articles & FAQs
ID: AR11K00737
Applies to: NX Server Products
Added on: 2013-11-04
Last update: 2018-06-27
Enabling VirtualGL support on Linux in NoMachine up to v. 6.1

For NoMachine v. 6.2 or later, please refer to: https://www.nomachine.com/AR05P00982


NoMachine provides support for HW accelerated OpenGL applications in virtual desktop and custom sessions by using the VirtualGL library. This library is shipped in the NoMachine servers and node packages for Linux.

Pre-requisite is that the host machine is a physical computer and has a hardware-accelerated 3D card.

VirtualGL support is not available by default. In order to use it, first of all it's necessary to configure the system.


1. Configure the system to use VirtualGL

1.1. Shut down the X server

       E.g. on Red Hat/Fedora Linux servers with systemd

   systemctl stop gdm.service

More examples are available in the official documentation of VirtualGL, 'Shut down the display manager:'  https://cdn.rawgit.com/VirtualGL/virtualgl/2.5.2/doc/index.html

 

1.2. Run in a console as 'sudo' user or as root if you don't have sudo:

sudo /usr/NX/scripts/vgl/vglserver_config -config +s +t +f
 

where:

+s: Open 3D X server access to all users of this machine
+f: Open framebuffer device access to all users of this machine
+t: Enable XTEST extension

Note that the following advanced options are also possible:

-s: Restrict 3D X server access to vglusers group [default] (this requires to add users to the vglusers group)
-f : Restrict framebuffer device access to vglusers group [default]
-t : Disable XTEST extension [default]         

 

This step is mandatory to configure the X server on the system for giving VirtualGL access to the GPU. All users with a connection to the X server will be allowed to use the VirtualGL direct rendering.

'VirtualGL requires access to a GPU in the application server so that it can create off-screen pixel buffers (Pbuffers) and redirect the 3D rendering from X windows into these Pbuffers. Unfortunately, accessing a GPU on Linux and Unix systems requires going through an X server.'  Ref. https://cdn.rawgit.com/VirtualGL/virtualgl/2.5.2/doc/index.html#hd006001
 

NOTE:
To restore the original configuration on the system, run:
/usr/NX/scripts/vgl/vglserver_config -unconfig

 

Once the system is configured to use VirtualGL, you have two options:

a) Use VirtualGL for all applications.

b) Use VirtualGL only for specific application(s).

 

 

a) How to run all applications under the provisioning of VirtualGL

Enable the EnableVirtualGLSupport key in /usr/NX/etc/node.cfg:

EnableVirtualGLSupport 1

The system is now ready to run all applications in NoMachine virtual desktops or custom sessions under the provisioning of VirtualGL. This can be however redundant and could lead to unforeseen behaviors, since only those applications that use OpenGL will benefit from VirtualGL rendering.
 

NOTE:
To disable use of VirtualGL in NoMachine, set:
EnableVirtualGLSupport 0

 

b) How to run only a specific application under the provisioning of VirtualGL

Launch the OpenGL application by running in a console inside the NoMachine virtual desktop:

/usr/NX/scripts/vgl/vglrun <opengl app>

TIP: You may also create a wrapper script to launch the application with the command above. Multiple OpenGL applications can be launched on the desktop by specifying the command for each of them.

 

If you need to run the OpenGL application in a NoMachine custom session, pre-pend:

/usr/NX/scripts/vgl/vglrun

to the command specified in the 'Run the following command' field of the client User's Interface.

 
 



A specific case

Solving slowness problems when running the GNOME desktop

If you are experiencing slowness when running the GNOME desktop, you may try to run GNOME under VirtualGL and use the accelerated graphics.

To do that, edit the /usr/NX/etc/node.cfg file, uncomment and set the following key:

DefaultDesktopCommand "/etc/gdm/Xsession '/usr/NX/scripts/vgl/vglrun gnome-session'"

This command applies to RHEL-based Operating Systems and may be slightly different on other systems.

When using this method, disable the VirtualGL support in the node.cfg file by setting:

EnableVirtualGLSupport 0