Cog browser stays black after power loss

If the cog browser is running on our Colibri iMX8X and there is a power loss on the device, after the power is restored, the system reboots, but the cog browser does not start/recover correctly from that state. I noticed that in this case the docker containers are not recreated while this is the case on regular reboot/power off of the system.
Here you can see the logs of it. The website displayed in the browser doesn’t matter, it happens with our local web app as well as with google.com. When the system starts after the power loss, the screen stays black although cog reports to have loaded the page.
In the screenshot you can see the regular reboot with everything working as expected on top. Then I unplugged the power of the board. So, after I needed to re-login in the screenshot you can see the output after restoring from power loss. In this case the screen however stayed black and google.com was not displayed.

@drew.tx , I hope you can reproduce this behaviour at your side and help us to fix it?

Thank you.

Regards,
Lasse

Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!

Did you like my answer?

:+1: :-1:


Hello Lasse,

Thank you for reaching out with your issue regarding the Cog browser on the Colibri iMX8X. It sounds like a challenging situation, but let’s see if we can address it together.

  1. Docker Configuration: First, ensure that your Docker containers are set to restart automatically. You can achieve this by setting the restart policy in your Docker Compose file or using the --restart flag when running the container. For instance, --restart unless-stopped will ensure containers restart unless explicitly stopped.

  2. Systemd Service Management: If you are using systemd to manage your Docker containers, check that the service is configured to restart on failure. Look for the Restart=always directive in your service file.

  3. File System Integrity: Power loss can sometimes lead to file system corruption. It might be beneficial to run a file system check (fsck) on your storage to ensure there are no issues that could prevent Docker from functioning correctly.

  4. Persistent Storage: Make sure that any data or state that needs to persist across reboots is stored in a persistent volume. This can help maintain the state of your application even after unexpected shutdowns.

By following these steps, you should be able to improve the resilience of your system against power losses and ensure that the Cog browser and Docker containers recover correctly. If the issue persists, examining specific logs and configurations may be necessary to identify any underlying problems.

I hope this helps, and please feel free to reach out if you have further questions.

Best regards,
Toradex AI Assistant

Please, also check if these links can help you solve your problem:

Dead containers - docker-compose.yml.

Hi @lbruhn-cw !

Sorry for all this delay!

Cog is using weston, correct?

Is it possible that Weston itself is failing to restart accordingly and Cog just can’t do anything?

Could you please check and share Weston’s logs?

(Please share it in text format, which is searchable :slight_smile:)

Best regards,

Hi @henrique.tx !

Thanks for your reply. Yes, we are using Weston along with cog.
I don’t think that Weston is failing, because if I replace just cog by Chromium the scenario described works perfectly fine, but I will try to grab the log output for you.

Best regards

Hi @henrique.tx !

Here is the log output of the Weston container after the first boot that is successful:

Switching VT tty1 to text mode if currently in graphics mode
Switching to VT 7
SoC is: 'i.MX8QXP'
SoC has GPU: true
SoC has DPU: true
g2d implementation: dpu
Removing previously created '.X*-lock' entries under /tmp before starting Weston. Pass 'IGNORE_X_LOCKS=1' environment variable to Weston container to disable this behavior.
dos2unix: converting file /etc/xdg/weston/weston.ini to Unix format...
dos2unix: converting file /etc/xdg/weston-dev/weston.ini to Unix format...
00:00:00.000 [INFO] [seatd/seat.c:39] Created VT-bound seat seat0
00:00:00.000 [INFO] [seatd/seatd.c:194] seatd started
Date: 2025-03-27 UTC
[13:01:28.013] weston 10.0.1
               https://wayland.freedesktop.org
               Bug reports to: https://gitlab.freedesktop.org/wayland/weston/issues/
               Build: lf-5.15.52-2.1.0-10-g9452feba
[13:01:28.014] Command line: weston -Bdrm-backend.so --current-mode -Swayland-0
[13:01:28.014] OS: Linux, 5.15.148-6.7.0+git.bfdbfb2c85fb, #1-TorizonCore SMP PREEMPT Thu Jun 20 15:59:41 UTC 2024, aarch64
[13:01:28.014] Flight recorder: enabled
[13:01:28.015] Using config file '/etc/xdg/weston/weston.ini'
[13:01:28.019] Output repaint window is 7 ms maximum.
[13:01:28.021] Loading module '/usr/lib/aarch64-linux-gnu/libweston-10/drm-backend.so'
[13:01:28.103] initializing drm backend
[13:01:28.103] Trying libseat launcher...
00:00:00.311 [INFO] [seatd/server.c:145] New client connected (pid: 30, uid: 1000, gid: 1000)
00:00:00.311 [INFO] [seatd/seat.c:170] Added client 7 to seat0
00:00:00.312 [INFO] [seatd/seat.c:480] Opened client 7 on seat0
[13:01:28.105] libseat: session control granted
[13:01:28.113] using /dev/dri/card0
[13:01:28.113] DRM: supports atomic modesetting
[13:01:28.113] DRM: supports GBM modifiers
[13:01:28.113] DRM: supports picture aspect ratio
[13:01:28.115] Loading module '/usr/lib/aarch64-linux-gnu/libweston-10/gl-renderer.so'
[13:01:28.193] EGL client extensions: EGL_EXT_client_extensions
               EGL_EXT_platform_base EGL_KHR_platform_wayland
               EGL_EXT_platform_wayland EGL_EXT_device_query
               EGL_EXT_device_drm EGL_EXT_device_drm_render_node
               EGL_KHR_platform_gbm
[13:01:28.204] EGL device extensions: EGL_EXT_client_extensions
               EGL_EXT_platform_base EGL_KHR_platform_wayland
               EGL_EXT_platform_wayland EGL_EXT_device_query
               EGL_EXT_device_drm EGL_EXT_device_drm_render_node
               EGL_KHR_platform_gbm
[13:01:28.204] EGL version: 1.5
[13:01:28.204] EGL vendor: Vivante Corporation
[13:01:28.205] EGL client APIs: OpenGL_ES OpenVG
[13:01:28.205] 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_create_context_robustness EGL_EXT_protected_surface
               EGL_EXT_protected_content 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
[13:01:28.206] EGL_KHR_surfaceless_context available
[13:01:28.255] GL version: OpenGL ES 3.1 V6.4.3.p4.398061
[13:01:28.256] GLSL version: OpenGL ES GLSL ES 3.10
[13:01:28.256] GL vendor: Vivante Corporation
[13:01:28.256] GL renderer: Vivante GC7000L
[13:01:28.256] GL extensions: GL_OES_vertex_type_10_10_10_2
               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_texture_stencil8
               GL_OES_shader_image_atomic
               GL_OES_texture_storage_multisample_2d_array
               GL_OES_required_internalformat GL_OES_surfaceless_context
               GL_OES_copy_image GL_OES_draw_buffers_indexed
               GL_OES_texture_border_clamp GL_OES_texture_buffer
               GL_OES_texture_cube_map_array GL_OES_draw_elements_base_vertex
               GL_OES_texture_half_float GL_OES_texture_float
               GL_KHR_blend_equation_advanced GL_KHR_debug GL_KHR_robustness
               GL_KHR_robust_buffer_access_behavior
               GL_EXT_texture_type_2_10_10_10_REV
               GL_EXT_texture_filter_anisotropic
               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_color_buffer_half_float GL_EXT_color_buffer_float
               GL_EXT_robustness GL_EXT_texture_sRGB_decode
               GL_EXT_draw_buffers_indexed GL_EXT_texture_border_clamp
               GL_EXT_texture_buffer GL_EXT_copy_image
               GL_EXT_texture_cube_map_array GL_EXT_multi_draw_indirect
               GL_EXT_draw_elements_base_vertex GL_EXT_texture_rg
               GL_EXT_protected_textures GL_EXT_sRGB GL_EXT_unpack_subimage
               GL_VIV_direct_texture
[13:01:28.400] GL ES 3.1 - renderer features:
               read-back format: BGRA
               EGL Wayland extension: yes
