Dear all,

(note: cross-posted to "xorg" and "mesa-users")

I am trying to get OpenGL to work with an Xvfb server,
but running into problems.

LIBGL_DEBUG=verbose /bin/mesa_demos/glxinfo
shows
libGL: screen 0 does not appear to be DRI3 capable
libGL error: failed to load driver: swrast
Error: couldn't find RGB GLX visual or fbconfig

However,
/bin/xdpyinfo
shows
number of extensions:    23
    [...]
    DRI3
    GLX
    [...]

So:
1) Is Xvfb supposed to be DRI3 capable?
2) How come xdpyinfo shows DRI3 extension but glxinfo barfs?
3) How to get OpenGL to work with Xvfb?

Any help would be most appreciated!

/Henrik


===== MORE INFO =====

I am developing a linux distro called KaarPux:
http://kaarpux.kaarposoft.dk/

KaarPux is usually build in a kvm.
Each package is build (make, check install) from source.

Some packages require a running X server for "make check",
so we start an Xvfb server before building.
See line 150-166 of
http://sourceforge.net/p/kaarpux/code/ci/v4.5.3/tree/master/expert/dangerous_build_rest.sh

In general this works well:
Packages needing X for "make check" work like a charm.

However, "make check" for packages needing OpenGL (such as "cogl")
are failing.

So I tried
/bin/xdpyinfo
which shows
----------------------------------------
name of display:    :42
version number:    11.0
vendor string:    KaarPux
vendor release number:    11600000
maximum request size:  16777212 bytes
motion buffer size:  256
bitmap unit, bit order, padding:    32, LSBFirst, 32
image byte order:    LSBFirst
number of supported pixmap formats:    6
supported pixmap formats:
    depth 1, bits_per_pixel 1, scanline_pad 32
    depth 4, bits_per_pixel 8, scanline_pad 32
    depth 8, bits_per_pixel 8, scanline_pad 32
    depth 16, bits_per_pixel 16, scanline_pad 32
    depth 24, bits_per_pixel 32, scanline_pad 32
    depth 32, bits_per_pixel 32, scanline_pad 32
keycode range:    minimum 8, maximum 255
focus:  PointerRoot
number of extensions:    23
    BIG-REQUESTS
    DAMAGE
    DOUBLE-BUFFER
    DPMS
    DRI3
    GLX
    Generic Event Extension
    MIT-SCREEN-SAVER
    MIT-SHM
    Present
    RECORD
    RENDER
    SECURITY
    SGI-GLX
    SHAPE
    SYNC
    X-Resource
    XC-MISC
    XFIXES
    XInputExtension
    XKEYBOARD
    XTEST
    XVideo
default screen number:    0
number of screens:    1
screen #0:
  dimensions:    1280x1024 pixels (325x260 millimeters)
  resolution:    100x100 dots per inch
  depths (6):    8, 1, 4, 16, 24, 32
  root window id:    0xfe
  depth of root window:    8 planes
  number of colormaps:    minimum 1, maximum 1
  default colormap:    0x20
  default number of colormap cells:    256
  preallocated pixels:    black 0, white 1
  options:    backing-store NO, save-unders NO
  largest cursor:    1280x1024
  current input event mask:    0x0
  number of visuals:    6
  default visual id:  0x21
  visual:
    visual id:    0x21
    class:    PseudoColor
    depth:    8 planes
    available colormap entries:    256
    red, green, blue masks:    0x0, 0x0, 0x0
    significant bits in color specification:    8 bits
[...]
----------------------------------------

However,
MESA_DEBUG=1 LIBGL_DEBUG=verbose /bin/mesa_demos/glxinfo
shows
----------------------------------------
libGL: screen 0 does not appear to be DRI3 capable
libGL: OpenDriver: trying //lib/dri/tls/swrast_dri.so
libGL: OpenDriver: trying //lib/dri/swrast_dri.so
libGL: driver does not expose __driDriverGetExtensions_swrast(): //lib/dri/swrast_dri.so: undefined symbol: __driDriverGetExtensions_swrast libGL: Can't open configuration file /root/.drirc: No such file or directory. libGL: Can't open configuration file /root/.drirc: No such file or directory.
libGL error: failed to load driver: swrast
Error: couldn't find RGB GLX visual or fbconfig
name of display: :42
180 GLXFBConfigs:
    visual  x   bf lv rg d st  colorbuffer  sr ax dp st accumbuffer ms  cav
id dep cl sp sz l ci b ro r g b a F gb bf th cl r g b a ns b eat
----------------------------------------------------------------------------
0x049  0 tc  0  32  0 r  . .   8  8  8  8 .  .  0  0  0  0  0  0  0 0 0 None
0x04a  0 tc  0  32  0 r  . .   8  8  8  8 .  .  0  0  0 16 16 16 16 0 0 Slow
0x04b  0 tc  0  32  0 r  y .   8  8  8  8 .  .  0  0  0  0  0  0  0 0 0 None
[...]
----------------------------------------

Also,
/bin/mesa_demos/glxgears
shows
----------------------------------------
libGL error: failed to load driver: swrast
Error: couldn't get an RGB, Double-buffered visual
----------------------------------------

So far, I have nailed it down to
MesaLib src/glx/dri3_glx.c
http://cgit.freedesktop.org/mesa/mesa/tree/src/glx/dri3_glx.c?id=mesa-10.2.4
line 1742/1744 where visuals is NULL.

(by the way, IMHO, MesaLib src/glx/dri3_glx.c
function dri3_create_screen
is in dire need of better error messages,
as several paths leads to "handle_error".
I can provide a patch if so requested)

If I run a default X server (in the same kvm virtual machine),
/lib/xorg/modules/drivers/qxl_drv.so is selected as driver, and
glxinfo and glxgears works as expected.

If I copy the system to a bare metal server,
and run a default X server there,
/lib/xorg/modules/drivers/radeon_drv.so is selected as driver, and
glxinfo and glxgears works as expected.

Package versions:
linux 3.15.6
MesaLib 10.2.4
xorg-server 1.16.0

Package configs:
http://sourceforge.net/p/kaarpux/code/ci/v4.5.3/tree/master/packages/m/MesaLib.yaml
http://sourceforge.net/p/kaarpux/code/ci/v4.5.3/tree/master/packages/x/xorg-server.yaml

Any help would be most appreciated!

/Henrik

_______________________________________________
xorg@lists.x.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: http://lists.x.org/mailman/listinfo/xorg
Your subscription address: %(user_address)s

Reply via email to