Unable to run X-clients over Weston through XWayland

Devashish Tiwari devashish at cdot.in
Fri Nov 29 10:55:34 UTC 2019


Hello,

Thanks for the lead regarding LD_LIBRARY_PATH. It seemed like EGL libraries were missing when I did /etc/init.d/weston restart.

I modified the LD_LIBRARY_PATH in /etc/environment file and EGL errors were gone.

Next there was an error regarding /usr/lib/libweston-2/xwayland.so was missing. The weston provided in my linux-SDK by the vendor was not compiled with --enable-xwayland and therefore this library was missing.

I had to download weston-2.0.0 and recompile it with --enable-xwayland flag just to get xwayland.so, and copied it to /usr/lib/libweston-2/ path.

I also copied some X11 based dependencies (libXau, libxcb-composite, libxcb-X11 etc.) required by xwayland.so to /usr/lib/ path.

After doing all this, when I do /etc/init.d/weston restart, I am getting error regarding some cairo-xcb function, which I think is present in libcairo.so file. I tried to cross-compile libcairo.so for armhf architecture but there were some errors.

All these compilation processes takes a lot of time, so I just want to know if I'm on the right path to get the weston working successfully with xwayland.

Kindly help. I have pasted weston logs for your perusal.

Date: 2019-11-29 UTC
[09:57:50.141] weston 2.0.0
               Build: 1.99.94-2-g4c4f13d configure.ac: bump to version 2.0.0 for the official release (2017-02-24 16:19:03 -0800)
[09:57:50.141] Command line: weston --idle-time=0
[09:57:50.141] OS: Linux, 4.14.79-ge669d52447, #1 SMP PREEMPT Sat Apr 6 02:23:36 UTC 2019, armv7l
[09:57:50.142] Using config file '/etc//weston.ini'
[09:57:50.142] Output repaint window is 7 ms maximum.
[09:57:50.142] Loading module '/usr/lib/libweston-2/drm-backend.so'
[09:57:50.143] initializing drm backend
[09:57:50.144] using /dev/dri/card0
[09:57:50.144] Loading module '/usr/lib/libweston-2/gl-renderer.so'
failed to load module: /usr/lib/gbm/gbm_dri.so: cannot open shared object file: No such file or directory
failed to load module: /usr/lib/gbm/gbm_gallium_drm.so: cannot open shared object file: No such file or directory
loaded module : gbm_pvr.so
found valid GBM backend : gbm_pvr.so
[09:57:50.149] warning: either no EGL_EXT_platform_base support or specific platform support; falling back to eglGetDisplay.
[09:57:50.154] warning: EGL_EXT_buffer_age not supported. Performance could be affected.
[09:57:50.154] warning: neither EGL_EXT_swap_buffers_with_damage or EGL_KHR_swap_buffers_with_damage is supported. Performance could be affected.
[09:57:50.154] Retrieving EGL client extension string failed.
[09:57:50.154] EGL_KHR_surfaceless_context available
[09:57:50.158] EGL version: 1.4 build 1.14 at 3699939 (MAIN)
[09:57:50.158] EGL vendor: Imagination Technologies
[09:57:50.158] EGL client APIs: OpenGL_ES 
[09:57:50.158] EGL extensions: EGL_IMG_client_api_ogl EGL_KHR_image
               EGL_KHR_image_base EGL_KHR_gl_texture_2D_image
               EGL_KHR_gl_texture_cubemap_image EGL_KHR_gl_renderbuffer_image
               EGL_KHR_vg_parent_image EGL_IMG_cl_image EGL_KHR_fence_sync
               EGL_IMG_context_priority EGL_IMG_hibernate_process
               EGL_IMG_image_plane_attribs EGL_KHR_surfaceless_context
               EGL_KHR_wait_sync EGL_KHR_create_context
               EGL_WL_bind_wayland_display EGL_EXT_image_dma_buf_import