[13:01:28.455] event2  - Goodix Capacitive TouchScreen: is tagged by udev as: Keyboard Touchscreen
[13:01:28.456] event2  - Goodix Capacitive TouchScreen: device is a keyboard
[13:01:28.457] event2  - Goodix Capacitive TouchScreen: device is a touch device
[13:01:28.461] event1  - gpio-keys: is tagged by udev as: Keyboard
[13:01:28.462] event1  - gpio-keys: device is a keyboard
[13:01:28.466] event0  - sc-powerkey: is tagged by udev as: Keyboard
[13:01:28.467] event0  - sc-powerkey: device is a keyboard
[13:01:28.558] Touchscreen - Goodix Capacitive TouchScreen - /sys/devices/platform/bus@5a000000/5a810000.i2c/i2c-1/1-005d/input/input2/event2
[13:01:28.558] libinput: configuring device "Goodix Capacitive TouchScreen".
[13:01:28.558] input device event2 has no enabled output associated (none named), skipping calibration for now.
[13:01:28.559] libinput: configuring device "gpio-keys".
[13:01:28.559] libinput: configuring device "sc-powerkey".
[13:01:28.559] DRM: head 'LVDS-1' updated, connector 90 is connected, EDID make 'unknown', model 'unknown', serial 'unknown'
[13:01:28.560] DRM: head 'LVDS-1' found, connector 90 is connected, EDID make 'unknown', model 'unknown', serial 'unknown'
[13:01:28.561] Registered plugin API 'weston_drm_output_api_v1' of size 24
[13:01:28.561] Registered plugin API 'weston_drm_virtual_output_api_v1' of size 48
[13:01:28.561] Color manager: no-op
[13:01:28.561] Module '/usr/lib/libgbm.so' already loaded
[13:01:28.562] Output 'LVDS-1' using color profile: built-in default sRGB SDR profile
[13:01:28.566] Chosen EGL config details: id:  21 rgba: 8 8 8 0 buf: 24 dep:  0 stcl: 0 int: 1-60 type: win|pix|pbf|swap_preserved vis_id: XRGB8888 (0x34325258)
[13:01:28.566] Output LVDS-1 (crtc 38) video modes:
               1024x600@60.9, preferred, current, 52.0 MHz
[13:01:28.566] associating input device event2 with output LVDS-1 (none by udev)
[13:01:28.567] associating input device event1 with output LVDS-1 (none by udev)
[13:01:28.568] associating input device event0 with output LVDS-1 (none by udev)
[13:01:28.568] Output 'LVDS-1' enabled with head(s) LVDS-1
[13:01:28.568] Compositor capabilities:
               arbitrary surface rotation: yes
               screen capture uses y-flip: yes
               cursor planes: yes
               arbitrary resolutions: no
               view mask clipping: yes
               explicit sync: yes
               color operations: no
               presentation clock: CLOCK_MONOTONIC, id 1
               presentation clock resolution: 0.000000001 s
[13:01:28.570] Loading module '/usr/lib/aarch64-linux-gnu/weston/desktop-shell.so'
[13:01:28.583] launching '/usr/lib/aarch64-linux-gnu/weston-keyboard'
[13:01:28.593] Note: support for the deprecated wl_shell interface is disabled. If a legacy client still needs it, it can be re-enabled by passing -Ddeprecated-wl-shell=true to Meson when building Weston.
[13:01:28.595] Loading module '/usr/lib/aarch64-linux-gnu/weston/screen-share.so'
[13:01:28.600] Loading module '/usr/lib/aarch64-linux-gnu/libweston-10/xwayland.so'
[13:01:28.763] Registered plugin API 'weston_xwayland_v1' of size 32
[13:01:28.763] Registered plugin API 'weston_xwayland_surface_v1' of size 16
[13:01:28.763] xserver listening on display :0
[13:01:28.764] launching '/usr/lib/aarch64-linux-gnu/weston-desktop-shell'
could not load cursor 'dnd-move'
could not load cursor 'dnd-copy'
could not load cursor 'dnd-none'
could not load cursor 'dnd-move'
could not load cursor 'dnd-copy'
could not load cursor 'dnd-none'
[     1] wl_drm_is_format_supported, format = 0x30335241
[     2] wl_drm_is_format_supported, format = 0x30335258
[     3] wl_drm_is_format_supported, format = 0x30334241
[     4] wl_drm_is_format_supported, format = 0x30334258
[     5] wl_drm_is_format_supported, format = 0x30335241
[     6] wl_drm_is_format_supported, format = 0x30335258
[     7] wl_drm_is_format_supported, format = 0x30334241
[     8] wl_drm_is_format_supported, format = 0x30334258
[     9] wl_drm_is_format_supported, format = 0x30335241
[    10] wl_drm_is_format_supported, format = 0x30335258
[    11] wl_drm_is_format_supported, format = 0x30334241
[    12] wl_drm_is_format_supported, format = 0x30334258
[    13] wl_drm_is_format_supported, format = 0x30335241
[    14] wl_drm_is_format_supported, format = 0x30335258
[    15] wl_drm_is_format_supported, format = 0x30334241
[    16] wl_drm_is_format_supported, format = 0x30334258

and this is the output after another boot after power loss where the problem occurs:

Switching VT tty1 to text mode if currently in graphics mode
Switching VT mode of /dev/tty1 to text
Switching to VT 7
SoC is: 'i.MX8QXP'
SoC has GPU: true
SoC has DPU: true
g2d implementation: dpu
Removing previously created '.X*-lock' entries under /tmp before starting Weston. Pass 'IGNORE_X_LOCKS=1' environment variable to Weston container to disable this behavior.
dos2unix: converting file /etc/xdg/weston/weston.ini to Unix format...
dos2unix: converting file /etc/xdg/weston-dev/weston.ini to Unix format...
00:00:00.000 [INFO] [seatd/seat.c:39] Created VT-bound seat seat0
00:00:00.000 [INFO] [seatd/seatd.c:194] seatd started
Date: 2025-03-27 UTC
[13:04:23.109] weston 10.0.1
               https://wayland.freedesktop.org
               Bug reports to: https://gitlab.freedesktop.org/wayland/weston/issues/
               Build: lf-5.15.52-2.1.0-10-g9452feba
[13:04:23.109] Command line: weston -Bdrm-backend.so --current-mode -Swayland-0
[13:04:23.109] OS: Linux, 5.15.148-6.7.0+git.bfdbfb2c85fb, #1-TorizonCore SMP PREEMPT Thu Jun 20 15:59:41 UTC 2024, aarch64
[13:04:23.109] Flight recorder: enabled
[13:04:23.119] Using config file '/etc/xdg/weston/weston.ini'
[13:04:23.136] Output repaint window is 7 ms maximum.
[13:04:23.147] Loading module '/usr/lib/aarch64-linux-gnu/libweston-10/drm-backend.so'
[13:04:23.284] initializing drm backend
[13:04:23.284] Trying libseat launcher...
00:00:00.578 [INFO] [seatd/server.c:145] New client connected (pid: 31, uid: 1000, gid: 1000)
00:00:00.579 [INFO] [seatd/seat.c:170] Added client 7 to seat0
00:00:00.579 [INFO] [seatd/seat.c:480] Opened client 7 on seat0
[13:04:23.285] libseat: session control granted
[13:04:23.296] using /dev/dri/card0
[13:04:23.296] DRM: supports atomic modesetting
[13:04:23.296] DRM: supports GBM modifiers
[13:04:23.296] DRM: supports picture aspect ratio
[13:04:23.302] Loading module '/usr/lib/aarch64-linux-gnu/libweston-10/gl-renderer.so'
[13:04:23.482] EGL client extensions: EGL_EXT_client_extensions
               EGL_EXT_platform_base EGL_KHR_platform_wayland
               EGL_EXT_platform_wayland EGL_EXT_device_query
               EGL_EXT_device_drm EGL_EXT_device_drm_render_node
               EGL_KHR_platform_gbm
