Skip to contentSkip to conversation

xinput-calibrator: fix operation on multihead configuration

PATCH In review Marcel Ziswiler 2 participants 2 messages Dec 23, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xinput-calibrator: fix operation on multihead configuration

From: Marcel Ziswiler <[email protected]>

As e.g. the Toradex Colibri T20, Apalis/Colibri T30 and Apalis TK1 modules are multihead capable and if HDMI is plugged in while the xinput calibrator was run this led to the following error message:

root@apalis-t30:~# xinput_calibrator_once.sh
Unknown option: 640x480

Fix this by just using the first detected heads geometry definition.

---

 .../add-geometry-input-when-calibrating.patch                 | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)
meta/recipes-graphics/xinput-calibrator/xinput-calibrator/add-geometry-input-when-calibrating.patch +7 -4
index 9dc94ae..296b075 100644
@@ -1,6 +1,6 @@
-From 1cb83759632bb218559c4d0d65ff79f868c03dc5 Mon Sep 17 00:00:00 2001
-From: "Maxin B. John" <[email protected]>
-Date: Tue, 9 Aug 2016 17:03:31 +0300
+From d4699c60c773e75a68227f82afea0b607667a4c0 Mon Sep 17 00:00:00 2001
+From: "Marcel Ziswiler" <[email protected]>>
+Date: Thu, 22 Dec 2016 11:34:31 +0100
 Subject: [PATCH] add geometry input when calibrating
 
 Send monitor geometry to xinput_calibrator when running the script
@@ -9,8 +9,11 @@ Update:
 
 Upstream-Status: Inappropriate [no longer maintained]
 
+Multihead capability update curtsy Toradex.
+
 Signed-off-by: Jonathan David <[email protected]>
 Signed-off-by: Maxin B. John <[email protected]>
+Signed-off-by: Marcel Ziswiler <[email protected]>
 ---
  scripts/xinput_calibrator_pointercal.sh | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
@@ -24,7 +27,7 @@ index fccb197..fea7c2f 100755
  fi
  
 -CALDATA=`$BINARY --output-type xinput -v | tee $LOGFILE | grep '    xinput set' | sed 's/^    //g; s/$/;/g'`
-+RESOLUTION=$(xrandr | awk -F '[[:space:]+]' '/ connected/ { if ($3 != "primary") print $3; if ($3 == "primary") print $4 }')
++RESOLUTION=$(xrandr | awk -F '[[:space:]+]' '/ connected/ { if ($3 != "primary") print $3; if ($3 == "primary") print $4 }' | sed q)
 +CALDATA=`$BINARY --geometry $RESOLUTION --output-type xinput -v | tee $LOGFILE | grep '    xinput set' | sed 's/^    //g; s/$/;/g'`
  if [ ! -z "$CALDATA" ] ; then
    echo $CALDATA > $CALFILE
Signature · 1 line
2.9.3
#1 lore raw

This belongs to openembedded-core ML.

Quoted 72 lines · Marcel Ziswiler

From: Marcel Ziswiler <[email protected]>

As e.g. the Toradex Colibri T20, Apalis/Colibri T30 and Apalis TK1 modules are multihead capable and if HDMI is plugged in while the xinput calibrator was run this led to the following error message:

root@apalis-t30:~# xinput_calibrator_once.sh
Unknown option: 640x480

Fix this by just using the first detected heads geometry definition.

---

 .../add-geometry-input-when-calibrating.patch                 | 11
+++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)
(quoted diff) +0 -0

calibrator/add-geometry-input-when-calibrating.patch b/meta/recipes-graphics/xinput-calibrator/xinput- calibrator/add-geometry-input-when-calibrating.patch index 9dc94ae..296b075 100644
--- a/meta/recipes-graphics/xinput-calibrator/xinput- calibrator/add-geometry-input-when-calibrating.patch +++ b/meta/recipes-graphics/xinput-calibrator/xinput- calibrator/add-geometry-input-when-calibrating.patch

meta/recipes-graphics/xinput-calibrator/xinput-calibrator/add-geometry-input-when-calibrating.patch +6 -3
@@ -1,6 +1,6 @@
-From 1cb83759632bb218559c4d0d65ff79f868c03dc5 Mon Sep 17 00:00:00 2001
-From: "Maxin B. John" <[email protected]>
-Date: Tue, 9 Aug 2016 17:03:31 +0300
+From d4699c60c773e75a68227f82afea0b607667a4c0 Mon Sep 17 00:00:00 2001
+From: "Marcel Ziswiler" <[email protected]>>
+Date: Thu, 22 Dec 2016 11:34:31 +0100
 Subject: [PATCH] add geometry input when calibrating
 
 Send monitor geometry to xinput_calibrator when running the script
@@ -9,8 +9,11 @@ Update:
 
 Upstream-Status: Inappropriate [no longer maintained]
 
+Multihead capability update curtsy Toradex.
+
 Signed-off-by: Jonathan David <[email protected]>
 Signed-off-by: Maxin B. John <[email protected]>
+Signed-off-by: Marcel Ziswiler <[email protected]>
 ---
  scripts/xinput_calibrator_pointercal.sh | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
@@ -24,7 +27,7 @@ index fccb197..fea7c2f 100755
  fi
 
 -CALDATA=`$BINARY --output-type xinput -v | tee $LOGFILE | grep '

xinput set' | sed 's/^ //g; s/$/;/g'`
-+RESOLUTION=$(xrandr | awk -F '[[:space:]+]' '/ connected/ { if ($3 != "primary") print $3; if ($3 == "primary") print $4 }') ++RESOLUTION=$(xrandr | awk -F '[[:space:]+]' '/ connected/ { if ($3 != "primary") print $3; if ($3 == "primary") print $4 }' | sed q)
+CALDATA=`$BINARY --geometry $RESOLUTION --output-type xinput -v | tee
$LOGFILE | grep ' xinput set' | sed 's/^ //g; s/$/;/g'`
if [ ! -z "$CALDATA" ] ; then
echo $CALDATA > $CALFILE
--
2.9.3

--
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel