From 36ae1654b57f416627a2e56a3eb1e1c1a194d235 Mon Sep 17 00:00:00 2001 From: Max Krummenacher Date: Tue, 17 Aug 2021 19:31:53 +0200 Subject: weston-init: customize For upstream weston (i.e. not the imx fork) the following two settings are missing in the default weston.ini. Add them. - Set idle-time=0 to prevent weston from entering a screensaver mode on idle. - Set use-pixman=true for modules without a GPU to prevent weston from using a CPU to nearly 100% and having a very slow screen update rate, e.g. a not smoothly moving cursor. (downstream already has idle-time=0 set and performs well without use-pixman=true) Signed-off-by: Max Krummenacher (cherry picked from commit 6d90430cc5a2691a81bb353c24b4d723f6784799) --- recipes-graphics/wayland/weston-init.bbappend | 35 +++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/recipes-graphics/wayland/weston-init.bbappend b/recipes-graphics/wayland/weston-init.bbappend index 1833c74..1ba5ed4 100644 --- a/recipes-graphics/wayland/weston-init.bbappend +++ b/recipes-graphics/wayland/weston-init.bbappend @@ -12,3 +12,38 @@ uncomment() { sed -i -e 's,^#'"$1"','"$1"',g' $2 fi } + + +configure_noidle() { + sed -i '/idle-time=0/d' ${D}${sysconfdir}/xdg/weston/weston.ini + sed -i '/^\[core\]/a idle-time=0' ${D}${sysconfdir}/xdg/weston/weston.ini +} + +# Prevent weston from going to sleep +do_install:append:upstream() { + configure_noidle +} + +configure_pixman() { + sed -i '/use-pixman=true/d' ${D}${sysconfdir}/xdg/weston/weston.ini + sed -i '/^\[core\]/a use-pixman=true' ${D}${sysconfdir}/xdg/weston/weston.ini +} + +# With upstream weston and modules without GPU weston uses a lot of +# cpu time and becomes very unresponsive. Setting use-pixman=true works +# around it. +do_install:append:upstream:colibri-imx6ull() { + configure_pixman +} + +do_install:append:upstream:colibri-imx6ull-emmc() { + configure_pixman +} + +do_install:append:upstream:colibri-imx7() { + configure_pixman +} + +do_install:append:upstream:colibri-imx7-emmc() { + configure_pixman +} -- cgit v1.2.3