[13:04:23.496] EGL device extensions: EGL_EXT_client_extensions
               EGL_EXT_platform_base EGL_KHR_platform_wayland
               EGL_EXT_platform_wayland EGL_EXT_device_query
               EGL_EXT_device_drm EGL_EXT_device_drm_render_node
               EGL_KHR_platform_gbm
[13:04:23.497] EGL version: 1.5
[13:04:23.497] EGL vendor: Vivante Corporation
[13:04:23.497] EGL client APIs: OpenGL_ES OpenVG
[13:04:23.497] 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_create_context_robustness EGL_EXT_protected_surface
               EGL_EXT_protected_content 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
[13:04:23.498] EGL_KHR_surfaceless_context available
[13:04:23.585] GL version: OpenGL ES 3.1 V6.4.3.p4.398061
[13:04:23.585] GLSL version: OpenGL ES GLSL ES 3.10
[13:04:23.585] GL vendor: Vivante Corporation
[13:04:23.585] GL renderer: Vivante GC7000L
[13:04:23.585] GL extensions: GL_OES_vertex_type_10_10_10_2
               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_texture_stencil8
               GL_OES_shader_image_atomic
               GL_OES_texture_storage_multisample_2d_array
               GL_OES_required_internalformat GL_OES_surfaceless_context
               GL_OES_copy_image GL_OES_draw_buffers_indexed
               GL_OES_texture_border_clamp GL_OES_texture_buffer
               GL_OES_texture_cube_map_array GL_OES_draw_elements_base_vertex
               GL_OES_texture_half_float GL_OES_texture_float
               GL_KHR_blend_equation_advanced GL_KHR_debug GL_KHR_robustness
               GL_KHR_robust_buffer_access_behavior
               GL_EXT_texture_type_2_10_10_10_REV
               GL_EXT_texture_filter_anisotropic
               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_color_buffer_half_float GL_EXT_color_buffer_float
               GL_EXT_robustness GL_EXT_texture_sRGB_decode
               GL_EXT_draw_buffers_indexed GL_EXT_texture_border_clamp
               GL_EXT_texture_buffer GL_EXT_copy_image
               GL_EXT_texture_cube_map_array GL_EXT_multi_draw_indirect
               GL_EXT_draw_elements_base_vertex GL_EXT_texture_rg
               GL_EXT_protected_textures GL_EXT_sRGB GL_EXT_unpack_subimage
               GL_VIV_direct_texture
[13:04:23.820] GL ES 3.1 - renderer features:
               read-back format: BGRA
               EGL Wayland extension: yes
[13:04:24.025] event2  - Goodix Capacitive TouchScreen: is tagged by udev as: Keyboard Touchscreen
[13:04:24.026] event2  - Goodix Capacitive TouchScreen: device is a keyboard
[13:04:24.026] event2  - Goodix Capacitive TouchScreen: device is a touch device
[13:04:24.032] event1  - gpio-keys: is tagged by udev as: Keyboard
[13:04:24.032] event1  - gpio-keys: device is a keyboard
[13:04:24.037] event0  - sc-powerkey: is tagged by udev as: Keyboard
[13:04:24.037] event0  - sc-powerkey: device is a keyboard
[13:04:24.194] Touchscreen - Goodix Capacitive TouchScreen - /sys/devices/platform/bus@5a000000/5a810000.i2c/i2c-1/1-005d/input/input2/event2
[13:04:24.194] libinput: configuring device "Goodix Capacitive TouchScreen".
[13:04:24.194] input device event2 has no enabled output associated (none named), skipping calibration for now.
[13:04:24.194] libinput: configuring device "gpio-keys".
[13:04:24.194] libinput: configuring device "sc-powerkey".
[13:04:24.195] DRM: head 'LVDS-1' updated, connector 90 is connected, EDID make 'unknown', model 'unknown', serial 'unknown'
[13:04:24.195] DRM: head 'LVDS-1' found, connector 90 is connected, EDID make 'unknown', model 'unknown', serial 'unknown'
[13:04:24.196] Registered plugin API 'weston_drm_output_api_v1' of size 24
[13:04:24.196] Registered plugin API 'weston_drm_virtual_output_api_v1' of size 48
[13:04:24.196] Color manager: no-op
[13:04:24.197] Module '/usr/lib/libgbm.so' already loaded
[13:04:24.197] Output 'LVDS-1' using color profile: built-in default sRGB SDR profile
[13:04:24.208] Chosen EGL config details: id:  21 rgba: 8 8 8 0 buf: 24 dep:  0 stcl: 0 int: 1-60 type: win|pix|pbf|swap_preserved vis_id: XRGB8888 (0x34325258)
[13:04:24.208] Output LVDS-1 (crtc 38) video modes:
               1024x600@60.9, preferred, current, 52.0 MHz
