Getting egl clients to work

Bill Spitzak spitzak at gmail.com
Tue May 27 16:11:04 PDT 2014


On 05/25/2014 11:22 PM, Pekka Paalanen wrote:

> I suppose this refers to the DRI2 protocol for X11. I believe it is an
> internal detail in getting Mesa EGL working properly under X11 for
> Weston itself. This doesn't apply to totally different graphics stacks
> like the Nvidia proprietary.
>
> This has nothing to do with Wayland clients or Weston demo apps,
> though. "The EGL" for Wayland clients is a different EGL platform than
> what the compositor uses, and is mostly orthogonal. For instance, even
> if the compositor does not have EGL available, Wayland apps may still
> use EGL with a software renderer (in Mesa's case this is currently
> implemented in egl_gallium.so).
>
> Xwayland is yet another story.
>
> Maybe it would be best to not change the text here. If you want, you
> can add a separate bullet point for the nvidia proprietary driver
> telling when it got EGL support for both 32 and 64 bit machines, and
> that it could allow to run Weston only with the x11-backend, and
> without support for hardware accelerated clients/apps. You got this
> setup to work, right? (If you have to use --use-pixman for Weston, then
> this is *not* working and should not be mentioned.)
>
> To me it still seems a pretty big loss of features compared to a fully
> working stack.

Okay I am not sure what is going on. You are right that I was guessing 
and may have guessed wrong.

My current state:

1. I can only run the x11-compositor. It does appear to be using 
software egl, because if I remove $WLD/install/lib/dri I get these 
errors when trying to run weston:

libEGL debug: failed to open 
/home/wspitzak/install/lib/dri/swrast_dri.so: 
/home/wspitzak/install/lib/dri/swrast_dri.so: cannot open shared object 
file: No such file or directory

libEGL warning: DRI2: failed to open swrast (search paths 
/home/wspitzak/install/lib/dri)
libEGL debug: EGL user error 0x3001 (EGL_NOT_INITIALIZED) in eglInitialize

2. Under x11-compositor I can run most weston demo programs, include x 
programs. I can even run glxgears.

3. I cannot run weston clients that require egl, such as 
weston-simple-egl and weston-gears. weston-simple-egl prints all of this 
before failing (if I turn on the debugging information):

