Linux menu

Tuesday, September 23, 2014

How To Install VirtualGL on Red Hat Enterprise Linux 6 and 7

Installing 32-bit Libraries

In order to run 32-bit OpenGL applications in VirtualGL, it is necessary to install the 32-bit VirtualGL server components. These components depend on a few 32-bit system libraries. The x86-64 version of RHEL 6 does not have any 32-bit libraries installed by default, so it is necessary to install these before using the 32-bit version of VirtualGL. To do this:
As root:
  • Add multilib_policy=all to /etc/yum.conf
  • If you are running RHEL and not CentOS or another derivative, edit/etc/yum/pluginconf.d/rhnplugin.conf and uncomment the lines that read:
[rhel-i386-server-5]
enabled = 1
  • Run the following commands:
rpm -q -a | sed 's@\.x86_64@@' | sed 's@\.noarch@@' | sort >out
yum install `cat out`
Now, yum update should pull in both i686 and x86-64 packages like RHEL 5 did.
In VirtualGL 2.2.x and prior, the 64-bit VirtualGL RPM also contained a 32-bit version of the VirtualGL server components. If you don't need to run 32-bit applications in VirtualGL, you could simply install this RPM with--nodeps and avoid having to install any 32-bit libraries.
Current versions of VirtualGL ship with separate 32-bit and 64-bit RPMs.

Installing the Proprietary nVidia Driver

NOTE: RHEL 7 procedure has not yet been verified.
As root:
  • Remove the X11 nouveau driver packages
rpm -e xorg-x11-drivers xorg-x11-drv-nouveau
  • RHEL 6: Add rdblacklist=nouveau nouveau.modeset=0 to the end of the "kernel" line in/boot/grub.conf
  • RHEL 7: Add rdblacklist=nouveau to the end of the "GRUB_CMDLINE_LINUX" line in/etc/default/grub and run:
grub2-mkconfig -o /boot/grub2/grub.cfg
  • Create a file /etc/modprobe.d/disable-nouveau.conf with the following contents:
blacklist nouveau
options nouveau modeset=0
  • Reboot
  • Stop the X server (init 3)
  • Install the proprietary nVidia driver as you would normally
    • This will prompt you to install GCC and the kernel-devel package if you haven't already done so. Be careful to install the kernel-devel package that matches your running kernel. yum install kernel-devel will pull in the latest & greatest update, which may not match.
  • RHEL 6 and 7 have no xorg.conf file by default, so when the nVidia installer asks whether you want to run nvidia-xconfig to modify your xorg.conf file, answer Yes. This will create the xorg.conf file, which you can then modify to suit your needs.
  • Restart the X server (init 5)

vglgenkey Issues

The vglgenkey script is run by the display manager in order to grant 3D X Server access to members of thevglusers group when the server is sitting at the login prompt. Unfortunately, this script encounters problems under RHEL 6 whenever SELinux is enabled. Specifically, the /usr/bin/xauth file is hidden within the context of the display manager startup scripts, so vglgenkey has no way of generating or importing an xauth key to/etc/opt/VirtualGL/vgl_xauth_key. Additionally, access is denied to /etc/opt/VirtualGL.
After running vglserver_config, you can execute the following commands (as root) to work around these issues:
semanage fcontext -a -t xdm_rw_etc_t '/etc/opt/VirtualGL(/.*)?'
restorecon -R -v /etc/opt/VirtualGL
semanage fcontext -a -t xdm_exec_t /usr/bin/xauth 
restorecon -R -v /usr/bin/xauth
(Disabling SELinux works around the issues as well.)
If semanage is not installed, then run yum install policycoreutils-python to install it.

vglserver_config Issues

There is currently no known way to disable the XTEST extension, because gdmsetup no longer exists.

Issues with RHEL 7 Window Managers and X Proxies

Gnome 3, the version that ships with RHEL 7, now requires hardware-accelerated OpenGL, so it is necessary to run the window manager in VirtualGL. Unfortunately, however, there are still some known issues with doing this, and one of the known issues is that, when you run the window manager in VirtualGL, you cannot subsequently launch 3D apps from within the window manager without crashing it. Until this is fixed, it will be necessary to use KDE Plasma or another window manager with RHEL 7.
KDE Plasma requires an X proxy with support for the Composite, XFIXES, Damage, and XKEYBOARD extensions, so if you are running TurboVNC, you will need to install the 2.0 pre-release rather than 1.2.x.

No comments: