<HTML>
<HEAD>
<META content="text/html; charset=utf-8" http-equiv=Content-Type>
<META content="OPENWEBMAIL" name=GENERATOR>
</HEAD>
<BODY bgColor=#ffffff>

<div>Hello,</div>

<div>
<br /></div>

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

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

<div>
<br /></div>

<div>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.</div>

<div>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.</div>

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

<div>
<br /></div>

<div>After doing all this, when I do <b>/etc/init.d/weston restart</b>, 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.</div>

<div>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.
<br /></div>

<div>
<br /></div>

<div>Kindly help. I have pasted weston logs for your perusal.
<br /></div>

<div>
<br /></div>

<div>
<br /></div>

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

<div><i>Failed to create display: Connection reset by peer</i>
<br /></div>

<div>
<br /></div>

<div>Thanks,</div>

<div>Devashish
<br /></div>

<div>
<br /></div>

<div>
<br /></div>

<div><font size="2"><b>On Wed, 27 Nov 2019 15:48:48 +0200, Pekka Paalanen wrote</b></font></div>
<font size="2">On Wed, 27 
Nov 2019 16:25:46 +0530 
<br /> 

"Devashish Tiwari" <devashish@cdot.in> wrote: 
<br /> 
<br /> 

> Hello, 
<br /> 

>  
<br /> 

> Thanks for your response. 
<br /> 

>  
<br /> 

> I rebooted my EVM after making changes to /etc/weston.ini file and I 
<br /> 

> found out in /var/log/weston.log that it is using DRM-backend now. 
<br /> 

<br /> 

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

<br /> 

Hi, 
<br /> 
<br /> 

no, I don't think Xwayland had anything to do with it. More likely you 
<br /> 

had WAYLAND_DISPLAY set in your environment, too, maybe from some 
<br /> 

random experimenting. That causes Weston to pick the wayland-backend. 
<br /> 
<br /> 

> However, it still shows some error regarding EGL library, although I have 
already specified LD_LIBRARY_PATH. 
<br /> 

>  
<br /> 

> Date: 2019-04-06 
UTC                                                                                                 
 
<br /> 

> [01:57:12.089] weston 
2.0.0                                                                                          
 
<br /> 

>                <a href="http://wayland.freedesktop.org/" target="_blank">http://wayland.freedesktop.org</a>                                                                        
 
<br /> 

>                Bug reports to: <a href="https://bugs.freedesktop.org/enter_bug.cgi?product=Wayland&component=weston&version=2.0.0" target="_blank">https://bugs.freedesktop.org/enter_bug.cgi?product=Wayland&component=weston&version=2.0.0</a> 

<br /> 

>                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) 
<br /> 

> [01:57:12.089] Command line: weston 
--idle-time=0                                                                                
 
<br /> 

> [01:57:12.089] OS: Linux, 4.14.79-ge669d52447, #1 SMP PREEMPT Sat Apr 6 
02:23:36 UTC 2019, 
armv7l                                 
<br /> 

> [01:57:12.090] Using config file 
'/etc//weston.ini'                                                                              
 
<br /> 

> [01:57:12.090] Output repaint window is 7 ms 
maximum.                                                                            
 
<br /> 

> [01:57:12.090] Loading module 
'/usr/lib/libweston-2/drm-backend.so'                                                              
 
<br /> 

> [01:57:12.091] initializing drm 
backend                                                          
 
<br /> 

> [01:57:12.092] using 
/dev/dri/card0                                                              
 
<br /> 

> [01:57:12.093] Loading module '/usr/lib/libweston-2/gl-renderer.so' 
<br /> 

> failed to load module: /usr/lib/gbm/gbm_dri.so: cannot open shared object 
file: No such file or directory 
<br /> 

> failed to load module: /usr/lib/gbm/gbm_gallium_drm.so: cannot open shared 
object file: No such file or directory 
<br /> 

> loaded module : 
gbm_pvr.so                                                                                       
 
<br /> 

> found valid GBM backend : 
gbm_pvr.so                                                                             
 
<br /> 
<br /> 

Is gbm_pvr a prorietary driver library? We cannot generally help with 
<br /> 

anything related to proprietary drivers, you'll have to reach out to 
<br /> 

the vendor instead. 
<br /> 
<br /> 

> [01:57:12.114] EGL client extensions: 
EGL_EXT_client_extensions                                                  
 
<br /> 

>                EGL_EXT_platform_base 
EGL_KHR_client_get_all_proc_addresses                                       
 
<br /> 

>                EGL_KHR_debug EGL_EXT_platform_wayland 
EGL_EXT_platform_x11                                       
 
<br /> 

>                
EGL_MESA_platform_gbm                                      
 
<br /> 

> [01:57:12.114] failed to initialize 
display                                
<br /> 

> [01:57:12.114] EGL error state: EGL_NOT_INITIALIZED 
(0x3001)               
<br /> 
<br /> 

A problem with EGL, that is the graphics driver stack. 
<br /> 
<br /> 

> [01:57:12.114] failed to initialize 
egl                                    
<br /> 

> [01:57:12.140] fatal: failed to create compositor 
backend                 
<br /> 

>  
<br /> 

> My /etc/weston.ini file looks like this: 
<br /> 

>  
<br /> 

> [core] 
<br /> 

> require-input=false 
<br /> 

> xwayland=true 
<br /> 

>  
<br /> 

> [shell] 
<br /> 

> locking=false 
<br /> 

> animation=zoom 
<br /> 

> panel-position=top 
<br /> 

> startup-animation=fade 
<br /> 

>  
<br /> 

> [screensaver] 
<br /> 

> # Uncomment path to disable screensaver 
<br /> 

> #path=@libexecdir@/weston-screensaver </font>
<br /><font size="2"><b>/etc/init.d/weston restart</b> 

>  
<br /> 

> [xwayland] 
<br /> 

> path=/usr/local/XORG/bin/Xwayland 
<br /> 
<br /> 

The weston.ini looks fine and has nothing that could cause the EGL 
<br /> 

failure. 
<br /> 
<br /> 

>  
<br /> 

> Please note that I have not set any environment variables manually. I 
<br /> 

> have only copied the libraries required by Xwayland on my EVM and 
<br /> 

> added the path to LD_LIBRARY_PATH. 
<br /> 

>  
<br /> 

> The values of WAYLAND_DISPLAY & DISPLAY is null on my system which 
<br /> 

> makes me think that it takes the default values. 
<br /> 
<br /> 

If they are set to empty, that is different from being unset. 
<br /> 
<br /> 

> Also, if I undo the changes to /etc/weston.ini file and comment the 
<br /> 

> xwayland entries, weston works like a cake. I have also attached the 
<br /> 

> logs with this email when weston runs successfully without xwayland. 
<br /> 

<br /> 

I have a hard time believing that. None of the weston.ini keys you 
<br /> 

listed above can affect anything related to the EGL failure. 
<br /> 
<br /> 

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

LD_LIBRARY_PATH could be a factor here though. Try explicitly with it 
<br /> 

set vs. untouched, but otherwise with the setup where Weston worked for 
<br /> 

you. That's the only thing I can guess. Maybe it needs to have a 
<br /> 

specific value for the proprietary drivers to work. 
<br /> 
<br /> 

Thanks, 
<br /> 

pq 
<br />
<br />
<br />--  

<br />
 
<br />
Thanks & Regards, 

<br />
 
<br />
Devashish Tiwari 

<br />
Fault Tolerance 

<br />
#8587 

<br />

<br />
</font>

</BODY>
</HTML>