diff options
author | Marcel Ziswiler <marcel.ziswiler@toradex.com> | 2016-12-23 10:46:28 +0100 |
---|---|---|
committer | Max Krummenacher <max.krummenacher@toradex.com> | 2017-01-11 20:18:10 +0100 |
commit | c3fee8cfb96b2ffdf6d608af7746949da6e786b2 (patch) | |
tree | ef1d9b7298e3f45cba1d94d79c86c2877a3fffdc /recipes-graphics | |
parent | 58e39789e17ecd7b575e40ed60536b5e77da83f9 (diff) |
xinput-calibrator: fix operation on multihead configuration
As e.g. our Tegra 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.
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
Diffstat (limited to 'recipes-graphics')
-rw-r--r-- | recipes-graphics/xinput-calibrator/xinput-calibrator/add-geometry-input-when-calibrating.patch | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/recipes-graphics/xinput-calibrator/xinput-calibrator/add-geometry-input-when-calibrating.patch b/recipes-graphics/xinput-calibrator/xinput-calibrator/add-geometry-input-when-calibrating.patch new file mode 100644 index 0000000..296b075 --- /dev/null +++ b/recipes-graphics/xinput-calibrator/xinput-calibrator/add-geometry-input-when-calibrating.patch @@ -0,0 +1,37 @@ +From d4699c60c773e75a68227f82afea0b607667a4c0 Mon Sep 17 00:00:00 2001 +From: "Marcel Ziswiler" <marcel.ziswiler@toradex.com>> +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 +Update: + Remove bashism + +Upstream-Status: Inappropriate [no longer maintained] + +Multihead capability update curtsy Toradex. + +Signed-off-by: Jonathan David <jonathan.david@ni.com> +Signed-off-by: Maxin B. John <maxin.john@intel.com> +Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> +--- + scripts/xinput_calibrator_pointercal.sh | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/scripts/xinput_calibrator_pointercal.sh b/scripts/xinput_calibrator_pointercal.sh +index fccb197..fea7c2f 100755 +--- a/scripts/xinput_calibrator_pointercal.sh ++++ b/scripts/xinput_calibrator_pointercal.sh +@@ -24,7 +24,8 @@ if [ -e $CALFILE ] ; then + fi + 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 }' | 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 + echo "Calibration data stored in $CALFILE (log in $LOGFILE)" +-- +2.4.0 + |