From 7532cfdc224e50a2e9e1e55f9bc73991256ac743 Mon Sep 17 00:00:00 2001 From: Ming Liu Date: Tue, 6 Jun 2023 13:18:59 +0200 Subject: weston-init: disable xwayland for mainline BSPs A regression was introduced by commit 47f0410be1: [ weston-init: Rework weston.ini configuration ] xwayland had been dropped from weston.ini for mainline BSPs before that commit, since it's not supported by mainline BSPs: [ weston-init: comment in xwayland=true for mainline BSPs The main recipe now sets xwayland=true in weston.ini, but xwayland does not really work for mainline BSPs, the following error was observed on both imx6/imx7 machines, as follows: ``` | # gst-play-1.0 testvideo_h264_360p.mp4 | Press 'k' to see a list of keyboard shortcuts. | Now playing testvideo_h264_360p.mp4 | X connection to :0.0 broken (explicit kill or server shutdown). ``` after removing "xwayland=true" from weston.ini, it works again. This patch mainly aims to resolve this problem by introducing a variable INI_COMMENT_ASSIGNMENTS that the end users could set to comment a line in weston.ini. ] but after commit 47f0410be1, "xwayland=true" is added back again to weston.ini. Introduce a xwayland PACKAGECONFIG to control that, drop it from weston.ini for mainline BSPs. Signed-off-by: Ming Liu --- recipes-graphics/wayland/weston-init.bbappend | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'recipes-graphics/wayland') diff --git a/recipes-graphics/wayland/weston-init.bbappend b/recipes-graphics/wayland/weston-init.bbappend index 69a807a3b..595633b04 100644 --- a/recipes-graphics/wayland/weston-init.bbappend +++ b/recipes-graphics/wayland/weston-init.bbappend @@ -10,12 +10,16 @@ SRC_URI:append:mx6sl-nxp-bsp = " file://weston.config" PACKAGECONFIG ??= " \ no-idle-timeout \ + ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xwayland', '', d)} \ ${PACKAGECONFIG_GBM_FORMAT} \ ${PACKAGECONFIG_REPAINT_WINDOW} \ ${PACKAGECONFIG_SIZE} \ ${PACKAGECONFIG_USE_G2D} \ " +# Mainline BSPs dont support xwayland +PACKAGECONFIG:remove:use-mainline-bsp = "xwayland" + PACKAGECONFIG_GBM_FORMAT ?= "" PACKAGECONFIG_GBM_FORMAT:mx8mq-nxp-bsp ?= "gbm-format" @@ -46,6 +50,7 @@ PACKAGECONFIG[rdp] = ",," PACKAGECONFIG[repaint-window] = ",," PACKAGECONFIG[size] = ",," PACKAGECONFIG[use-g2d] = ",," +PACKAGECONFIG[xwayland] = ",," do_install:append() { if [ -f "${WORKDIR}/weston.config" ]; then @@ -75,5 +80,9 @@ do_install:append() { sed -i -e "/^\[core\]/a #use-g2d=${USE_G2D_VALUE}" ${D}${sysconfdir}/xdg/weston/weston.ini fi + if [ "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', 'yes', 'no', d)}" = "no" ]; then + sed -i -e "s/^xwayland=true/#xwayland=true/g" ${D}${sysconfdir}/xdg/weston/weston.ini + fi + sed -i -e 's,@bindir@,${bindir},g' ${D}${sysconfdir}/xdg/weston/weston.ini } -- cgit v1.2.3-54-g00ecf