[13:04:24.208] associating input device event2 with output LVDS-1 (none by udev)
[13:04:24.209] associating input device event1 with output LVDS-1 (none by udev)
[13:04:24.209] associating input device event0 with output LVDS-1 (none by udev)
[13:04:24.210] Output 'LVDS-1' enabled with head(s) LVDS-1
[13:04:24.210] Compositor capabilities:
               arbitrary surface rotation: yes
               screen capture uses y-flip: yes
               cursor planes: yes
               arbitrary resolutions: no
               view mask clipping: yes
               explicit sync: yes
               color operations: no
               presentation clock: CLOCK_MONOTONIC, id 1
               presentation clock resolution: 0.000000001 s
[13:04:24.213] Loading module '/usr/lib/aarch64-linux-gnu/weston/desktop-shell.so'
[13:04:24.246] launching '/usr/lib/aarch64-linux-gnu/weston-keyboard'
[13:04:24.255] Note: support for the deprecated wl_shell interface is disabled. If a legacy client still needs it, it can be re-enabled by passing -Ddeprecated-wl-shell=true to Meson when building Weston.
[13:04:24.259] Loading module '/usr/lib/aarch64-linux-gnu/weston/screen-share.so'
[13:04:24.271] Loading module '/usr/lib/aarch64-linux-gnu/libweston-10/xwayland.so'
[13:04:24.569] Registered plugin API 'weston_xwayland_v1' of size 32
[13:04:24.570] Registered plugin API 'weston_xwayland_surface_v1' of size 16
[13:04:24.571] xserver listening on display :0
[13:04:24.571] launching '/usr/lib/aarch64-linux-gnu/weston-desktop-shell'
could not load cursor 'dnd-move'
could not load cursor 'dnd-copy'
could not load cursor 'dnd-none'
could not load cursor 'dnd-move'
could not load cursor 'dnd-copy'
could not load cursor 'dnd-none'

They are nearly identical.

I hope that helps.

Dear @lbruhn-cw,

I have tried this out myself with a docker compose file which looks like this:

version: "3.8"
services:
  weston:
    image: torizon/weston-vivante:3
    environment:
      - ACCEPT_FSL_EULA=1
    command: --developer --tty=/dev/tty7
    network_mode: "host"
    cap_add:
      - CAP_SYS_TTY_CONFIG
    volumes:
      - /dev:/dev
      - /tmp:/tmp
      - /run/udev/:/run/udev/
    devices:
      - "/dev/galcore:/dev/galcore"
    device_cgroup_rules:
      - 'c 4:* rmw'
      - 'c 13:* rmw'
      - 'c 199:* rmw'
      - 'c 226:* rmw'
    restart: "no"
  cog:
    image: torizon/cog:3
    command: https://www.google.com
    volumes:
      - /tmp:/tmp
      - /var/run/dbus:/var/run/dbus
      - /dev/galcore:/dev/galcore
    device_cgroup_rules:
      - 'c 199:* rmw'
    restart: "no"

Unfortunately I was unable to replicate the behaviour described. Do you see any glaring differences between our docker-compose files? Could you maybe share it with us?

Best regards,
Collin

Dear @collin.tx ,

thank you very much for your response.

Here is my docker compose file where the problem occurs:

