VirtualGL

From Leo's Notes
Revision as of 18:39, 9 February 2021 by Leo (talk | contribs) (→Usage)
This page was last edited on 9 February 2021, at 18:39.


Installation

  1. Download the .rpm packages from VirtualGL's repository (on SourceForge) and install it.
  2. Run the configuration helper script at /opt/VirtualGL/bin/vglserver_config. You will be asked some questions:
    • If using VNC with TurboVNC or TigerVNC, do not disable XTEST extension
    • You may restrict certain users access to the vglusers group when prompted.
    • The script writes to various places., including /etc/security/console.perms, /etc/modprobe.d/virtualgl.conf, /etc/X11/xorg.conf.d/99-virtualgl-dri
  3. I had issues with GDM working with VirtualGL. Install LightDM and configure the seats to generate a key.
    [Seat:seat0]
    display-setup-script=/usr/bin/vglgenkey
    
  4. After restarting your login manager, verify that /etc/opt/VirtualGL/ has a key file.

If you need to tweak xorg.conf, you may generate one using Nvidia's nvidia-xconfig utility. You may wish to specify the device the screen is to use by looking up the PCI bus ID and passing it as an argument. Eg:

# nvidia-xconfig --use-display-device=none --busid="PCI:6:0:0"


Usage

The idea with VirtualGL is that the program you wish to have GPU acceleration renders locally (ie. the remote host that's running the login manager) and VirtualGL then copies the framebuffer back to you. As a result, anything you do run with VirtualGL can appear on the local display which could be a security risk for workstations (such as in a lab setting).

To run a specific application with VirtualGL, use the vglrun command. To help debug issues, use the +v flag to enable verbose logging.

A few environment variables you should be aware of:

  • VGL_DISPLAY should point to the local display with the login manager. (eg. :0)
  • DISPLAY or the -display option should be set to the target display (eg. :1.0, or whatever your display is in a VNC session)
  • VGL_VERBOSE enables debugging
  • VGL_LOGO will print 'VGL' on the window to show that it's rendering with VirtualGL