[09:57:50.158] GL version: OpenGL ES 2.0 build 1.14 at 3699939 (MAIN)
[09:57:50.158] GLSL version: OpenGL ES GLSL ES 1.00 build 1.14 at 3699939 (MAIN)
[09:57:50.158] GL vendor: Imagination Technologies
[09:57:50.158] GL renderer: PowerVR SGX 544MP
[09:57:50.158] GL extensions: GL_OES_rgb8_rgba8 GL_OES_depth24
               GL_OES_vertex_half_float GL_OES_texture_float
               GL_OES_texture_half_float GL_OES_element_index_uint
               GL_OES_mapbuffer GL_OES_fragment_precision_high
               GL_OES_compressed_ETC1_RGB8_texture GL_OES_EGL_image
               GL_OES_EGL_image_external GL_OES_required_internalformat
               GL_OES_depth_texture GL_OES_get_program_binary
               GL_OES_packed_depth_stencil GL_OES_standard_derivatives
               GL_OES_vertex_array_object GL_OES_egl_sync GL_OES_texture_npot
               GL_OES_surfaceless_context GL_EXT_discard_framebuffer
               GL_EXT_blend_minmax GL_EXT_multi_draw_arrays
               GL_EXT_multisampled_render_to_texture GL_EXT_shader_texture_lod
               GL_EXT_texture_format_BGRA8888 GL_EXT_occlusion_query_boolean
               GL_EXT_texture_rg GL_EXT_draw_buffers
               GL_EXT_shader_framebuffer_fetch GL_IMG_shader_binary
               GL_IMG_texture_compression_pvrtc
               GL_IMG_texture_compression_pvrtc2 GL_IMG_texture_npot
               GL_IMG_texture_format_BGRA8888 GL_IMG_read_format
               GL_IMG_program_binary GL_IMG_uniform_buffer_object
               GL_IMG_multisampled_render_to_texture GL_KHR_debug
[09:57:50.158] GL ES 2 renderer features:
               read-back format: RGBA
               wl_shm sub-image to texture: no
               EGL Wayland extension: yes
[09:57:50.167] event1  - [09:57:50.167] pixcir_tangoc: [09:57:50.167] is tagged by udev as: Touchscreen
[09:57:50.167] event1  - [09:57:50.167] pixcir_tangoc: [09:57:50.167] device is a touch device
[09:57:50.168] event0  - [09:57:50.168] gpio_keys: [09:57:50.168] is tagged by udev as: Keyboard
[09:57:50.168] event0  - [09:57:50.169] gpio_keys: [09:57:50.169] device is a keyboard
[09:57:50.183] Registered plugin API 'weston_drm_output_api_v1' of size 12
[09:57:50.184] Chosen EGL config details:
               RGBA bits: 8 8 8 8
               swap interval range: 1 - 1
[09:57:50.189] cursor buffers unavailable, using gl cursors
[09:57:50.189] Failed to initialize backlight
[09:57:50.190] Output UNNAMED-1, (connector 35, crtc 39)
               mode 800x480 at 59.5, preferred, current
[09:57:50.190] Applying calibration: 1.054472 -0.064559 -8.112976 -0.054517 1.091773 -5.022736 (normalized -0.010141 -0.010464)
[09:57:50.190] Compositor capabilities:
               arbitrary surface rotation: yes
               screen capture uses y-flip: yes
               presentation clock: CLOCK_MONOTONIC, id 1
               presentation clock resolution: 0.000000001 s
[09:57:50.190] Loading module '/usr/lib/weston/desktop-shell.so'
[09:57:50.191] launching '/usr/libexec/weston-keyboard'
[09:57:50.192] Loading module '/usr/lib/libweston-2/xwayland.so'
[09:57:50.207] Failed to load module: /usr/lib/libweston-2/xwayland.so: undefined symbol: cairo_xcb_surface_create_with_xrender_format
Failed to process Wayland connection: Connection reset by peer

Failed to create display: Connection reset by peer

Thanks,

Devashish

On Wed, 27 Nov 2019 15:48:48 +0200, Pekka Paalanen wrote