version: "2.4"
services:
  weston:
    image: torizon/weston-vivante:3
    restart: on-failure
    environment:
      - ACCEPT_FSL_EULA=1
    network_mode: host
    volumes:
      - type: bind
        source: /tmp
        target: /tmp
      - type: bind
        source: /dev
        target: /dev
      - type: bind
        source: /run/udev
        target: /run/udev
    cap_add:
      - CAP_SYS_TTY_CONFIG
    device_cgroup_rules:
      - 'c 4:* rmw'
      - 'c 13:* rmw'
      - 'c 226:* rmw'
      - 'c 199:* rmw'
    healthcheck:
      test: ["CMD", "test", "-S", "/tmp/1000-runtime-dir/wayland-0"]
      interval: 5s
      timeout: 4s
      retries: 6
      start_period: 10s

  browser:
    environment:
      - COG_PLATFORM_WL_VIEW_FULLSCREEN=1
      - COG_PLATFORM_WL_VIEW_WIDTH=1024
      - COG_PLATFORM_WL_VIEW_HEIGHT=600
    image: torizon/cog:3
    restart: on-failure
    platform: linux/arm64
    network_mode: host
    command: https://www.google.com
    volumes:
      - type: bind
        source: /tmp
        target: /tmp
      - type: bind
        source: /var/run/dbus
        target: /var/run/dbus
      - type: bind
        source: /dev/galcore
        target: /dev/galcore
    depends_on:
      weston:
        condition: service_healthy
    device_cgroup_rules:
      - 'c 199:* rmw'

I think the main differences are the command and devices you added for weston, the restart conditions and that we are using cog with host network.

For my impression the command for weston makes the biggest difference, but of course we don’t want to show the weston desktop for our production app.

I wasn’t really able to find a configuration without it that was working. Maybe you have a different idea?

Best regards,
Lasse

Hi @lbruhn-cw,

I have tried to reproduce it with the docker compose I shared earlier. Removing the --developer before command: and I tried rebooting multiple times via hard reset. for me the browser was still starting. The only change I could see was that the grey weston background was (obviously) no longer showing.

On a second attempt I tried removing the whole command section including --tty_/dev/tty7 this did not change anything for me, since the browser still started each time after hard resets.

I then tried to include this section into my docker compose:

   depends_on:
      weston:
        condition: service_healthy

I also added the health check to weston:

    healthcheck:
      test: ["CMD", "test", "-S", "/tmp/1000-runtime-dir/wayland-0"]
      interval: 5s
      timeout: 4s
      retries: 6
      start_period: 10s

This still prompts my containers to run, although it takes a few seconds for the cog container to come up, due to the health checking. Giving the system a hard reset here actually showed that the cog container was starting but not showing anything! (This is what I believe you are experiencing too)
Rebooting via CLI the browser starts as expected.

I have also tried this with other health check parameters, yet it did not seem to make any difference.
This is what my docker compose looks like when the issue occurs:

version: "3.8"
services:
  weston:
    image: torizon/weston-vivante:3
    environment:
      - ACCEPT_FSL_EULA=1
    network_mode: "host"
    cap_add:
      - CAP_SYS_TTY_CONFIG
    volumes:
      - /dev:/dev
      - /tmp:/tmp
      - /run/udev/:/run/udev/
    devices:
      - "/dev/galcore:/dev/galcore"
    device_cgroup_rules:
      - 'c 4:* rmw'
      - 'c 13:* rmw'
      - 'c 199:* rmw'
      - 'c 226:* rmw'
    healthcheck:
      test: ["CMD", "sh", "-c", "test -n \"$$WAYLAND_DISPLAY\" || exit 1"]
      start_period: 5s
    restart: "no"
  cog:
    image: torizon/cog:3
    command: https://www.google.com
    volumes:
      - /tmp:/tmp
      - /var/run/dbus:/var/run/dbus
      - /dev/galcore:/dev/galcore
    depends_on:
      weston:
        condition: service_healthy
    device_cgroup_rules:
      - 'c 199:* rmw'
    restart: on-failure

I will check out the health check and see if I can get this running.

Best regards,
Collin

1 Like