Last edited one month ago

How to debug Weston

Applicable for STM32MP13x lines, STM32MP15x lines, STM32MP21x lines, STM32MP23x lines, STM32MP25x lines

1. Wayland information[edit | edit source]

To get many Wayland information, enter:

wayland-info

wayland-info utility output example:

root@stm32mp25-eval-e3-b9-5e:~# wayland-info 
interface: 'wl_compositor',                              version:  5, name:  1
interface: 'wl_subcompositor',                           version:  1, name:  2
interface: 'wp_viewporter',                              version:  1, name:  3
interface: 'zxdg_output_manager_v1',                     version:  2, name:  4
        xdg_output_v1
                output: 22
                name: 'LVDS-1'
                logical_x: 0, logical_y: 0
                logical_width: 1024, logical_height: 600
interface: 'wp_presentation',                            version:  1, name:  5
        presentation clock id: 1 (CLOCK_MONOTONIC)
interface: 'wp_single_pixel_buffer_manager_v1',          version:  1, name:  6
interface: 'wp_tearing_control_manager_v1',              version:  1, name:  7
interface: 'zwp_relative_pointer_manager_v1',            version:  1, name:  8
interface: 'zwp_pointer_constraints_v1',                 version:  1, name:  9
interface: 'zwp_input_timestamps_manager_v1',            version:  1, name: 10
interface: 'weston_capture_v1',                          version:  1, name: 11
interface: 'wl_data_device_manager',                     version:  3, name: 12
interface: 'wl_shm',                                     version:  1, name: 13
        formats (fourcc):
        0x30334258 = 'XB30'
        0x30334241 = 'AB30'
        0x34324241 = 'AB24'
        0x56555958 = 'XYUV'
        0x56595559 = 'YUYV'
        0x3231564e = 'NV12'
        0x34325559 = 'YU24'
        0x32315559 = 'YU12'
        0x36314752 = 'RG16'
                 1 = 'XR24'
                 0 = 'AR24'
interface: 'weston_touch_calibration',                   version:  1, name: 14
interface: 'wl_viv',                                     version:  1, name: 15
interface: 'wl_drm',                                     version:  2, name: 16
interface: 'wl_seat',                                    version:  7, name: 17
        name: default
        capabilities: keyboard touch
        keyboard repeat rate: 40
        keyboard repeat delay: 400
