Last edited one year ago

How to debug Weston

Applicable for STM32MP13x lines, STM32MP15x lines, STM32MP25x lines

1. Wayland logs

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)
...

2. Saving Weston logs in a file

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

3. To go further

You can refer to the official Wayland and Weston documentations: