Display causes Weston to crash

Hi,

I’m using a verdin iMX8M mini running a weston container (torizon/weston-vivante:2) but every time I try to connect an external display over HDMI, weston stops running. Here are the logs:

EGL_KHR_swap_buffers_with_damage EGL_EXT_pixel_format_float
[15:53:19.676] EGL_KHR_surfaceless_context available
[15:53:19.676] EGL vendor: Vivante Corporation
[15:53:19.676] EGL client APIs: OpenGL_ES OpenVG
[15:53:19.676] EGL extensions: EGL_KHR_fence_sync EGL_KHR_reusable_sync
               EGL_KHR_wait_sync EGL_KHR_image EGL_KHR_image_base
               EGL_KHR_image_pixmap EGL_KHR_gl_texture_2D_image
               EGL_KHR_gl_texture_cubemap_image EGL_KHR_gl_renderbuffer_image
               EGL_EXT_image_dma_buf_import
               EGL_EXT_image_dma_buf_import_modifiers EGL_KHR_lock_surface
               EGL_KHR_create_context EGL_KHR_no_config_context
               EGL_KHR_surfaceless_context EGL_KHR_get_all_proc_addresses
               EGL_EXT_buffer_age EGL_ANDROID_native_fence_sync
               EGL_WL_bind_wayland_display
               EGL_WL_create_wayland_buffer_from_image EGL_KHR_partial_update
               EGL_EXT_swap_buffers_with_damage
               EGL_KHR_swap_buffers_with_damage EGL_EXT_pixel_format_float
[15:53:19.676] EGL_KHR_surfaceless_context available
[15:53:19.682] GL version: OpenGL ES 2.0 V6.4.3.p1.305572
[15:53:19.682] GLSL version: OpenGL ES GLSL ES 1.0.0
[15:53:19.682] GL version: OpenGL ES 2.0 V6.4.3.p1.305572
[15:53:19.682] GLSL version: OpenGL ES GLSL ES 1.0.0
[15:53:19.682] GL vendor: Vivante Corporation
[15:53:19.682] GL renderer: Vivante GC7000NanoUltra
[15:53:19.682] GL extensions: GL_OES_vertex_half_float
               GL_OES_element_index_uint GL_OES_mapbuffer
               GL_OES_vertex_array_object GL_OES_compressed_ETC1_RGB8_texture
               GL_OES_compressed_paletted_texture GL_OES_texture_npot
               GL_OES_rgb8_rgba8 GL_OES_depth_texture
               GL_OES_depth_texture_cube_map GL_OES_depth24 GL_OES_depth32
[15:53:19.682] GL vendor: Vivante Corporation
[15:53:19.682] GL renderer: Vivante GC7000NanoUltra
[15:53:19.682] GL extensions: GL_OES_vertex_half_float
               GL_OES_element_index_uint GL_OES_mapbuffer
               GL_OES_vertex_array_object GL_OES_compressed_ETC1_RGB8_texture
               GL_OES_compressed_paletted_texture GL_OES_texture_npot
               GL_OES_rgb8_rgba8 GL_OES_depth_texture
               GL_OES_depth_texture_cube_map GL_OES_depth24 GL_OES_depth32
               GL_OES_packed_depth_stencil GL_OES_fbo_render_mipmap
               GL_OES_get_program_binary GL_OES_fragment_precision_high
               GL_OES_standard_derivatives GL_OES_EGL_image
               GL_OES_EGL_image_external GL_OES_EGL_image_external_essl3
               GL_OES_EGL_sync GL_OES_required_internalformat
               GL_OES_surfaceless_context GL_OES_texture_border_clamp
               GL_EXT_texture_type_2_10_10_10_REV
               GL_EXT_texture_compression_dxt1 GL_EXT_texture_format_BGRA8888
               GL_EXT_texture_compression_s3tc GL_EXT_read_format_bgra
               GL_OES_packed_depth_stencil GL_OES_fbo_render_mipmap
               GL_OES_get_program_binary GL_OES_fragment_precision_high
               GL_OES_standard_derivatives GL_OES_EGL_image
               GL_OES_EGL_image_external GL_OES_EGL_image_external_essl3
               GL_OES_EGL_sync GL_OES_required_internalformat
               GL_OES_surfaceless_context GL_OES_texture_border_clamp
               GL_EXT_texture_type_2_10_10_10_REV
               GL_EXT_texture_compression_dxt1 GL_EXT_texture_format_BGRA8888
               GL_EXT_texture_compression_s3tc GL_EXT_read_format_bgra
               GL_EXT_multi_draw_arrays GL_EXT_frag_depth
               GL_EXT_discard_framebuffer GL_EXT_blend_minmax
               GL_EXT_multisampled_render_to_texture GL_EXT_robustness
               GL_EXT_texture_sRGB_decode GL_EXT_texture_border_clamp
               GL_EXT_texture_rg GL_VIV_direct_texture
               GL_EXT_multi_draw_arrays GL_EXT_frag_depth
               GL_EXT_discard_framebuffer GL_EXT_blend_minmax
               GL_EXT_multisampled_render_to_texture GL_EXT_robustness
               GL_EXT_texture_sRGB_decode GL_EXT_texture_border_clamp
               GL_EXT_texture_rg GL_VIV_direct_texture
[15:53:19.683] GL ES 2 renderer features:
               read-back format: BGRA
               wl_shm sub-image to texture: no
               EGL Wayland extension: yes
[15:53:19.683] GL ES 2 renderer features:
               read-back format: BGRA
               wl_shm sub-image to texture: no
               EGL Wayland extension: yes
[15:53:19.693] event1  - gpio-keys: is tagged by udev as: Keyboard
[15:53:19.693] event1  - gpio-keys: is tagged by udev as: Keyboard
[15:53:19.694] event1  - gpio-keys: device is a keyboard
[15:53:19.694] event1  - gpio-keys: device is a keyboard
[15:53:19.698] event0  - 30370000.snvs:snvs-powerkey: is tagged by udev as: Keyboard
[15:53:19.698] event0  - 30370000.snvs:snvs-powerkey: is tagged by udev as: Keyboard
[15:53:19.698] event0  - 30370000.snvs:snvs-powerkey: device is a keyboard
[15:53:19.698] event0  - 30370000.snvs:snvs-powerkey: device is a keyboard
[15:53:19.719] libinput: configuring device "gpio-keys".
[15:53:19.719] libinput: configuring device "30370000.snvs:snvs-powerkey".
[15:53:19.719] libinput: configuring device "gpio-keys".
[15:53:19.719] libinput: configuring device "30370000.snvs:snvs-powerkey".
[15:53:19.748] DRM: head 'HDMI-A-1' found, connector 35 is connected, EDID make 'unknown', model 'unknown', serial 'unknown'
[15:53:19.748] DRM: head 'HDMI-A-1' found, connector 35 is connected, EDID make 'unknown', model 'unknown', serial 'unknown'
[15:53:19.749] Registered plugin API 'weston_drm_output_api_v1' of size 24
[15:53:19.749] Registered plugin API 'weston_drm_virtual_output_api_v1' of size 48
[15:53:19.749] Registered plugin API 'weston_drm_output_api_v1' of size 24
[15:53:19.749] Registered plugin API 'weston_drm_virtual_output_api_v1' of size 48
[15:53:19.749] no available modes for HDMI-A-1
[15:53:19.749] Cannot configure an output using weston_drm_output_api.
[15:53:19.749] no available modes for HDMI-A-1
[15:53:19.749] Cannot configure an output using weston_drm_output_api.
[15:53:19.750] event1  - gpio-keys: device removed
[15:53:19.750] event0  - 30370000.snvs:snvs-powerkey: device removed
[15:53:19.750] event1  - gpio-keys: device removed
[15:53:19.750] event0  - 30370000.snvs:snvs-powerkey: device removed

The display I’m trying to use is a Elecrow RR050 5 Inch. It seems like the display is not recognised?

Here’s the board details:

Kernel version:           5.15.77-6.2.0+git.aa0ff7e3554e #1-TorizonCore SMP PREEMPT Wed Mar 29 15:33:40 UTC 2023
Distro name:              NAME="TorizonCore"
Distro version:           VERSION_ID=6.2.0-build.2
Hostname:                 verdin-imx8mm-07218371

Any help would be appreciated!

Greetings @jvieira,

From what I can tell it seems like your display is seen/found by Weston. But, for whatever reason it can’t determine any information about it as seen from these lines:

DRM: head 'HDMI-A-1' found, connector 35 is connected, EDID make 'unknown', model 'unknown', serial 'unknown'
...
no available modes for HDMI-A-1

