xpra icon
Bug tracker and wiki

Version 14 (modified by Antoine Martin, 4 years ago) (diff)

--

http://xpra.org/icons/opengl.png

OpenGL Applications

You can run OpenGL applications in an xpra session in a number of ways:

  • by running the xpra session directly on a "real" X11 server using an accelerated display driver - this is hard to setup and undocumented: you need to use the xvfb switch to start an accelerated X11 server (modified xorg.conf)
  • by shadowing an existing accelerated X11 server (sub-optimal)
  • by using VirtualGL


This is not related at all to the OpenGL client rendering: you can connect with any client you want, accelerated or not.

VirtualGL setup

Usually, you can just vglrun your application and things will "just work". That is the case for simple application like glxgears / glxspheres.

Other applications may require more complicated workarounds, see the extensive VirtualGL documentation for details, in particular 12: Using VirtualGL with setuid/setgid Executables.

Caveat: for some unknown reason, you may need to use /etc/ld.so.preload instead of LD_PRELOAD to make some suid applications work through xpra. (#898) Temporary solution:

$ mv /etc/ld.so.preload /etc/ld.so.preload.saved >& null
$ echo "/usr/lib64/VirtualGL/libdlfaker.so /usr/lib64/VirtualGL/libgefaker.so /usr/lib64/VirtualGL/librrfaker.so" > /etc/ld.so.preload
$ vglrun yourapp
$ rm /etc/ld.so.preload
$ mv /etc/ld.so.preload.saved /etc/ld.so.preload >& null

If you application is suid, you may also need to chmod it.

OpenGL Performance

Some rough figures and compatibility tests.

Running GpuTest 0.7.0, on a Fedora 22 system with a GeForce GTX 760, kernel 4.0.5, nvidia driver 346.59 at 1280x720 resolution.

The vmplayer tests below start the same tests in a Windows 7 Ultimate 64-bit virtual machine using VMware Player 7.1.0 build-2496824.

Platform Test
FurMark TessMark X8 PixMark JuliaFP32 PixMark Volplosion
Points FPS Points FPS Points FPS Points FPS
Bare Metal 4283 71 87143 1453 29994 498 2969 49
vglrun 3769 62 8842 147 10621 177 2696 44
vmplayer 1736 28 failed 3459 57 failed
vglrun vmplayer 1774 29 failed 3525 58 failed
xpra vglrun vmplayer 2494 41 failed 10927 181 failed
wine 5078 84 96217 1606 42552 708 3585 59
vglrun wine 2891 48 12170 202 10667 177 2741 45
xpra vglrun wine failed 9518 158 9085 151 2693 44

Some observations:

  • virtualgl adds some overhead which is most noticeable when running on bare metal, hardly noticeable when running through vmplayer as it slows down the opengl performance considerably already.
  • running through xpra actually gives a performance boost in some cases, probably because it does not need to wait for the actual screen refresh since there isn't one.
  • wine shows high performance, even faster than bare metal, but some tests display with quite a lot of stuttering, the stuttering goes away when running through vgl, but so does most of the performance..

Note: VirtualBox 4.3.x failed to launch any of the tests and is not included here.