Skip to contentSkip to conversation

weston-init: add delay before starting weston when input device is not detected in time

PATCH In review Hongmei Gou 2 participants 2 messages Sep 20, 2018 – Sep 24, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 weston-init: add delay before starting weston when input device is not detected in time

* Adding delay to work around the race condition when weston is started before detection of input devices (e.g., mouse/keyboard) for EVMs without touchscreen LCD

---
 meta-arago-distro/recipes-graphics/wayland/weston-init.bbappend | 2 +-
 meta-arago-distro/recipes-graphics/wayland/weston-init/init     | 8 ++++++++
 2 files changed, 9 insertions(+), 1 deletion(-)
meta-arago-distro/recipes-graphics/wayland/weston-init.bbappend +1 -1
index 4ed6a62..cbe0fe3 100644
@@ -1,4 +1,4 @@
-PR_append = ".arago8"
+PR_append = ".arago9"
 
 FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
 
meta-arago-distro/recipes-graphics/wayland/weston-init/init +8 -0
index 336e5af..461b078 100644
@@ -40,6 +40,14 @@ case "$1" in
             chmod 0700 $XDG_RUNTIME_DIR
         fi
 
+        echo "Starting Weston"
+
+        if [ ! -d "/dev/input" ]; then
+            echo "Waiting for input device..."
+            killproc weston
+            sleep 3
+        fi
+
         openvt -c 4 -f runWeston
 
         # If there's no touchscreen device available, done
Signature · 1 line
1.9.1
#1 lore raw

Denys,

Can you please backport this to ti2018.03?

Thank you,

Jake

Quoted 39 lines · Hongmei Gou

* Adding delay to work around the race condition when weston is started before detection of input devices (e.g., mouse/keyboard) for EVMs without touchscreen LCD

---
  meta-arago-distro/recipes-graphics/wayland/weston-init.bbappend | 2 +-
  meta-arago-distro/recipes-graphics/wayland/weston-init/init     | 8 ++++++++
  2 files changed, 9 insertions(+), 1 deletion(-)
meta-arago-distro/recipes-graphics/wayland/weston-init.bbappend +1 -1
index 4ed6a62..cbe0fe3 100644
@@ -1,4 +1,4 @@
-PR_append = ".arago8"
+PR_append = ".arago9"
 
  FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
 
meta-arago-distro/recipes-graphics/wayland/weston-init/init +8 -0
index 336e5af..461b078 100644
@@ -40,6 +40,14 @@ case "$1" in
              chmod 0700 $XDG_RUNTIME_DIR
          fi
 
+        echo "Starting Weston"
+
+        if [ ! -d "/dev/input" ]; then
+            echo "Waiting for input device..."
+            killproc weston
+            sleep 3
+        fi
+
          openvt -c 4 -f runWeston
 
          # If there's no touchscreen device available, done