On Wed, 27 Nov 2019 16:25:46 +0530 
 "Devashish Tiwari" <devashish at cdot.in> wrote:

 > Hello, 
 > 
 > Thanks for your response. 
 > 
 > I rebooted my EVM after making changes to /etc/weston.ini file and I 
 > found out in /var/log/weston.log that it is using DRM-backend now.

 > When I used to run ./Xwayland by hand it used to take Wayland-backend.

 Hi,

 no, I don't think Xwayland had anything to do with it. More likely you 
 had WAYLAND_DISPLAY set in your environment, too, maybe from some 
 random experimenting. That causes Weston to pick the wayland-backend.

 > However, it still shows some error regarding EGL library, although I have already specified LD_LIBRARY_PATH. 
 > 
 > Date: 2019-04-06 UTC                                                                                                 
 > [01:57:12.089] weston 2.0.0                                                                                          
 >                http://wayland.freedesktop.org                                                                        
 >                Bug reports to: https://bugs.freedesktop.org/enter_bug.cgi?product=Wayland&component=weston&version=2.0.0 
 >                Build: 1.99.94-2-g4c4f13d configure.ac: bump to version 2.0.0 for the official release (2017-02-24 16:19:03 -0800) 
 > [01:57:12.089] Command line: weston --idle-time=0                                                                                
 > [01:57:12.089] OS: Linux, 4.14.79-ge669d52447, #1 SMP PREEMPT Sat Apr 6 02:23:36 UTC 2019, armv7l                                
 > [01:57:12.090] Using config file '/etc//weston.ini'                                                                              
 > [01:57:12.090] Output repaint window is 7 ms maximum.                                                                            
 > [01:57:12.090] Loading module '/usr/lib/libweston-2/drm-backend.so'                                                              
 > [01:57:12.091] initializing drm backend                                                          
 > [01:57:12.092] using /dev/dri/card0                                                              
 > [01:57:12.093] Loading module '/usr/lib/libweston-2/gl-renderer.so' 
 > failed to load module: /usr/lib/gbm/gbm_dri.so: cannot open shared object file: No such file or directory 
 > failed to load module: /usr/lib/gbm/gbm_gallium_drm.so: cannot open shared object file: No such file or directory 
 > loaded module : gbm_pvr.so                                                                                       
 > found valid GBM backend : gbm_pvr.so                                                                            

 Is gbm_pvr a prorietary driver library? We cannot generally help with 
 anything related to proprietary drivers, you'll have to reach out to 
 the vendor instead.

 > [01:57:12.114] EGL client extensions: EGL_EXT_client_extensions                                                  
 >                EGL_EXT_platform_base EGL_KHR_client_get_all_proc_addresses                                       
 >                EGL_KHR_debug EGL_EXT_platform_wayland EGL_EXT_platform_x11                                       
 >                EGL_MESA_platform_gbm                                      
 > [01:57:12.114] failed to initialize display                               
 > [01:57:12.114] EGL error state: EGL_NOT_INITIALIZED (0x3001)             

 A problem with EGL, that is the graphics driver stack.

 > [01:57:12.114] failed to initialize egl                                   
 > [01:57:12.140] fatal: failed to create compositor backend                 
 > 
 > My /etc/weston.ini file looks like this: 
 > 
 > [core] 
 > require-input=false 
 > xwayland=true 
 > 
 > [shell] 
 > locking=false 
 > animation=zoom 
 > panel-position=top 
 > startup-animation=fade 
 > 
 > [screensaver] 
 > # Uncomment path to disable screensaver 
 > #path=@libexecdir@/weston-screensaver 
/etc/init.d/weston restart > 
 > [xwayland] 
 > path=/usr/local/XORG/bin/Xwayland

 The weston.ini looks fine and has nothing that could cause the EGL 
 failure.

 > 
 > Please note that I have not set any environment variables manually. I 
 > have only copied the libraries required by Xwayland on my EVM and 
 > added the path to LD_LIBRARY_PATH. 
 > 
 > The values of WAYLAND_DISPLAY & DISPLAY is null on my system which 
 > makes me think that it takes the default values.

 If they are set to empty, that is different from being unset.

 > Also, if I undo the changes to /etc/weston.ini file and comment the 
 > xwayland entries, weston works like a cake. I have also attached the 
 > logs with this email when weston runs successfully without xwayland.

 I have a hard time believing that. None of the weston.ini keys you 
 listed above can affect anything related to the EGL failure.

 I also don't see such attachment in this email, just the HTML copy.

 LD_LIBRARY_PATH could be a factor here though. Try explicitly with it 
 set vs. untouched, but otherwise with the setup where Weston worked for 
 you. That's the only thing I can guess. Maybe it needs to have a 
 specific value for the proprietary drivers to work.

 Thanks, 
 pq

--

Thanks & Regards,

Devashish Tiwari 
Fault Tolerance 
#8587

 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20191129/bbe35638/attachment-0001.html>


More information about the wayland-devel mailing list