interface: 'zwp_linux_dmabuf_v1',                        version:  3, name: 18
        formats (fourcc) and modifiers (names):
        0x32315659 = 'YV12'; 0x0000000000000000 = LINEAR
        0x32315659 = 'YV12'; 0x00ffffffffffffff = INVALID
        0x32315559 = 'YU12'; 0x0000000000000000 = LINEAR
        0x32315559 = 'YU12'; 0x00ffffffffffffff = INVALID
        0x3136564e = 'NV61'; 0x0000000000000000 = LINEAR
        0x3136564e = 'NV61'; 0x00ffffffffffffff = INVALID
        0x3631564e = 'NV16'; 0x0000000000000000 = LINEAR
        0x3631564e = 'NV16'; 0x00ffffffffffffff = INVALID
        0x3132564e = 'NV21'; 0x0000000000000000 = LINEAR
        0x3132564e = 'NV21'; 0x00ffffffffffffff = INVALID
        0x3231564e = 'NV12'; 0x0000000000000000 = LINEAR
        0x3231564e = 'NV12'; 0x00ffffffffffffff = INVALID
        0x59555956 = 'VYUY'; 0x0000000000000000 = LINEAR
        0x59555956 = 'VYUY'; 0x00ffffffffffffff = INVALID
        0x59565955 = 'UYVY'; 0x0000000000000000 = LINEAR
        0x59565955 = 'UYVY'; 0x00ffffffffffffff = INVALID
        0x55595659 = 'YVYU'; 0x0000000000000000 = LINEAR
        0x55595659 = 'YVYU'; 0x00ffffffffffffff = INVALID
        0x56595559 = 'YUYV'; 0x0000000000000000 = LINEAR
        0x56595559 = 'YUYV'; 0x00ffffffffffffff = INVALID
        0x34324142 = 'BA24'; 0x0600000000000004 = VIVANTE_SPLIT_SUPER_TILED
        0x34324142 = 'BA24'; 0x0000000000000000 = LINEAR
        0x34324142 = 'BA24'; 0x00ffffffffffffff = INVALID
        0x34324152 = 'RA24'; 0x0600000000000004 = VIVANTE_SPLIT_SUPER_TILED
        0x34324152 = 'RA24'; 0x0000000000000000 = LINEAR
        0x34324152 = 'RA24'; 0x00ffffffffffffff = INVALID
        0x34324241 = 'AB24'; 0x0600000000000004 = VIVANTE_SPLIT_SUPER_TILED
        0x34324241 = 'AB24'; 0x0000000000000000 = LINEAR
        0x34324241 = 'AB24'; 0x00ffffffffffffff = INVALID
        0x34325241 = 'AR24'; 0x0600000000000004 = VIVANTE_SPLIT_SUPER_TILED
        0x34325241 = 'AR24'; 0x0000000000000000 = LINEAR
        0x34325241 = 'AR24'; 0x00ffffffffffffff = INVALID
        0x34325842 = 'BX24'; 0x0600000000000004 = VIVANTE_SPLIT_SUPER_TILED
        0x34325842 = 'BX24'; 0x0000000000000000 = LINEAR
        0x34325842 = 'BX24'; 0x00ffffffffffffff = INVALID
        0x34325852 = 'RX24'; 0x0600000000000004 = VIVANTE_SPLIT_SUPER_TILED
        0x34325852 = 'RX24'; 0x0000000000000000 = LINEAR
        0x34325852 = 'RX24'; 0x00ffffffffffffff = INVALID
        0x34324258 = 'XB24'; 0x0600000000000004 = VIVANTE_SPLIT_SUPER_TILED
        0x34324258 = 'XB24'; 0x0000000000000000 = LINEAR
        0x34324258 = 'XB24'; 0x00ffffffffffffff = INVALID
        0x34325258 = 'XR24'; 0x0600000000000004 = VIVANTE_SPLIT_SUPER_TILED
        0x34325258 = 'XR24'; 0x0000000000000000 = LINEAR
        0x34325258 = 'XR24'; 0x00ffffffffffffff = INVALID
        0x36314742 = 'BG16'; 0x0600000000000004 = VIVANTE_SPLIT_SUPER_TILED
        0x36314742 = 'BG16'; 0x0000000000000000 = LINEAR
        0x36314742 = 'BG16'; 0x00ffffffffffffff = INVALID
        0x36314752 = 'RG16'; 0x0600000000000004 = VIVANTE_SPLIT_SUPER_TILED
        0x36314752 = 'RG16'; 0x0000000000000000 = LINEAR
        0x36314752 = 'RG16'; 0x00ffffffffffffff = INVALID
        0x35314241 = 'AB15'; 0x0600000000000004 = VIVANTE_SPLIT_SUPER_TILED
        0x35314241 = 'AB15'; 0x0000000000000000 = LINEAR
        0x35314241 = 'AB15'; 0x00ffffffffffffff = INVALID
        0x35315241 = 'AR15'; 0x0600000000000004 = VIVANTE_SPLIT_SUPER_TILED
        0x35315241 = 'AR15'; 0x0000000000000000 = LINEAR
        0x35315241 = 'AR15'; 0x00ffffffffffffff = INVALID
        0x35314258 = 'XB15'; 0x0600000000000004 = VIVANTE_SPLIT_SUPER_TILED
        0x35314258 = 'XB15'; 0x0000000000000000 = LINEAR
        0x35314258 = 'XB15'; 0x00ffffffffffffff = INVALID
        0x35315258 = 'XR15'; 0x0600000000000004 = VIVANTE_SPLIT_SUPER_TILED
        0x35315258 = 'XR15'; 0x0000000000000000 = LINEAR
        0x35315258 = 'XR15'; 0x00ffffffffffffff = INVALID
        0x32314241 = 'AB12'; 0x0600000000000004 = VIVANTE_SPLIT_SUPER_TILED
        0x32314241 = 'AB12'; 0x0000000000000000 = LINEAR
        0x32314241 = 'AB12'; 0x00ffffffffffffff = INVALID
        0x32315241 = 'AR12'; 0x0600000000000004 = VIVANTE_SPLIT_SUPER_TILED
        0x32315241 = 'AR12'; 0x0000000000000000 = LINEAR
        0x32315241 = 'AR12'; 0x00ffffffffffffff = INVALID
        0x32314258 = 'XB12'; 0x0600000000000004 = VIVANTE_SPLIT_SUPER_TILED
        0x32314258 = 'XB12'; 0x0000000000000000 = LINEAR
        0x32314258 = 'XB12'; 0x00ffffffffffffff = INVALID
        0x32315258 = 'XR12'; 0x0600000000000004 = VIVANTE_SPLIT_SUPER_TILED
        0x32315258 = 'XR12'; 0x0000000000000000 = LINEAR
        0x32315258 = 'XR12'; 0x00ffffffffffffff = INVALID
