19

I have an Ubuntu 14.04 system with the following packages installed:

libegl1-mesa:amd64
libegl1-mesa-drivers:amd64
libgl1-mesa-dri:amd64
libgl1-mesa-dri:i386
libgl1-mesa-glx:amd64
libgl1-mesa-glx:i386
libglapi-mesa:amd64
libglapi-mesa:i386
libgles2-mesa:amd64
libglu1-mesa:amd64
libopenvg1-mesa:amd64
libwayland-egl1-mesa:amd64
mesa-utils
xvfb

I want to start an application under xvfb. I first start xvfb with:

$ Xvfb :1 -screen 0 1024x768x24 +extension GLX +render -noreset >> xsession.log 2>&1 &

and then check the xvfb log file:

Initializing built-in extension Generic Event Extension
Initializing built-in extension SHAPE
Initializing built-in extension MIT-SHM
Initializing built-in extension XInputExtension
Initializing built-in extension XTEST
Initializing built-in extension BIG-REQUESTS
Initializing built-in extension SYNC
Initializing built-in extension XKEYBOARD
Initializing built-in extension XC-MISC
Initializing built-in extension SECURITY
Initializing built-in extension XINERAMA
Initializing built-in extension XFIXES
Initializing built-in extension RENDER
Initializing built-in extension RANDR
Initializing built-in extension COMPOSITE
Initializing built-in extension DAMAGE
Initializing built-in extension MIT-SCREEN-SAVER
Initializing built-in extension DOUBLE-BUFFER
Initializing built-in extension RECORD
Initializing built-in extension DPMS
Initializing built-in extension Present
Initializing built-in extension DRI3
Initializing built-in extension X-Resource
Initializing built-in extension XVideo
Initializing built-in extension XVideo-MotionCompensation
Initializing built-in extension SELinux
Initializing built-in extension GLX

which shows no errors. Also, it seems that GLX has been loaded properly. Now, if I check the server with

$ glxinfo -display :1

I get

name of display: :1
Xlib:  extension "GLX" missing on display ":1".
...
Error: couldn't find RGB GLX visual or fbconfig
Xlib:  extension "GLX" missing on display ":1".
...
Error: couldn't find RGB GLX visual or fbconfig

Xlib:  extension "GLX" missing on display ":1".
...

In fact, the application that I want to start on this server and that needs GLX won't start.

After checking several documentation pages and forums, I have no clue as to what is going wrong here. Why does the X server log file not show any errors if the GLX extension was not loaded correctly? Is there something I should check?

Giorgio
  • 797
  • 2
  • 13
  • 28
  • In wiki page[1] of Xvfb it says:" Unlike a real display server, Xvfb does not support modern X11 extensions like compositing, Randr or GLX. Xdummy is a newer alternative which supports these extensions as well as providing the same functionality as Xvfb." [1]http://en.wikipedia.org/wiki/Xvfb – alpert Oct 31 '14 at 13:07
  • @alpertek you should post that as an answer. GLX generally needs a chip-specific driver to be useful. – XTL Apr 27 '15 at 14:21
  • 4
    the above comments are not correct. we used GLX on Xvfb for several years in OpenSCAD test suite. https://bugzilla.redhat.com/show_bug.cgi?id=904851 – don bright Sep 06 '15 at 03:09
  • Well that comment in wiki was removed in the meantime. https://en.wikipedia.org/w/index.php?title=Xvfb&diff=prev&oldid=647678972 – Vladimír Čunát May 04 '16 at 10:59

3 Answers3

5

Xvfb (X virtual Frame buffer) is a Xsever virtual do not support real hardware acceleration.

You need spawn openGL calls, with virtualGL, fork the real calls via a real 3D Xserver and 2d rendering to Xvfb or another 2D Xserver.

$ Xvfb :1 -screen 0 1024x768x24 +extension GLX +render -noreset >> xsession.log 2>&1 &
$ env DISPLAY=:1 vglrun glxinfo 
RobotJohnny
  • 1,021
  • 8
  • 18
al3x609
  • 51
  • 1
  • 3
  • 1
    While it doesn't support real hardware acceleration, it supports Mesa (software GLX) just fine - I checked some time ago (still in 2018). So you don't **need** to use a real 3D Xserver, though it's of course an option. – dirkt Sep 12 '18 at 11:08
2

in my log files i see everything is okay up to Initializing built-in extension GLX but then it is followed by

The XKEYBOARD keymap compiler (xkbcomp) reports:
> Internal error:   Could not resolve keysym XF86AudioMicMute
Errors from xkbcomp are not fatal to the X server

may be the key issue is with xkbcomp?

1

In wiki page of Xvfb it says:" Unlike a real display server, Xvfb does not support modern X11 extensions like compositing, Randr or GLX. Xdummy is a newer alternative which supports these extensions as well as providing the same functionality as Xvfb."

alpert
  • 468
  • 3
  • 8
  • For more information, use `Xdummy -h` (there is no manpage as of x11vnc 0.9.13-6 on Arch Linux). – Lekensteyn Aug 02 '15 at 14:29
  • 10
    this answer is not correct. we used GLX on Xvfb for several years in linux for headless OpenSCAD test suite. https://bugzilla.redhat.com/show_bug.cgi?id=904851 the wiki has since been updated and that line removed. – don bright Sep 06 '15 at 03:09