This means Weston can’t determine any display settings, timings, resolutions for your display. Essentially it doesn’t know how to drive your display. Now this is very strange since typically HDMI displays should have EDID information they can provide the system, but in this case it seems none is present.

I’m not sure what else to say since it seems like this is specific to this display. Just to clarify other standard HDMI displays work fine correct?

Best Regards,
Jeremias

Hi @jeremias.tx,

Yes, I thought that was the case. Yes, other HDMI PC monitors work fine, just not this 5 inch touchscreen display.

Okay at least it’s good to know that other displays work fine. That said, I’m not sure how much we can help you if the issue is specific to this display. As a last attempt you can try hard-coding resolution/mode information in Weston for your display: Working with Weston on TorizonCore | Toradex Developer Center

But I’m not sure if this would work for a display that’s not providing any information of it’s own at all.

Best Regards,
Jeremias

Hello @jvieira ,
Are there any updates on this topic? Were you able to try what @jeremias.tx suggested?

Best regards,
Josep

Hi @josep.tx and @jeremias.tx, after changing the contents of the weston.ini file with:

[output]
name=HDMI-A-1
mode=800x480@60

I still can’t get an image, the problem seems to be different. I’ve attached the log file.
_torizon-weston-1_logs.txt (5.7 KB)

I see something like could not load cursor 'dnd-move' and glamor: 'wl_drm' not supported. Any thoughts?

Regards,
Joao

Those two lines aren’t blocking errors, I’ve seen these before and still had my display working. Unfortunately, it just seems the issue is with this specific display. For whatever reason Weston can’t get any information from this display meaning it can’t set any resolution either it seems.

Are you stuck using these displays? Or are you able to use other display that work out of the box?

Best Regards,
Jeremias

Hi Jeremias,

I was following the information here.
Changing from COPY weston.ini /etc/xdg/weston/ to COPY weston.ini /etc/xdg/weston/weston.ini obviously helped :slight_smile: The image is working now.

The only problem now is the touchscreen is not working. I’m wondering if I need to make changes to the device tree overlay? Looking at the data for this display, in a raspberrypi it would need something like:

dtoverlay=ads7846,cs=1,penirq=25,penirq_pull=2,speed=50000,keep_vref_on=0,swapxy=0,pmax=255,xohms=150,xmin=200,xmax=3900,ymin=200,ymax=3900

Could you just point me towards some info about how to do this?
Regards,
Joao

Hello @jvieira ,

The touch controller is connected via USB, right? If so, could you please send us the output of lsusb and evtest(if possible)?

Best regards,
Josep

Hi Josep,

Yes, it’s connected over USB. Here’s the information requested:

lsusb
Bus 001 Device 004: ID 0424:2740 Microchip Technology, Inc. (formerly SMSC) Hub Controller
Bus 001 Device 003: ID 0461:4d0f Primax Electronics, Ltd HP Optical Mouse
Bus 001 Device 002: ID 0424:2744 Microchip Technology, Inc. (formerly SMSC) Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
evtest
No device specified, trying to scan all of /dev/input/event*
Not running as root, no devices may be available.
Available devices:
/dev/input/event0:      30370000.snvs:snvs-powerkey
/dev/input/event1:      gpio-keys
/dev/input/event2:      PixArt USB Optical Mouse

It doesn’t seem like the device is found. Missing the driver?

Regards,
Joao

Hi @jvieira ,
Does the touch controller work when connected , for example , to a PC?

Best regards,
Josep

Hi @josep.tx ,

Although the display works when connected to a windows machine, the touchscreen doesn’t work. I’ll try some other display. We can close this topic. Thanks for your help anyway!

Regards,
Joao

Just to add on to the touchscreen topic. I have a HDMI display on my desk that provides touch via USB as well. I just tried it and it seems to “just work” out of the box. I’m not sure if your device needs anything special though basic USB touch should be covered.

It doesn’t seem like the device is found. Missing the driver?

Is your touchscreen device not the PixArt USB Optical Mouse?

Best Regards,
Jeremias

Hi @jeremias.tx and @josep.tx ,

Just to give a quick update regarding this subject. I got another touchscreen display and everything worked straight away. So, it’s something about the initial display touch driver I believe.

Is your touchscreen device not the PixArt USB Optical Mouse ?

That was just a USB mouse I had connected.

Think this can be closed. I won’t spend more time with that initial display, but appreciate the support.

Regards,
Joao

Hello @jvieira ,
Thank you very much for the update.

Best regards,
Josep