$ weston/weston-simple-egl
[2694278.526]  -> wl_display at 1.get_registry(new id wl_registry at 2)
[2694278.673] wl_display at 1.get_registry(new id wl_registry at 2)
[2694278.718]  -> wl_registry at 2.global(1, "wl_display", 1)
[2694278.758]  -> wl_registry at 2.global(2, "wl_compositor", 3)
[2694278.778]  -> wl_registry at 2.global(3, "wl_subcompositor", 1)
[2694278.797]  -> wl_registry at 2.global(4, "wl_scaler", 2)
[2694278.813]  -> wl_registry at 2.global(5, "wl_text_input_manager", 1)
[2694278.824]  -> wl_registry at 2.global(6, "wl_data_device_manager", 1)
[2694278.835]  -> wl_registry at 2.global(7, "wl_shm", 1)
[2694278.846]  -> wl_registry at 2.global(8, "wl_seat", 3)
[2694278.857]  -> wl_registry at 2.global(9, "wl_input_method", 1)
[2694278.868]  -> wl_registry at 2.global(10, "wl_output", 2)
[2694278.878]  -> wl_registry at 2.global(11, "wl_input_panel", 1)
[2694278.889]  -> wl_registry at 2.global(12, "wl_shell", 1)
[2694278.900]  -> wl_registry at 2.global(13, "xdg_shell", 1)
[2694278.911]  -> wl_registry at 2.global(14, "desktop_shell", 2)
[2694278.922]  -> wl_registry at 2.global(15, "screensaver", 1)
[2694278.933]  -> wl_registry at 2.global(16, "workspace_manager", 1)
[2694278.944]  -> wl_registry at 2.global(17, "screenshooter", 1)
[2694279.048] wl_registry at 2.global(1, "wl_display", 1)
[2694279.165] wl_registry at 2.global(2, "wl_compositor", 3)
[2694279.224]  -> wl_registry at 2.bind(2, "wl_compositor", 1, new id 
[unknown]@3)
[2694279.291] wl_registry at 2.global(3, "wl_subcompositor", 1)
[2694279.331] wl_registry at 2.global(4, "wl_scaler", 2)
[2694279.369] wl_registry at 2.global(5, "wl_text_input_manager", 1)
[2694279.406] wl_registry at 2.global(6, "wl_data_device_manager", 1)
[2694279.445] wl_registry at 2.global(7, "wl_shm", 1)
[2694279.487]  -> wl_registry at 2.bind(7, "wl_shm", 1, new id [unknown]@4)
[2694279.624]  -> wl_shm at 4.create_pool(new id wl_shm_pool at 5, fd 5, 4096)
[2694281.030]  -> wl_shm_pool at 5.resize(12288)
[2694281.154]  -> wl_shm_pool at 5.resize(28672)
[2694281.231]  -> wl_shm_pool at 5.resize(61440)
[2694281.379]  -> wl_shm_pool at 5.resize(126976)
[2694281.644]  -> wl_shm_pool at 5.resize(258048)
[2694283.190]  -> wl_shm_pool at 5.resize(520192)
[2694286.996]  -> wl_shm_pool at 5.resize(1044480)
[2694290.647] wl_registry at 2.global(8, "wl_seat", 3)
[2694290.763]  -> wl_registry at 2.bind(8, "wl_seat", 1, new id [unknown]@6)
[2694290.835] wl_registry at 2.global(9, "wl_input_method", 1)
[2694290.877] wl_registry at 2.global(10, "wl_output", 2)
[2694290.913] wl_registry at 2.global(11, "wl_input_panel", 1)
[2694290.951] wl_registry at 2.global(12, "wl_shell", 1)
[2694290.988] wl_registry at 2.global(13, "xdg_shell", 1)
[2694291.026]  -> wl_registry at 2.bind(13, "xdg_shell", 1, new id [unknown]@7)
[2694291.084]  -> xdg_shell at 7.use_unstable_version(3)
[2694291.105] wl_registry at 2.global(14, "desktop_shell", 2)
[2694291.144] wl_registry at 2.global(15, "screensaver", 1)
[2694291.184] wl_registry at 2.global(16, "workspace_manager", 1)
[2694291.223] wl_registry at 2.global(17, "screenshooter", 1)
libEGL debug: Native platform type: wayland (autodetected)
libEGL debug: EGL search path is /home/wspitzak/install/lib/egl
libEGL debug: added egl_dri2 to module array
[2694291.399]  -> wl_display at 1.get_registry(new id wl_registry at 8)
[2694291.432]  -> wl_display at 1.sync(new id wl_callback at 9)
[2694291.566] wl_registry at 2.bind(2, "wl_compositor", 1, new id [unknown]@3)
[2694291.619] wl_registry at 2.bind(7, "wl_shm", 1, new id [unknown]@4)
[2694291.650]  -> wl_shm at 4.format(0)
[2694291.662]  -> wl_shm at 4.format(1)
[2694291.673]  -> wl_shm at 4.format(909199186)
[2694291.685] wl_shm at 4.create_pool(new id wl_shm_pool at 5, fd 31, 4096)
[2694291.720] wl_shm_pool at 5.resize(12288)
[2694291.738] wl_shm_pool at 5.resize(28672)
[2694291.749] wl_shm_pool at 5.resize(61440)
[2694291.760] wl_shm_pool at 5.resize(126976)
[2694291.771] wl_shm_pool at 5.resize(258048)
[2694291.793] wl_shm_pool at 5.resize(520192)
[2694291.809] wl_shm_pool at 5.resize(1044480)
[2694291.824] wl_registry at 2.bind(8, "wl_seat", 1, new id [unknown]@6)
[2694291.841]  -> wl_seat at 6.capabilities(3)
[2694291.849] wl_registry at 2.bind(13, "xdg_shell", 1, new id [unknown]@7)
[2694291.865] xdg_shell at 7.use_unstable_version(3)
[2694291.873] wl_display at 1.get_registry(new id wl_registry at 8)
[2694291.883]  -> wl_registry at 8.global(1, "wl_display", 1)
[2694291.894]  -> wl_registry at 8.global(2, "wl_compositor", 3)
[2694291.904]  -> wl_registry at 8.global(3, "wl_subcompositor", 1)
[2694291.915]  -> wl_registry at 8.global(4, "wl_scaler", 2)
[2694291.926]  -> wl_registry at 8.global(5, "wl_text_input_manager", 1)
[2694291.937]  -> wl_registry at 8.global(6, "wl_data_device_manager", 1)
[2694291.947]  -> wl_registry at 8.global(7, "wl_shm", 1)
[2694291.958]  -> wl_registry at 8.global(8, "wl_seat", 3)
[2694291.968]  -> wl_registry at 8.global(9, "wl_input_method", 1)
[2694291.979]  -> wl_registry at 8.global(10, "wl_output", 2)
[2694291.990]  -> wl_registry at 8.global(11, "wl_input_panel", 1)
[2694292.000]  -> wl_registry at 8.global(12, "wl_shell", 1)
[2694292.011]  -> wl_registry at 8.global(13, "xdg_shell", 1)
[2694292.022]  -> wl_registry at 8.global(14, "desktop_shell", 2)
[2694292.032]  -> wl_registry at 8.global(15, "screensaver", 1)
[2694292.043]  -> wl_registry at 8.global(16, "workspace_manager", 1)
[2694292.054]  -> wl_registry at 8.global(17, "screenshooter", 1)
[2694292.064] wl_display at 1.sync(new id wl_callback at 9)
[2694292.073]  -> wl_callback at 9.done(25)
[2694292.080]  -> wl_display at 1.delete_id(9)
[2694292.192] wl_display at 1.delete_id(9)
[2694292.252] wl_registry at 8.global(1, "wl_display", 1)
[2694292.295] wl_registry at 8.global(2, "wl_compositor", 3)
[2694292.331] wl_registry at 8.global(3, "wl_subcompositor", 1)
[2694292.369] wl_registry at 8.global(4, "wl_scaler", 2)
[2694292.407] wl_registry at 8.global(5, "wl_text_input_manager", 1)
[2694292.446] wl_registry at 8.global(6, "wl_data_device_manager", 1)
[2694292.486] wl_registry at 8.global(7, "wl_shm", 1)
[2694292.524] wl_registry at 8.global(8, "wl_seat", 3)
[2694292.564] wl_registry at 8.global(9, "wl_input_method", 1)
[2694292.602] wl_registry at 8.global(10, "wl_output", 2)
[2694292.640] wl_registry at 8.global(11, "wl_input_panel", 1)
[2694292.684] wl_registry at 8.global(12, "wl_shell", 1)
[2694292.723] wl_registry at 8.global(13, "xdg_shell", 1)
[2694292.762] wl_registry at 8.global(14, "desktop_shell", 2)
[2694292.803] wl_registry at 8.global(15, "screensaver", 1)
[2694292.835] wl_registry at 8.global(16, "workspace_manager", 1)
[2694292.877] wl_registry at 8.global(17, "screenshooter", 1)
[2694292.909] wl_callback at 9.done(25)
libEGL debug: EGL user error 0x3001 (EGL_NOT_INITIALIZED) in eglInitialize
weston-simple-egl: clients/simple-egl.c:151: init_egl: Assertion `ret == 
1' failed.
Aborted (core dumped)

The likely culprit seems to be "added egl_dri2 to module array" though I 
cannot figure out where this came from. The directory 
/home/wspitzak/install/lib/egl does not exist.


More information about the wayland-devel mailing list