interface: 'weston_direct_display_v1',                   version:  1, name: 19
interface: 'zwp_linux_explicit_synchronization_v1',      version:  2, name: 20
interface: 'weston_content_protection',                  version:  1, name: 21
interface: 'wl_output',                                  version:  4, name: 22
        name: LVDS-1
        description: unknown
        x: 0, y: 0, scale: 1,
        physical_width: 156 mm, physical_height: 92 mm,
        make: 'unknown', model: 'unknown',
        subpixel_orientation: unknown, output_transform: normal,
        mode:
                width: 1024 px, height: 600 px, refresh: 60.013 Hz,
                flags: current preferred
interface: 'zwp_input_panel_v1',                         version:  1, name: 23
interface: 'zwp_input_method_v1',                        version:  1, name: 24
interface: 'zwp_text_input_manager_v1',                  version:  1, name: 25
interface: 'xdg_wm_base',                                version:  5, name: 26
interface: 'weston_desktop_shell',                       version:  1, name: 27

2. Wayland logs[edit | edit source]

To get the logs of the Wayland protocol messages, set this environment variable before launching your application:

export WAYLAND_DEBUG=1

or you can assign it in your application command line:

WAYLAND_DEBUG=1 ./your_application

You will get the Wayland protocol messages linked to your application:

[3192810.971]  -> wl_display@1.get_registry(new id wl_registry@2)
[3192811.087]  -> wl_display@1.sync(new id wl_callback@3)
[3192811.459] wl_display@1.delete_id(3)
[3192811.495] wl_registry@2.global(1, "wl_compositor", 5)
[3192811.527]  -> wl_registry@2.bind(1, "wl_compositor", 4, new id [unknown]@4)
[3192811.556] wl_registry@2.global(2, "wl_subcompositor", 1)
[3192811.580] wl_registry@2.global(3, "wp_viewporter", 1)
[3192811.602] wl_registry@2.global(4, "zxdg_output_manager_v1", 2)
[3192811.624] wl_registry@2.global(5, "wp_presentation", 1)
[3192811.645] wl_registry@2.global(6, "wp_single_pixel_buffer_manager_v1", 1)
[3192811.667] wl_registry@2.global(7, "zwp_relative_pointer_manager_v1", 1)
[3192811.689] wl_registry@2.global(8, "zwp_pointer_constraints_v1", 1)
[3192811.711] wl_registry@2.global(9, "zwp_input_timestamps_manager_v1", 1)
[3192811.733] wl_registry@2.global(10, "wl_data_device_manager", 3)
[3192811.755] wl_registry@2.global(11, "wl_shm", 1)
[3192811.778]  -> wl_registry@2.bind(11, "wl_shm", 1, new id [unknown]@5)
[3192811.958]  -> wl_shm@5.create_pool(new id wl_shm_pool@6, fd 5, 4096)
[3192812.520]  -> wl_shm_pool@6.resize(8832)
[3192812.663]  -> wl_shm_pool@6.resize(18624)
[3192812.754] wl_registry@2.global(12, "weston_touch_calibration", 1)
...

3. Saving Weston logs in a file[edit | edit source]

Standard Weston logs are available in the /home/weston/weston.log file when Weston is started with the "weston user" using the systemd service.

cat /home/weston/weston.log

4. To go further[edit | edit source]

You can refer to the official Wayland and Weston documentations: