BUG: layer_list is not empty after shutdown. Calls to weston_layer_fini() are missing somwhere.
I'm seeing this error when trying to start weston with cog running on top.
Starting Weston Wayland Compositor...
Date: 2022-04-06 UTC
[09:01:21.060] weston 10.0.0
https://wayland.freedesktop.org
Bug reports to: https://gitlab.freedesktop.org/wayland/weston/issues/
Build: 10.0.0
[09:01:21.061] Command line: /bin/weston --config=/etc/xdg/weston/weston.ini -Swayland-1
[09:01:21.061] OS: Linux, 5.17.1, #1 SMP PREEMPT Tue Apr 5 22:41:59 MDT 2022, x86_64
[09:01:21.061] Flight recorder: enabled
[09:01:21.067] Using config file '/etc/xdg/weston/weston.ini'
[09:01:21.069] Output repaint window is 7 ms maximum.
[09:01:21.092] Loading module '/usr/lib/libweston-10/drm-backend.so'
[09:01:21.228] initializing drm backend
[09:01:21.229] Trying logind launcher...
[09:01:21.230] logind: cannot find systemd session for uid: 0 -61
[09:01:21.230] logind: cannot setup systemd-logind helper error: (No data available), using legacy fallback
[09:01:21.231] Trying weston_launch launcher...
[09:01:21.231] could not get launcher fd from env
[09:01:21.232] Trying direct launcher...
[09:01:21.257] using /dev/dri/card0
[09:01:21.263] DRM: does not support atomic modesetting
[09:01:21.263] DRM: does not support GBM modifiers
[09:01:21.264] DRM: supports picture aspect ratio
[09:01:21.393] event2 - Power Button: is tagged by udev as: Keyboard
[09:01:21.394] event2 - Power Button: device is a keyboard
[09:01:21.411] event3 - Video Bus: is tagged by udev as: Keyboard
[09:01:21.412] event3 - Video Bus: device is a keyboard
[09:01:21.461] event0 - Power Button: is tagged by udev as: Keyboard
[09:01:21.462] event0 - Power Button: device is a keyboard
[09:01:21.476] event1 - Sleep Button: is tagged by udev as: Keyboard
[09:01:21.477] event1 - Sleep Button: device is a keyboard
[09:01:21.500] event4 - PiKVM Composite KVM Device: is tagged by udev as: Keyboard
[09:01:21.501] event4 - PiKVM Composite KVM Device: device is a keyboard
[09:01:21.563] event5 - PiKVM Composite KVM Device: is tagged by udev as: Mouse
[09:01:21.565] event5 - PiKVM Composite KVM Device: device is a pointer
[09:01:21.722] libinput: configuring device "Power Button".
[09:01:21.723] libinput: configuring device "Video Bus".
[09:01:21.723] libinput: configuring device "Power Button".
[09:01:21.723] libinput: configuring device "Sleep Button".
[09:01:21.723] libinput: configuring device "PiKVM Composite KVM Device".
[09:01:21.723] libinput: configuring device "PiKVM Composite KVM Device".
[09:01:21.723] input device event5 has no enabled output associated (none named), skipping calibration for now.
[09:01:21.738] DRM: head 'VGA-1' updated, connector 37 is disconnected.
[09:01:21.738] DRM: head 'VGA-1' found, connector 37 is disconnected.
[09:01:21.745] DRM: head 'LVDS-1' updated, connector 39 is connected, EDID make 'unknown', model 'unknown', serial 'unknown'
[09:01:21.745] DRM: head 'LVDS-1' found, connector 39 is connected, EDID make 'unknown', model 'unknown', serial 'unknown'
[09:01:22.771] DRM: head 'DVI-D-1' updated, connector 41 is connected, EDID make 'TSB', model 'Toshiba-H2C', serial '2290649088'
[09:01:22.772] DRM: head 'DVI-D-1' found, connector 41 is connected, EDID make 'TSB', model 'Toshiba-H2C', serial '2290649088'
[09:01:22.773] DRM: head 'DP-1' updated, connector 43 is disconnected.
[09:01:22.773] DRM: head 'DP-1' found, connector 43 is disconnected.
[09:01:22.837] DRM: head 'DVI-D-2' updated, connector 47 is disconnected.
[09:01:22.847] DRM: head 'DVI-D-2' found, connector 47 is disconnected.
[09:01:22.954] DRM: head 'DP-2' updated, connector 49 is connected, EDID make 'CHR', model '1024x768', serial '880'
[09:01:22.954] DRM: head 'DP-2' found, connector 49 is connected, EDID make 'CHR', model '1024x768', serial '880'
[09:01:22.955] Registered plugin API 'weston_drm_output_api_v1' of size 24
[09:01:22.955] Registered plugin API 'weston_drm_virtual_output_api_v1' of size 48
[09:01:22.955] Color manager: no-op
[09:01:22.955] Invalid transform "270" for output DVI-D-1
[09:01:22.955] event2 - Power Button: device removed
[09:01:22.961] event3 - Video Bus: device removed
[09:01:22.968] event0 - Power Button: device removed
[09:01:22.973] event1 - Sleep Button: device removed
[09:01:22.978] event4 - PiKVM Composite KVM Device: device removed
[09:01:22.983] event5 - PiKVM Composite KVM Device: device removed
[09:01:22.995] BUG: layer_list is not empty after shutdown. Calls to weston_layer_fini() are missing somwhere.
weston.service: Main process exited, code=exited, status=1/FAILURE
weston.service: Failed with result 'exit-code'.
Failed to start Weston Wayland Compositor.
cc @mvlad