All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-oe-meta-systemd 0/5] xinput-calibrator rework
@ 2013-02-05 22:18 Andreas Müller
  2013-02-05 22:18 ` [meta-oe-meta-systemd 1/5] xinput-calibrator: update to latest git commit Andreas Müller
                   ` (5 more replies)
  0 siblings, 6 replies; 16+ messages in thread
From: Andreas Müller @ 2013-02-05 22:18 UTC (permalink / raw)
  To: openembedded-devel

* Implemented are 3 modes of invocation:
    1. udev/systemd
    2. /etc/xdg/autostart
    3. manual
  1/2 are selected upon DISTRO_FEATURES containing systemd or not

* The calibration is stored in /etc/X11/xorg.conf.d/99-<name-of-touchscreen>.conf
  Herby support for multiple touchsceen devices is prepared.

* The script detects upon parameter information how it was called and waits for
  xserver to come up / detect connected touchsceen devices. If no matching
  calibration file is found, the xinput_calibrator is called for this device.
  For systemd invocation the default display is choosen.

* For manual invocation and multiple touchscreen devices attached, the operator
  can select which device to calibrate interactively.

* Multiple touchscreen support is prepared - the following open issues are known:
  * Multiple touchscreens with same device name will get same calibration values.
    An unique device identifier could not be found yet.
  * systemd startup with multiple device cause multiple instances of
    xinput_calibrator being started without information for which device
    the calibration is performed.

* Many many tests were performed:
  2 automatic invocation types * (1st + 2nd startup) * (0, 1, 2 touchscreens)

* Other layers need alignment for pointercal removement. If accepted I can take
  care (this is NOT an extortion :)



The following changes since commit 4128325a4c87bcde6ac6ffe5dbf5d6d057ee4804:

  nodejs: export DESTDIR to fix build with dash (2013-02-05 11:05:51 +0100)

are available in the git repository at:
  git://gitorious.org/schnitzeltony-oe-meta/meta-openembedded.git xinput-calibrator

Andreas Müller (5):
      xinput-calibrator: update to latest git commit
      xinput-calibrator: Add --output-filename to store calibration to file
      xinput-calibrator: rework
      pointercal-xinput: remove
      xinput-calibrator: do not RDEPEND xterm

 .../pointercal-xinput/pointercal.xinput            |    1 -
 .../xinput-calibrator/pointercal-xinput_0.0.bb     |   19 --
 ...er-output-filename-and-store-in-output_fi.patch |  248 ++++++++++++++++++++
 ...vent-timeout-exit-when-no-timeout-is-used.patch |   82 +++++++
 ...vdev-do-write-calibration-results-if-outp.patch |  164 +++++++++++++
 ...orgPrint-do-write-calibration-results-if-.patch |  156 ++++++++++++
 ...sbtouchscreen-overridde-default-file-name.patch |   50 ++++
 ...librator-destructors-virtual-to-fix-warni.patch |   64 +++++
 ...er-size-for-max-line-length-only-once-in-.patch |   77 ++++++
 .../99-xf86-xinput-calibrator.rules                |    6 +
 .../xinput-calibrator/xinput-calibrator@.service   |    8 +
 .../xinput_calibrator_pointercal2.sh               |  151 ++++++++++++
 .../xinput-calibrator/xinput-calibrator_git.bb     |   52 ++++-
 .../xinput-calibrator/xinput-calibrator.service    |   11 -
 .../xinput-calibrator_git.bbappend                 |   10 -
 15 files changed, 1046 insertions(+), 53 deletions(-)
 delete mode 100644 meta-oe/recipes-graphics/xinput-calibrator/pointercal-xinput/pointercal.xinput
 delete mode 100644 meta-oe/recipes-graphics/xinput-calibrator/pointercal-xinput_0.0.bb
 create mode 100644 meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/0001-Add-parameter-output-filename-and-store-in-output_fi.patch
 create mode 100644 meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/0001-Prevent-timeout-exit-when-no-timeout-is-used.patch
 create mode 100644 meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/0002-CalibratorEvdev-do-write-calibration-results-if-outp.patch
 create mode 100644 meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/0003-CalibratorXorgPrint-do-write-calibration-results-if-.patch
 create mode 100644 meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/0004-CalibratorUsbtouchscreen-overridde-default-file-name.patch
 create mode 100644 meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/0005-Make-all-Calibrator-destructors-virtual-to-fix-warni.patch
 create mode 100644 meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/0006-Set-up-buffer-size-for-max-line-length-only-once-in-.patch
 create mode 100644 meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/99-xf86-xinput-calibrator.rules
 create mode 100644 meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/xinput-calibrator@.service
 create mode 100644 meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/xinput_calibrator_pointercal2.sh
 delete mode 100644 meta-systemd/meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/xinput-calibrator.service
 delete mode 100644 meta-systemd/meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bbappend

-- 
1.7.6.5




^ permalink raw reply	[flat|nested] 16+ messages in thread

* [meta-oe-meta-systemd 1/5] xinput-calibrator: update to latest git commit
  2013-02-05 22:18 [meta-oe-meta-systemd 0/5] xinput-calibrator rework Andreas Müller
@ 2013-02-05 22:18 ` Andreas Müller
  2013-02-05 22:18 ` [meta-oe-meta-systemd 2/5] xinput-calibrator: Add --output-filename to store calibration to file Andreas Müller
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 16+ messages in thread
From: Andreas Müller @ 2013-02-05 22:18 UTC (permalink / raw)
  To: openembedded-devel

A new option --no-timeout was introduced. Unfortunately it is not working as
expected and has to be fixed.

Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
---
 ...vent-timeout-exit-when-no-timeout-is-used.patch |   82 ++++++++++++++++++++
 .../xinput-calibrator/xinput-calibrator_git.bb     |    7 +-
 2 files changed, 87 insertions(+), 2 deletions(-)
 create mode 100644 meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/0001-Prevent-timeout-exit-when-no-timeout-is-used.patch

diff --git a/meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/0001-Prevent-timeout-exit-when-no-timeout-is-used.patch b/meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/0001-Prevent-timeout-exit-when-no-timeout-is-used.patch
new file mode 100644
index 0000000..4cd29a6
--- /dev/null
+++ b/meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/0001-Prevent-timeout-exit-when-no-timeout-is-used.patch
@@ -0,0 +1,82 @@
+From 5d404f02bfb9c6eabbbe93dea2a8eb7ed4fd07d6 Mon Sep 17 00:00:00 2001
+From: Jeff Lasslett <jeff.lasslett@gmail.com>
+Date: Wed, 9 Jan 2013 14:12:46 +1100
+Subject: [PATCH] Prevent timeout exit when --no-timeout is used
+
+Upstream-Status: Submitted [https://github.com/tias/xinput_calibrator/pull/45]
+
+---
+ src/gui/gtkmm.cpp |   30 ++++++++++++++++--------------
+ src/gui/x11.cpp   |   13 +++++++------
+ 2 files changed, 23 insertions(+), 20 deletions(-)
+
+diff --git a/src/gui/gtkmm.cpp b/src/gui/gtkmm.cpp
+index 32bb889..2f52e25 100644
+--- a/src/gui/gtkmm.cpp
++++ b/src/gui/gtkmm.cpp
+@@ -204,21 +204,23 @@ void CalibrationArea::redraw()
+ 
+ bool CalibrationArea::on_timer_signal()
+ {
+-    time_elapsed += time_step;
+-    if (time_elapsed > max_time) {
+-        exit(0);
+-    }
+-
+-    // Update clock
+-    Glib::RefPtr<Gdk::Window> win = get_window();
+-    if (win) {
+-        const Gdk::Rectangle rect(display_width/2 - clock_radius - clock_line_width,
+-                                 display_height/2 - clock_radius - clock_line_width,
+-                                 2 * clock_radius + 1 + 2 * clock_line_width,
+-                                 2 * clock_radius + 1 + 2 * clock_line_width);
+-        win->invalidate_rect(rect, false);
++    if (calibrator->get_use_timeout()) {
++        time_elapsed += time_step;
++        if (time_elapsed > max_time) {
++            exit(0);
++        }
++    
++        // Update clock
++        Glib::RefPtr<Gdk::Window> win = get_window();
++        if (win) {
++            const Gdk::Rectangle rect(display_width/2 - clock_radius - clock_line_width,
++                                     display_height/2 - clock_radius - clock_line_width,
++                                     2 * clock_radius + 1 + 2 * clock_line_width,
++                                     2 * clock_radius + 1 + 2 * clock_line_width);
++            win->invalidate_rect(rect, false);
++        }
+     }
+-
++    
+     return true;
+ }
+ 
+diff --git a/src/gui/x11.cpp b/src/gui/x11.cpp
+index db8a8a5..dfcd9fd 100644
+--- a/src/gui/x11.cpp
++++ b/src/gui/x11.cpp
+@@ -293,13 +293,14 @@ bool GuiCalibratorX11::on_expose_event()
+ 
+ bool GuiCalibratorX11::on_timer_signal()
+ {
+-    time_elapsed += time_step;
+-    if (time_elapsed > max_time) {
+-        exit(0);
+-    }
+-
+     // Update clock
+-    if(calibrator->get_use_timeout()){
++    if(calibrator->get_use_timeout()) {
++
++        time_elapsed += time_step;
++        if (time_elapsed > max_time) {
++            exit(0);
++        }
++
+         XSetForeground(display, gc, pixel[BLACK]);
+         XSetLineAttributes(display, gc, clock_line_width,
+                     LineSolid, CapButt, JoinMiter);
+-- 
+1.7.4.4
+
diff --git a/meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bb b/meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bb
index 97f9343..b71daeb 100644
--- a/meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bb
+++ b/meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bb
@@ -9,8 +9,11 @@ PR = "r1"
 
 inherit autotools
 
-SRCREV = "c01c5af807cb4b0157b882ab07a893df9a810111"
-SRC_URI = "git://github.com/tias/xinput_calibrator.git;protocol=git"
+SRCREV = "e02de96acbe2fa5a57b0bda6821a053b1b123fd2"
+SRC_URI = " \
+    git://github.com/tias/xinput_calibrator.git;protocol=git \
+    file://0001-Prevent-timeout-exit-when-no-timeout-is-used.patch \
+"
 
 S = "${WORKDIR}/git"
 
-- 
1.7.6.5




^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [meta-oe-meta-systemd 2/5] xinput-calibrator: Add --output-filename to store calibration to file
  2013-02-05 22:18 [meta-oe-meta-systemd 0/5] xinput-calibrator rework Andreas Müller
  2013-02-05 22:18 ` [meta-oe-meta-systemd 1/5] xinput-calibrator: update to latest git commit Andreas Müller
@ 2013-02-05 22:18 ` Andreas Müller
  2013-02-05 22:18 ` [meta-oe-meta-systemd 3/5] xinput-calibrator: rework Andreas Müller
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 16+ messages in thread
From: Andreas Müller @ 2013-02-05 22:18 UTC (permalink / raw)
  To: openembedded-devel

Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
---
 ...er-output-filename-and-store-in-output_fi.patch |  248 ++++++++++++++++++++
 ...vdev-do-write-calibration-results-if-outp.patch |  164 +++++++++++++
 ...orgPrint-do-write-calibration-results-if-.patch |  156 ++++++++++++
 ...sbtouchscreen-overridde-default-file-name.patch |   50 ++++
 ...librator-destructors-virtual-to-fix-warni.patch |   64 +++++
 ...er-size-for-max-line-length-only-once-in-.patch |   77 ++++++
 .../xinput-calibrator/xinput-calibrator_git.bb     |    8 +-
 7 files changed, 766 insertions(+), 1 deletions(-)
 create mode 100644 meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/0001-Add-parameter-output-filename-and-store-in-output_fi.patch
 create mode 100644 meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/0002-CalibratorEvdev-do-write-calibration-results-if-outp.patch
 create mode 100644 meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/0003-CalibratorXorgPrint-do-write-calibration-results-if-.patch
 create mode 100644 meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/0004-CalibratorUsbtouchscreen-overridde-default-file-name.patch
 create mode 100644 meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/0005-Make-all-Calibrator-destructors-virtual-to-fix-warni.patch
 create mode 100644 meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/0006-Set-up-buffer-size-for-max-line-length-only-once-in-.patch

diff --git a/meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/0001-Add-parameter-output-filename-and-store-in-output_fi.patch b/meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/0001-Add-parameter-output-filename-and-store-in-output_fi.patch
new file mode 100644
index 0000000..319a504
--- /dev/null
+++ b/meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/0001-Add-parameter-output-filename-and-store-in-output_fi.patch
@@ -0,0 +1,248 @@
+From 6d79af03c09ba84ed718da5a3bb76f0bd5d13600 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
+Date: Mon, 21 Jan 2013 12:31:12 +0100
+Subject: [PATCH 1/6] Add parameter --output-filename and store in
+ output_filename
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Upstream-Status: Submitted [https://github.com/tias/xinput_calibrator/pull/47]
+
+Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
+---
+ src/calibrator.cpp                |    5 +++--
+ src/calibrator.hh                 |   10 +++++++++-
+ src/calibrator/Evdev.cpp          |   10 ++++++----
+ src/calibrator/Evdev.hpp          |    6 ++++--
+ src/calibrator/Usbtouchscreen.cpp |    4 ++--
+ src/calibrator/Usbtouchscreen.hpp |    2 +-
+ src/calibrator/XorgPrint.cpp      |    4 ++--
+ src/calibrator/XorgPrint.hpp      |    2 +-
+ src/main_common.cpp               |   16 +++++++++++++---
+ 9 files changed, 41 insertions(+), 18 deletions(-)
+
+diff --git a/src/calibrator.cpp b/src/calibrator.cpp
+index 403ae8e..ae5ea86 100644
+--- a/src/calibrator.cpp
++++ b/src/calibrator.cpp
+@@ -37,10 +37,11 @@ bool Calibrator::verbose = false;
+ Calibrator::Calibrator(const char* const device_name0, const XYinfo& axys0,
+     const int thr_misclick, const int thr_doubleclick,
+     const OutputType output_type0, const char* geometry0,
+-    const bool use_timeout0)
++    const bool use_timeout0, const char* output_filename0)
+ : device_name(device_name0),
+     threshold_doubleclick(thr_doubleclick), threshold_misclick(thr_misclick),
+-    output_type(output_type0), geometry(geometry0), use_timeout(use_timeout0)
++    output_type(output_type0), geometry(geometry0), use_timeout(use_timeout0),
++    output_filename(output_filename0)
+ {
+     old_axys = axys0;
+ 
+diff --git a/src/calibrator.hh b/src/calibrator.hh
+index 96cff2b..7d406b4 100644
+--- a/src/calibrator.hh
++++ b/src/calibrator.hh
+@@ -145,7 +145,8 @@ public:
+                const int thr_doubleclick=0,
+                const OutputType output_type=OUTYPE_AUTO,
+                const char* geometry=0,
+-               const bool use_timeout=1);
++               const bool use_timeout=1,
++               const char* output_filename = 0);
+ 
+     ~Calibrator() {}
+ 
+@@ -180,6 +181,10 @@ public:
+     const bool get_use_timeout() const
+     { return use_timeout; }
+ 
++    /// get output filename set at cmdline or NULL
++    const char* get_output_filename() const
++    { return output_filename; }
++
+ protected:
+     /// check whether the coordinates are along the respective axis
+     bool along_axis(int xy, int x0, int y0);
+@@ -230,6 +235,9 @@ protected:
+     const char* geometry;
+ 
+     const bool use_timeout;
++
++    // manually specified output filename
++    const char* output_filename;
+ };
+ 
+ // Interfance for a CalibratorTester
+diff --git a/src/calibrator/Evdev.cpp b/src/calibrator/Evdev.cpp
+index a370689..413e314 100644
+--- a/src/calibrator/Evdev.cpp
++++ b/src/calibrator/Evdev.cpp
+@@ -47,8 +47,9 @@ CalibratorEvdev::CalibratorEvdev(const char* const device_name0,
+                                  const int thr_doubleclick,
+                                  const OutputType output_type,
+                                  const char* geometry,
+-                                 const bool use_timeout)
+-  : Calibrator(device_name0, axys0, thr_misclick, thr_doubleclick, output_type, geometry, use_timeout)
++                                 const bool use_timeout,
++                                 const char* output_filename)
++  : Calibrator(device_name0, axys0, thr_misclick, thr_doubleclick, output_type, geometry, use_timeout, output_filename)
+ {
+     // init
+     display = XOpenDisplay(NULL);
+@@ -166,8 +167,9 @@ CalibratorEvdev::CalibratorEvdev(const char* const device_name0,
+                                  const int thr_doubleclick,
+                                  const OutputType output_type,
+                                  const char* geometry,
+-                                 const bool use_timeout)
+-  : Calibrator(device_name0, axys0, thr_misclick, thr_doubleclick, output_type, geometry) { }
++                                 const bool use_timeout,
++                                 const char* output_filename)
++  : Calibrator(device_name0, axys0, thr_misclick, thr_doubleclick, output_type, geometry, output_filename) { }
+ 
+ // Destructor
+ CalibratorEvdev::~CalibratorEvdev () {
+diff --git a/src/calibrator/Evdev.hpp b/src/calibrator/Evdev.hpp
+index c586ba2..53e7277 100644
+--- a/src/calibrator/Evdev.hpp
++++ b/src/calibrator/Evdev.hpp
+@@ -47,7 +47,8 @@ protected:
+                     const int thr_doubleclick=0,
+                     const OutputType output_type=OUTYPE_AUTO,
+                     const char* geometry=0,
+-                    const bool use_timeout=false);
++                    const bool use_timeout=false,
++                    const char* output_filename = 0);
+ 
+ public:
+     CalibratorEvdev(const char* const device_name,
+@@ -57,7 +58,8 @@ public:
+                     const int thr_doubleclick=0,
+                     const OutputType output_type=OUTYPE_AUTO,
+                     const char* geometry=0,
+-                    const bool use_timeout=false);
++                    const bool use_timeout=false,
++                    const char* output_filename = 0);
+     ~CalibratorEvdev();
+ 
+     /// calculate and apply the calibration
+diff --git a/src/calibrator/Usbtouchscreen.cpp b/src/calibrator/Usbtouchscreen.cpp
+index c9fc20a..6ec71fd 100644
+--- a/src/calibrator/Usbtouchscreen.cpp
++++ b/src/calibrator/Usbtouchscreen.cpp
+@@ -48,8 +48,8 @@ static const char *p_flip_x = "flip_x";
+ static const char *p_flip_y = "flip_y";
+ static const char *p_swap_xy = "swap_xy";
+ 
+-CalibratorUsbtouchscreen::CalibratorUsbtouchscreen(const char* const device_name0, const XYinfo& axys0, const int thr_misclick, const int thr_doubleclick, const OutputType output_type, const char* geometry, const bool use_timeout)
+-  : Calibrator(device_name0, axys0, thr_misclick, thr_doubleclick, output_type, geometry, use_timeout)
++CalibratorUsbtouchscreen::CalibratorUsbtouchscreen(const char* const device_name0, const XYinfo& axys0, const int thr_misclick, const int thr_doubleclick, const OutputType output_type, const char* geometry, const bool use_timeout, const char* output_filename)
++  : Calibrator(device_name0, axys0, thr_misclick, thr_doubleclick, output_type, geometry, use_timeout, output_filename)
+ {
+     if (strcmp(device_name, "Usbtouchscreen") != 0)
+         throw WrongCalibratorException("Not a usbtouchscreen device");
+diff --git a/src/calibrator/Usbtouchscreen.hpp b/src/calibrator/Usbtouchscreen.hpp
+index 94473a3..4d84962 100644
+--- a/src/calibrator/Usbtouchscreen.hpp
++++ b/src/calibrator/Usbtouchscreen.hpp
+@@ -35,7 +35,7 @@ public:
+     CalibratorUsbtouchscreen(const char* const device_name, const XYinfo& axys,
+          const int thr_misclick=0, const int thr_doubleclick=0,
+         const OutputType output_type=OUTYPE_AUTO, const char* geometry=0,
+-        const bool use_timeout=false);
++        const bool use_timeout=false, const char* output_filename = 0);
+     ~CalibratorUsbtouchscreen();
+ 
+     virtual bool finish_data(const XYinfo new_axys);
+diff --git a/src/calibrator/XorgPrint.cpp b/src/calibrator/XorgPrint.cpp
+index 8e3a1b3..3dcb7ae 100644
+--- a/src/calibrator/XorgPrint.cpp
++++ b/src/calibrator/XorgPrint.cpp
+@@ -24,8 +24,8 @@
+ 
+ #include <cstdio>
+ 
+-CalibratorXorgPrint::CalibratorXorgPrint(const char* const device_name0, const XYinfo& axys0, const int thr_misclick, const int thr_doubleclick, const OutputType output_type, const char* geometry, const bool use_timeout)
+-  : Calibrator(device_name0, axys0, thr_misclick, thr_doubleclick, output_type, geometry, use_timeout)
++CalibratorXorgPrint::CalibratorXorgPrint(const char* const device_name0, const XYinfo& axys0, const int thr_misclick, const int thr_doubleclick, const OutputType output_type, const char* geometry, const bool use_timeout, const char* output_filename)
++  : Calibrator(device_name0, axys0, thr_misclick, thr_doubleclick, output_type, geometry, use_timeout, output_filename)
+ {
+     printf("Calibrating standard Xorg driver \"%s\"\n", device_name);
+     printf("\tcurrent calibration values: min_x=%d, max_x=%d and min_y=%d, max_y=%d\n",
+diff --git a/src/calibrator/XorgPrint.hpp b/src/calibrator/XorgPrint.hpp
+index 7afbd9f..0d7e4cf 100644
+--- a/src/calibrator/XorgPrint.hpp
++++ b/src/calibrator/XorgPrint.hpp
+@@ -35,7 +35,7 @@ public:
+     CalibratorXorgPrint(const char* const device_name, const XYinfo& axys,
+         const int thr_misclick=0, const int thr_doubleclick=0,
+         const OutputType output_type=OUTYPE_AUTO, const char* geometry=0,
+-        const bool use_timeout=false);
++        const bool use_timeout=false, const char* output_filename = 0);
+ 
+     virtual bool finish_data(const XYinfo new_axys);
+ 
+diff --git a/src/main_common.cpp b/src/main_common.cpp
+index f840e3d..efaa718 100644
+--- a/src/main_common.cpp
++++ b/src/main_common.cpp
+@@ -180,6 +180,7 @@ static void usage(char* cmd, unsigned thr_misclick)
+     fprintf(stderr, "\t--fake: emulate a fake device (for testing purposes)\n");
+     fprintf(stderr, "\t--geometry: manually provide the geometry (width and height) for the calibration window\n");
+     fprintf(stderr, "\t--no-timeout: turns off the timeout\n");
++    fprintf(stderr, "\t--output-filename: write calibration data to file (USB: override default /etc/modprobe.conf.local\n");
+ }
+ 
+ Calibrator* Calibrator::make_calibrator(int argc, char** argv)
+@@ -191,6 +192,7 @@ Calibrator* Calibrator::make_calibrator(int argc, char** argv)
+     XYinfo pre_axys;
+     const char* pre_device = NULL;
+     const char* geometry = NULL;
++    const char* output_filename = NULL;
+     unsigned thr_misclick = 15;
+     unsigned thr_doubleclick = 7;
+     OutputType output_type = OUTYPE_AUTO;
+@@ -289,6 +291,11 @@ Calibrator* Calibrator::make_calibrator(int argc, char** argv)
+             // Disable timeout
+ 			if (strcmp("--no-timeout", argv[i]) == 0) {
+ 				use_timeout = false;
++			} else
++
++			// Output file
++			if (strcmp("--output-filename", argv[i]) == 0) {
++				output_filename = argv[++i];
+ 			}
+ 
+             // unknown option
+@@ -363,7 +370,8 @@ Calibrator* Calibrator::make_calibrator(int argc, char** argv)
+     try {
+         // try Usbtouchscreen driver
+         return new CalibratorUsbtouchscreen(device_name, device_axys,
+-            thr_misclick, thr_doubleclick, output_type, geometry, use_timeout);
++            thr_misclick, thr_doubleclick, output_type, geometry,
++            use_timeout, output_filename);
+ 
+     } catch(WrongCalibratorException& x) {
+         if (verbose)
+@@ -373,7 +381,8 @@ Calibrator* Calibrator::make_calibrator(int argc, char** argv)
+     try {
+         // next, try Evdev driver (with XID)
+         return new CalibratorEvdev(device_name, device_axys, device_id,
+-            thr_misclick, thr_doubleclick, output_type, geometry, use_timeout);
++            thr_misclick, thr_doubleclick, output_type, geometry,
++            use_timeout, output_filename);
+ 
+     } catch(WrongCalibratorException& x) {
+         if (verbose)
+@@ -382,5 +391,6 @@ Calibrator* Calibrator::make_calibrator(int argc, char** argv)
+ 
+     // lastly, presume a standard Xorg driver (evtouch, mutouch, ...)
+     return new CalibratorXorgPrint(device_name, device_axys,
+-            thr_misclick, thr_doubleclick, output_type, geometry, use_timeout);
++            thr_misclick, thr_doubleclick, output_type, geometry,
++            use_timeout, output_filename);
+ }
+-- 
+1.7.6.5
+
diff --git a/meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/0002-CalibratorEvdev-do-write-calibration-results-if-outp.patch b/meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/0002-CalibratorEvdev-do-write-calibration-results-if-outp.patch
new file mode 100644
index 0000000..0e30631
--- /dev/null
+++ b/meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/0002-CalibratorEvdev-do-write-calibration-results-if-outp.patch
@@ -0,0 +1,164 @@
+From 0428975e1c9152891aa4269afdc02cea8d916247 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
+Date: Mon, 21 Jan 2013 16:11:16 +0100
+Subject: [PATCH 2/6] CalibratorEvdev: do write calibration results if
+ --output-filename was set
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Upstream-Status: Submitted [https://github.com/tias/xinput_calibrator/pull/47]
+
+Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
+---
+ src/calibrator/Evdev.cpp |  105 ++++++++++++++++++++++++++++++++++++++-------
+ 1 files changed, 88 insertions(+), 17 deletions(-)
+
+diff --git a/src/calibrator/Evdev.cpp b/src/calibrator/Evdev.cpp
+index 413e314..651cab9 100644
+--- a/src/calibrator/Evdev.cpp
++++ b/src/calibrator/Evdev.cpp
+@@ -39,6 +39,9 @@
+ #define EXIT_FAILURE 0
+ #endif
+ 
++// XXX: we currently don't handle lines that are longer than this
++#define MAX_LINE_LEN 1024
++
+ // Constructor
+ CalibratorEvdev::CalibratorEvdev(const char* const device_name0,
+                                  const XYinfo& axys0,
+@@ -517,18 +520,41 @@ bool CalibratorEvdev::output_xorgconfd(const XYinfo new_axys)
+     if (not_sysfs_name)
+         sysfs_name = "!!Name_Of_TouchScreen!!";
+ 
++    if(output_filename == NULL || not_sysfs_name)
++        printf("  copy the snippet below into '/etc/X11/xorg.conf.d/99-calibration.conf' (/usr/share/X11/xorg.conf.d/ in some distro's)\n");
++    else
++        printf("  writing xorg.conf calibration data to '%s'\n", output_filename);
++
+     // xorg.conf.d snippet
+-    printf("  copy the snippet below into '/etc/X11/xorg.conf.d/99-calibration.conf' (/usr/share/X11/xorg.conf.d/ in some distro's)\n");
+-    printf("Section \"InputClass\"\n");
+-    printf("	Identifier	\"calibration\"\n");
+-    printf("	MatchProduct	\"%s\"\n", sysfs_name);
+-    printf("	Option	\"Calibration\"	\"%d %d %d %d\"\n",
++    char line[MAX_LINE_LEN];
++    std::string outstr;
++
++    outstr += "Section \"InputClass\"\n";
++    outstr += "	Identifier	\"calibration\"\n";
++    sprintf(line, "	MatchProduct	\"%s\"\n", sysfs_name);
++    outstr += line;
++    sprintf(line, "	Option	\"Calibration\"	\"%d %d %d %d\"\n",
+                 new_axys.x.min, new_axys.x.max, new_axys.y.min, new_axys.y.max);
+-    printf("	Option	\"SwapAxes\"	\"%d\"\n", new_axys.swap_xy);
+-    printf("EndSection\n");
++    outstr += line;
++    sprintf(line, "	Option	\"SwapAxes\"	\"%d\"\n", new_axys.swap_xy);
++    outstr += line;
++    outstr += "EndSection\n";
+ 
++    // console out
++    printf("%s", outstr.c_str());
+     if (not_sysfs_name)
+         printf("\nChange '%s' to your device's name in the snippet above.\n", sysfs_name);
++    // file out
++    else if(output_filename != NULL) {
++        FILE* fid = fopen(output_filename, "w");
++        if (fid == NULL) {
++            fprintf(stderr, "Error: Can't open '%s' for writing. Make sure you have the necessary rights\n", output_filename);
++            fprintf(stderr, "New calibration data NOT saved\n");
++            return false;
++        }
++        fprintf(fid, "%s", outstr.c_str());
++        fclose(fid);
++    }
+ 
+     return true;
+ }
+@@ -540,26 +566,71 @@ bool CalibratorEvdev::output_hal(const XYinfo new_axys)
+     if (not_sysfs_name)
+         sysfs_name = "!!Name_Of_TouchScreen!!";
+ 
+-    // HAL policy output
+-    printf("  copy the policy below into '/etc/hal/fdi/policy/touchscreen.fdi'\n\
+-<match key=\"info.product\" contains=\"%s\">\n\
+-  <merge key=\"input.x11_options.calibration\" type=\"string\">%d %d %d %d</merge>\n"
+-     , sysfs_name, new_axys.x.min, new_axys.x.max, new_axys.y.min, new_axys.y.max);
+-    printf("  <merge key=\"input.x11_options.swapaxes\" type=\"string\">%d</merge>\n", new_axys.swap_xy);
+-    printf("</match>\n");
++    if(output_filename == NULL || not_sysfs_name)
++        printf("  copy the policy below into '/etc/hal/fdi/policy/touchscreen.fdi'\n");
++    else
++        printf("  writing HAL calibration data to '%s'\n", output_filename);
+ 
++    // HAL policy output
++    char line[MAX_LINE_LEN];
++    std::string outstr;
++
++    sprintf(line, "<match key=\"info.product\" contains=\"%s\">\n", sysfs_name);
++    outstr += line;
++    sprintf(line, "  <merge key=\"input.x11_options.calibration\" type=\"string\">%d %d %d %d</merge>\n",
++        new_axys.x.min, new_axys.x.max, new_axys.y.min, new_axys.y.max);
++    outstr += line;
++    sprintf(line, "  <merge key=\"input.x11_options.swapaxes\" type=\"string\">%d</merge>\n",
++        new_axys.swap_xy);
++    outstr += "</match>\n";
++    // console out
++    printf("%s", outstr.c_str());
+     if (not_sysfs_name)
+         printf("\nChange '%s' to your device's name in the config above.\n", sysfs_name);
++    // file out
++    else if(output_filename != NULL) {
++        FILE* fid = fopen(output_filename, "w");
++        if (fid == NULL) {
++            fprintf(stderr, "Error: Can't open '%s' for writing. Make sure you have the necessary rights\n", output_filename);
++            fprintf(stderr, "New calibration data NOT saved\n");
++            return false;
++        }
++        fprintf(fid, "%s", outstr.c_str());
++        fclose(fid);
++    }
+ 
+     return true;
+ }
+ 
+ bool CalibratorEvdev::output_xinput(const XYinfo new_axys)
+ {
++    if(output_filename == NULL)
++        printf("  Install the 'xinput' tool and copy the command(s) below in a script that starts with your X session\n");
++    else
++        printf("  writing calibration script to '%s'\n", output_filename);
++
+     // create startup script
+-    printf("  Install the 'xinput' tool and copy the command(s) below in a script that starts with your X session\n");
+-    printf("    xinput set-int-prop \"%s\" \"Evdev Axis Calibration\" 32 %d %d %d %d\n", device_name, new_axys.x.min, new_axys.x.max, new_axys.y.min, new_axys.y.max);
+-    printf("    xinput set-int-prop \"%s\" \"Evdev Axes Swap\" 8 %d\n", device_name, new_axys.swap_xy);
++    char line[MAX_LINE_LEN];
++    std::string outstr;
++
++    sprintf(line, "    xinput set-int-prop \"%s\" \"Evdev Axis Calibration\" 32 %d %d %d %d\n", device_name, new_axys.x.min, new_axys.x.max, new_axys.y.min, new_axys.y.max);
++    outstr += line;
++    sprintf(line, "    xinput set-int-prop \"%s\" \"Evdev Axes Swap\" 8 %d\n", device_name, new_axys.swap_xy);
++    outstr += line;
++
++    // console out
++    printf("%s", outstr.c_str());
++    // file out
++    if(output_filename != NULL) {
++		FILE* fid = fopen(output_filename, "w");
++		if (fid == NULL) {
++			fprintf(stderr, "Error: Can't open '%s' for writing. Make sure you have the necessary rights\n", output_filename);
++			fprintf(stderr, "New calibration data NOT saved\n");
++			return false;
++		}
++		fprintf(fid, "%s", outstr.c_str());
++		fclose(fid);
++    }
+ 
+     return true;
+ }
+-- 
+1.7.6.5
+
diff --git a/meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/0003-CalibratorXorgPrint-do-write-calibration-results-if-.patch b/meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/0003-CalibratorXorgPrint-do-write-calibration-results-if-.patch
new file mode 100644
index 0000000..91447dc
--- /dev/null
+++ b/meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/0003-CalibratorXorgPrint-do-write-calibration-results-if-.patch
@@ -0,0 +1,156 @@
+From d275793fe68067e6fd625f028ae09bcb10aac899 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
+Date: Mon, 21 Jan 2013 17:14:01 +0100
+Subject: [PATCH 3/6] CalibratorXorgPrint: do write calibration results if
+ --output-filename was set
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Upstream-Status: Submitted [https://github.com/tias/xinput_calibrator/pull/47]
+
+Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
+---
+ src/calibrator/XorgPrint.cpp |  104 ++++++++++++++++++++++++++++++++---------
+ 1 files changed, 81 insertions(+), 23 deletions(-)
+
+diff --git a/src/calibrator/XorgPrint.cpp b/src/calibrator/XorgPrint.cpp
+index 3dcb7ae..c9c5c9f 100644
+--- a/src/calibrator/XorgPrint.cpp
++++ b/src/calibrator/XorgPrint.cpp
+@@ -24,6 +24,9 @@
+ 
+ #include <cstdio>
+ 
++// XXX: we currently don't handle lines that are longer than this
++#define MAX_LINE_LEN 1024
++
+ CalibratorXorgPrint::CalibratorXorgPrint(const char* const device_name0, const XYinfo& axys0, const int thr_misclick, const int thr_doubleclick, const OutputType output_type, const char* geometry, const bool use_timeout, const char* output_filename)
+   : Calibrator(device_name0, axys0, thr_misclick, thr_doubleclick, output_type, geometry, use_timeout, output_filename)
+ {
+@@ -69,22 +72,50 @@ bool CalibratorXorgPrint::output_xorgconfd(const XYinfo new_axys)
+     if (not_sysfs_name)
+         sysfs_name = "!!Name_Of_TouchScreen!!";
+ 
++    if(output_filename == NULL || not_sysfs_name)
++        printf("  copy the snippet below into '/etc/X11/xorg.conf.d/99-calibration.conf' (/usr/share/X11/xorg.conf.d/ in some distro's)\n");
++    else
++        printf("  writing calibration script to '%s'\n", output_filename);
++
+     // xorg.conf.d snippet
+-    printf("  copy the snippet below into '/etc/X11/xorg.conf.d/99-calibration.conf' (/usr/share/X11/xorg.conf.d/ in some distro's)\n");
+-    printf("Section \"InputClass\"\n");
+-    printf("	Identifier	\"calibration\"\n");
+-    printf("	MatchProduct	\"%s\"\n", sysfs_name);
+-    printf("	Option	\"MinX\"	\"%d\"\n", new_axys.x.min);
+-    printf("	Option	\"MaxX\"	\"%d\"\n", new_axys.x.max);
+-    printf("	Option	\"MinY\"	\"%d\"\n", new_axys.y.min);
+-    printf("	Option	\"MaxY\"	\"%d\"\n", new_axys.y.max);
+-    printf("	Option	\"SwapXY\"	\"%d\" # unless it was already set to 1\n", new_axys.swap_xy);
+-    printf("	Option	\"InvertX\"	\"%d\"  # unless it was already set\n", new_axys.x.invert);
+-    printf("	Option	\"InvertY\"	\"%d\"  # unless it was already set\n", new_axys.y.invert);
+-    printf("EndSection\n");
++    char line[MAX_LINE_LEN];
++    std::string outstr;
+ 
++    outstr += "Section \"InputClass\"\n";
++    outstr += "	Identifier	\"calibration\"\n";
++    sprintf(line, "	MatchProduct	\"%s\"\n", sysfs_name);
++    outstr += line;
++    sprintf(line, "	Option	\"MinX\"	\"%d\"\n", new_axys.x.min);
++    outstr += line;
++    sprintf(line, "	Option	\"MaxX\"	\"%d\"\n", new_axys.x.max);
++    outstr += line;
++    sprintf(line, "	Option	\"MinY\"	\"%d\"\n", new_axys.y.min);
++    outstr += line;
++    sprintf(line, "	Option	\"MaxY\"	\"%d\"\n", new_axys.y.max);
++    outstr += line;
++    sprintf(line, "	Option	\"SwapXY\"	\"%d\" # unless it was already set to 1\n", new_axys.swap_xy);
++    outstr += line;
++    sprintf(line, "	Option	\"InvertX\"	\"%d\"  # unless it was already set\n", new_axys.x.invert);
++    outstr += line;
++    sprintf(line, "	Option	\"InvertY\"	\"%d\"  # unless it was already set\n", new_axys.y.invert);
++    outstr += line;
++    outstr += "EndSection\n";
++
++    // console out
++    printf("%s", outstr.c_str());
+     if (not_sysfs_name)
+         printf("\nChange '%s' to your device's name in the config above.\n", sysfs_name);
++    // file out
++    else if(output_filename != NULL) {
++        FILE* fid = fopen(output_filename, "w");
++        if (fid == NULL) {
++            fprintf(stderr, "Error: Can't open '%s' for writing. Make sure you have the necessary rights\n", output_filename);
++            fprintf(stderr, "New calibration data NOT saved\n");
++            return false;
++        }
++        fprintf(fid, "%s", outstr.c_str());
++        fclose(fid);
++    }
+ 
+     return true;
+ }
+@@ -96,21 +127,48 @@ bool CalibratorXorgPrint::output_hal(const XYinfo new_axys)
+     if (not_sysfs_name)
+         sysfs_name = "!!Name_Of_TouchScreen!!";
+ 
++    if(output_filename == NULL || not_sysfs_name)
++        printf("  copy the policy below into '/etc/hal/fdi/policy/touchscreen.fdi'\n");
++    else
++        printf("  writing HAL calibration data to '%s'\n", output_filename);
++
+     // HAL policy output
+-    printf("  copy the policy below into '/etc/hal/fdi/policy/touchscreen.fdi'\n\
+-<match key=\"info.product\" contains=\"%s\">\n\
+-  <merge key=\"input.x11_options.minx\" type=\"string\">%d</merge>\n\
+-  <merge key=\"input.x11_options.maxx\" type=\"string\">%d</merge>\n\
+-  <merge key=\"input.x11_options.miny\" type=\"string\">%d</merge>\n\
+-  <merge key=\"input.x11_options.maxy\" type=\"string\">%d</merge>\n"
+-     , sysfs_name, new_axys.x.min, new_axys.x.max, new_axys.y.min, new_axys.y.max);
+-    printf("  <merge key=\"input.x11_options.swapxy\" type=\"string\">%d</merge>\n", new_axys.swap_xy);
+-    printf("  <merge key=\"input.x11_options.invertx\" type=\"string\">%d</merge>\n", new_axys.x.invert);
+-    printf("  <merge key=\"input.x11_options.inverty\" type=\"string\">%d</merge>\n", new_axys.y.invert);
+-    printf("</match>\n");
++    char line[MAX_LINE_LEN];
++    std::string outstr;
++
++    sprintf(line, "<match key=\"info.product\" contains=\"%s\">\n", sysfs_name);
++    outstr += line;
++    sprintf(line, "  <merge key=\"input.x11_options.minx\" type=\"string\">%d</merge>\n", new_axys.x.min);
++    outstr += line;
++    sprintf(line, "  <merge key=\"input.x11_options.maxx\" type=\"string\">%d</merge>\n", new_axys.x.max);
++    outstr += line;
++    sprintf(line, "  <merge key=\"input.x11_options.miny\" type=\"string\">%d</merge>\n", new_axys.y.min);
++    outstr += line;
++    sprintf(line, "  <merge key=\"input.x11_options.maxy\" type=\"string\">%d</merge>\n", new_axys.y.max);
++    outstr += line;
++    sprintf(line, "  <merge key=\"input.x11_options.swapxy\" type=\"string\">%d</merge>\n", new_axys.swap_xy);
++    outstr += line;
++    sprintf(line, "  <merge key=\"input.x11_options.invertx\" type=\"string\">%d</merge>\n", new_axys.x.invert);
++    outstr += line;
++    sprintf(line, "  <merge key=\"input.x11_options.inverty\" type=\"string\">%d</merge>\n", new_axys.y.invert);
++    outstr += line;
++    outstr += "</match>\n";
+ 
++    // console out
++    printf("%s", outstr.c_str());
+     if (not_sysfs_name)
+         printf("\nChange '%s' to your device's name in the config above.\n", sysfs_name);
++    // file out
++    else if(output_filename != NULL) {
++        FILE* fid = fopen(output_filename, "w");
++        if (fid == NULL) {
++            fprintf(stderr, "Error: Can't open '%s' for writing. Make sure you have the necessary rights\n", output_filename);
++            fprintf(stderr, "New calibration data NOT saved\n");
++            return false;
++        }
++        fprintf(fid, "%s", outstr.c_str());
++        fclose(fid);
++    }
+ 
+     return true;
+ }
+-- 
+1.7.6.5
+
diff --git a/meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/0004-CalibratorUsbtouchscreen-overridde-default-file-name.patch b/meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/0004-CalibratorUsbtouchscreen-overridde-default-file-name.patch
new file mode 100644
index 0000000..2dd2064
--- /dev/null
+++ b/meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/0004-CalibratorUsbtouchscreen-overridde-default-file-name.patch
@@ -0,0 +1,50 @@
+From fa47700129680bbd4fbb324dc1999b664dd4419a Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
+Date: Mon, 21 Jan 2013 16:37:35 +0100
+Subject: [PATCH 4/6] CalibratorUsbtouchscreen: overridde default file name
+ when setting --output-filename
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Upstream-Status: Submitted [https://github.com/tias/xinput_calibrator/pull/47]
+
+Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
+---
+ src/calibrator/Usbtouchscreen.cpp |   11 ++++++-----
+ 1 files changed, 6 insertions(+), 5 deletions(-)
+
+diff --git a/src/calibrator/Usbtouchscreen.cpp b/src/calibrator/Usbtouchscreen.cpp
+index 6ec71fd..2a1f09e 100644
+--- a/src/calibrator/Usbtouchscreen.cpp
++++ b/src/calibrator/Usbtouchscreen.cpp
+@@ -104,10 +104,11 @@ bool CalibratorUsbtouchscreen::finish_data(const XYinfo new_axys)
+     write_bool_parameter(p_swap_xy, new_axys.swap_xy);
+ 
+     // Read, then write calibration parameters to modprobe_conf_local,
+-    // to keep the for the next boot
+-    FILE *fid = fopen(modprobe_conf_local, "r");
++    // or the file set by --output-filename to keep the for the next boot
++    const char* filename = output_filename == NULL ? modprobe_conf_local : output_filename;
++    FILE *fid = fopen(filename, "r");
+     if (fid == NULL) {
+-        fprintf(stderr, "Error: Can't open '%s' for reading. Make sure you have the necessary rights\n", modprobe_conf_local);
++        fprintf(stderr, "Error: Can't open '%s' for reading. Make sure you have the necessary rights\n", filename);
+         fprintf(stderr, "New calibration data NOT saved\n");
+         return false;
+     }
+@@ -135,9 +136,9 @@ bool CalibratorUsbtouchscreen::finish_data(const XYinfo new_axys)
+          p_flip_y, yesno(flip_y), p_swap_xy, yesno(new_axys.swap_xy));
+     new_contents += new_opt;
+ 
+-    fid = fopen(modprobe_conf_local, "w");
++    fid = fopen(filename, "w");
+     if (fid == NULL) {
+-        fprintf(stderr, "Error: Can't open '%s' for writing. Make sure you have the necessary rights\n", modprobe_conf_local);
++        fprintf(stderr, "Error: Can't open '%s' for writing. Make sure you have the necessary rights\n", filename);
+         fprintf(stderr, "New calibration data NOT saved\n");
+         return false;
+     }
+-- 
+1.7.6.5
+
diff --git a/meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/0005-Make-all-Calibrator-destructors-virtual-to-fix-warni.patch b/meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/0005-Make-all-Calibrator-destructors-virtual-to-fix-warni.patch
new file mode 100644
index 0000000..2aa161d
--- /dev/null
+++ b/meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/0005-Make-all-Calibrator-destructors-virtual-to-fix-warni.patch
@@ -0,0 +1,64 @@
+From 2846eade2601e92d34d40c603988a14dcb7634ac Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
+Date: Mon, 21 Jan 2013 17:32:11 +0100
+Subject: [PATCH 5/6] Make all Calibrator* destructors virtual to fix warning
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+warning was:
+
+main_x11.cpp: In function 'int main(int, char**)':
+main_x11.cpp:42:12: warning: deleting object of abstract class type 'Calibrator' which has non-virtual destructor will cause undefined behaviour [-Wdelete-non-virtual-dtor]calibrator/Usbtouchscreen.cpp: In member function 'void CalibratorUsbtouchscreen::read_int_parameter(const char*, int&)':
+
+Upstream-Status: Submitted [https://github.com/tias/xinput_calibrator/pull/47]
+
+Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
+---
+ src/calibrator.hh                 |    2 +-
+ src/calibrator/Evdev.hpp          |    2 +-
+ src/calibrator/Usbtouchscreen.hpp |    2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/calibrator.hh b/src/calibrator.hh
+index 7d406b4..3446b34 100644
+--- a/src/calibrator.hh
++++ b/src/calibrator.hh
+@@ -148,7 +148,7 @@ public:
+                const bool use_timeout=1,
+                const char* output_filename = 0);
+ 
+-    ~Calibrator() {}
++    virtual ~Calibrator() {}
+ 
+     /// set the doubleclick treshold
+     void set_threshold_doubleclick(int t)
+diff --git a/src/calibrator/Evdev.hpp b/src/calibrator/Evdev.hpp
+index 53e7277..b243090 100644
+--- a/src/calibrator/Evdev.hpp
++++ b/src/calibrator/Evdev.hpp
+@@ -60,7 +60,7 @@ public:
+                     const char* geometry=0,
+                     const bool use_timeout=false,
+                     const char* output_filename = 0);
+-    ~CalibratorEvdev();
++    virtual ~CalibratorEvdev();
+ 
+     /// calculate and apply the calibration
+     virtual bool finish(int width, int height);
+diff --git a/src/calibrator/Usbtouchscreen.hpp b/src/calibrator/Usbtouchscreen.hpp
+index 4d84962..287e5dd 100644
+--- a/src/calibrator/Usbtouchscreen.hpp
++++ b/src/calibrator/Usbtouchscreen.hpp
+@@ -36,7 +36,7 @@ public:
+          const int thr_misclick=0, const int thr_doubleclick=0,
+         const OutputType output_type=OUTYPE_AUTO, const char* geometry=0,
+         const bool use_timeout=false, const char* output_filename = 0);
+-    ~CalibratorUsbtouchscreen();
++    virtual ~CalibratorUsbtouchscreen();
+ 
+     virtual bool finish_data(const XYinfo new_axys);
+ 
+-- 
+1.7.6.5
+
diff --git a/meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/0006-Set-up-buffer-size-for-max-line-length-only-once-in-.patch b/meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/0006-Set-up-buffer-size-for-max-line-length-only-once-in-.patch
new file mode 100644
index 0000000..5d014cf
--- /dev/null
+++ b/meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/0006-Set-up-buffer-size-for-max-line-length-only-once-in-.patch
@@ -0,0 +1,77 @@
+From dd263d405a8ae109e1439c52dbabb55352d95bd0 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
+Date: Tue, 22 Jan 2013 08:35:20 +0100
+Subject: [PATCH 6/6] Set up buffer size for max line length only once in
+ calibrator.hh
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Upstream-Status: Submitted [https://github.com/tias/xinput_calibrator/pull/47]
+
+Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
+---
+ src/calibrator.hh                 |    3 +++
+ src/calibrator/Evdev.cpp          |    3 ---
+ src/calibrator/Usbtouchscreen.cpp |    2 +-
+ src/calibrator/XorgPrint.cpp      |    3 ---
+ 4 files changed, 4 insertions(+), 7 deletions(-)
+
+diff --git a/src/calibrator.hh b/src/calibrator.hh
+index 3446b34..e497bb6 100644
+--- a/src/calibrator.hh
++++ b/src/calibrator.hh
+@@ -30,6 +30,9 @@
+ #include <stdio.h>
+ #include <vector>
+ 
++// XXX: we currently don't handle lines that are longer than this
++#define MAX_LINE_LEN 1024
++
+ int xf86ScaleAxis(int Cx, int to_max, int to_min, int from_max, int from_min);
+ float scaleAxis(float Cx, int to_max, int to_min, int from_max, int from_min);
+ 
+diff --git a/src/calibrator/Evdev.cpp b/src/calibrator/Evdev.cpp
+index 651cab9..9a56475 100644
+--- a/src/calibrator/Evdev.cpp
++++ b/src/calibrator/Evdev.cpp
+@@ -39,9 +39,6 @@
+ #define EXIT_FAILURE 0
+ #endif
+ 
+-// XXX: we currently don't handle lines that are longer than this
+-#define MAX_LINE_LEN 1024
+-
+ // Constructor
+ CalibratorEvdev::CalibratorEvdev(const char* const device_name0,
+                                  const XYinfo& axys0,
+diff --git a/src/calibrator/Usbtouchscreen.cpp b/src/calibrator/Usbtouchscreen.cpp
+index 2a1f09e..713b815 100644
+--- a/src/calibrator/Usbtouchscreen.cpp
++++ b/src/calibrator/Usbtouchscreen.cpp
+@@ -114,7 +114,7 @@ bool CalibratorUsbtouchscreen::finish_data(const XYinfo new_axys)
+     }
+ 
+     std::string new_contents;
+-    const int len = 1024; // XXX: we currently don't handle lines that are longer than this
++    const int len = MAX_LINE_LEN;
+     char line[len];
+     const char *opt = "options usbtouchscreen";
+     const int opt_len = strlen(opt);
+diff --git a/src/calibrator/XorgPrint.cpp b/src/calibrator/XorgPrint.cpp
+index c9c5c9f..582fa78 100644
+--- a/src/calibrator/XorgPrint.cpp
++++ b/src/calibrator/XorgPrint.cpp
+@@ -24,9 +24,6 @@
+ 
+ #include <cstdio>
+ 
+-// XXX: we currently don't handle lines that are longer than this
+-#define MAX_LINE_LEN 1024
+-
+ CalibratorXorgPrint::CalibratorXorgPrint(const char* const device_name0, const XYinfo& axys0, const int thr_misclick, const int thr_doubleclick, const OutputType output_type, const char* geometry, const bool use_timeout, const char* output_filename)
+   : Calibrator(device_name0, axys0, thr_misclick, thr_doubleclick, output_type, geometry, use_timeout, output_filename)
+ {
+-- 
+1.7.6.5
+
diff --git a/meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bb b/meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bb
index b71daeb..6781e86 100644
--- a/meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bb
+++ b/meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bb
@@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://src/calibrator.cpp;endline=22;md5=1bcba08f67cdb56f340
 DEPENDS = "virtual/libx11 libxi"
 
 PV = "0.7.5+git${SRCPV}"
-PR = "r1"
+PR = "r2"
 
 inherit autotools
 
@@ -13,6 +13,12 @@ SRCREV = "e02de96acbe2fa5a57b0bda6821a053b1b123fd2"
 SRC_URI = " \
     git://github.com/tias/xinput_calibrator.git;protocol=git \
     file://0001-Prevent-timeout-exit-when-no-timeout-is-used.patch \
+    file://0001-Add-parameter-output-filename-and-store-in-output_fi.patch \
+    file://0002-CalibratorEvdev-do-write-calibration-results-if-outp.patch \
+    file://0003-CalibratorXorgPrint-do-write-calibration-results-if-.patch \
+    file://0004-CalibratorUsbtouchscreen-overridde-default-file-name.patch \
+    file://0005-Make-all-Calibrator-destructors-virtual-to-fix-warni.patch \
+    file://0006-Set-up-buffer-size-for-max-line-length-only-once-in-.patch \
 "
 
 S = "${WORKDIR}/git"
-- 
1.7.6.5




^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [meta-oe-meta-systemd 3/5] xinput-calibrator: rework
  2013-02-05 22:18 [meta-oe-meta-systemd 0/5] xinput-calibrator rework Andreas Müller
  2013-02-05 22:18 ` [meta-oe-meta-systemd 1/5] xinput-calibrator: update to latest git commit Andreas Müller
  2013-02-05 22:18 ` [meta-oe-meta-systemd 2/5] xinput-calibrator: Add --output-filename to store calibration to file Andreas Müller
@ 2013-02-05 22:18 ` Andreas Müller
  2013-02-05 22:18 ` [meta-oe-meta-systemd 4/5] pointercal-xinput: remove Andreas Müller
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 16+ messages in thread
From: Andreas Müller @ 2013-02-05 22:18 UTC (permalink / raw)
  To: openembedded-devel

* poll xinput_calibrator to avoid touchscreen not yet detected by xserver
* handling for multiple touch devices prepared by storing device specific
  calibration in ${sysconfdir}/X11/xorg.conf.d/99-<device-name>.conf. By using
  conf files, xserver takes care and no call of xinput is required and the
  rdependency can be removed (tested).
* udev/systemd: plug/play / script is only called for devices with touchscreen
  connected
* fallback for non systemd systems with ${sysconfdir}/xdg/autostart. After
  once stored this fallback also works for display-managers not using
  ${sysconfdir}/xdg/autostart. Since the script is called on every user session,
  it is not called in an extra terminal window to avoid window flickering.
* follow oe-core's systemd switching upon DISTRO_FEATURES
* permanent recalibration for users with sufficient rights

Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
---
 .../99-xf86-xinput-calibrator.rules                |    6 +
 .../xinput-calibrator/xinput-calibrator@.service   |    8 +
 .../xinput_calibrator_pointercal2.sh               |  151 ++++++++++++++++++++
 .../xinput-calibrator/xinput-calibrator_git.bb     |   39 ++++--
 .../xinput-calibrator/xinput-calibrator.service    |   11 --
 .../xinput-calibrator_git.bbappend                 |   10 --
 6 files changed, 195 insertions(+), 30 deletions(-)
 create mode 100644 meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/99-xf86-xinput-calibrator.rules
 create mode 100644 meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/xinput-calibrator@.service
 create mode 100644 meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/xinput_calibrator_pointercal2.sh
 delete mode 100644 meta-systemd/meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/xinput-calibrator.service
 delete mode 100644 meta-systemd/meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bbappend

diff --git a/meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/99-xf86-xinput-calibrator.rules b/meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/99-xf86-xinput-calibrator.rules
new file mode 100644
index 0000000..d25a849
--- /dev/null
+++ b/meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/99-xf86-xinput-calibrator.rules
@@ -0,0 +1,6 @@
+ACTION!="add", GOTO=xinput_calibrator_end
+
+SUBSYSTEM=="input", KERNEL=="event[0-9]*", ATTRS{modalias}=="input:*-e0*,3,*a0,1,*18,*", TAG+="systemd", ENV{SYSTEMD_WANTS}="xinput-calibrator@%k.service"
+SUBSYSTEM=="input", KERNEL=="event[0-9]*", ATTRS{modalias}=="ads7846", TAG+="systemd", ENV{SYSTEMD_WANTS}="xinput-calibrator@%k.service"
+
+LABEL="xinput_calibrator_end"
diff --git a/meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/xinput-calibrator@.service b/meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/xinput-calibrator@.service
new file mode 100644
index 0000000..839d868
--- /dev/null
+++ b/meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/xinput-calibrator@.service
@@ -0,0 +1,8 @@
+[Unit]
+Description=Xinput-calibration for %I
+After=graphical.target
+
+[Service]
+Type=simple
+TimeoutSec=0
+ExecStart=/bin/sh -c "exec /usr/bin/xinput_calibrator_pointercal2.sh %I 1>>/var/log/xinput-calibration.log 2>&1"
diff --git a/meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/xinput_calibrator_pointercal2.sh b/meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/xinput_calibrator_pointercal2.sh
new file mode 100644
index 0000000..0f24ba4
--- /dev/null
+++ b/meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/xinput_calibrator_pointercal2.sh
@@ -0,0 +1,151 @@
+#!/bin/sh
+###############################################################################
+#
+# Script to make the changes permanent. For each device a single configuration
+# is stored in /etc/X11/xorg.conf.d/
+#
+# The first parameter is either
+#   - the the device name in sysfs e.g 'event0' (when called from systemd) - or
+#   - 'xdg-autostart' when called from /etc/xdg/autostart/*.desktop - or
+#   - empty when called for manual recalibration
+#
+# initial version by Andreas Müller <schnitzeltony@googlemail.com>, 2013-02-05
+#
+###############################################################################
+
+
+# Uncomment the following line to reduce log output
+#debug='false &&'
+
+# xserver might not be up yet or has yet not detected touchsreen device yet.
+# To work around we try several times. If xserver+device are not up within
+# <max_try_systemd>seconds something is wrong
+max_try_systemd=30
+
+# xserver might not have detected devices yet. To work around wait for
+# <max_delay_autostart>seconds
+max_delay_autostart=10
+
+
+BINARY='xinput_calibrator'
+CALFILE=
+TOUCHNAME=
+CMDOPTION=
+
+
+set_device_vars() {
+	DEVICEID=`echo $TOUCHNAME | tr -s ' -/\\|\t\n\r' '_'`
+	CALFILE="/etc/X11/xorg.conf.d/99-$DEVICEID.conf"
+	CMDOPTION="--output-filename $CALFILE"
+}
+
+
+extract_next_dev() {
+	DEVICENO="$((DEVICENO+1))"
+	ENDPOS="$((DEVICENO*2))"
+	TOUCHNAME=`echo $DEVICELIST | cut -s -d'"' -f$ENDPOS`
+}
+
+
+if [ x$1 != x ]; then
+	# called by systemd for a specific device - no recalibration
+	if [ x$1 != xxdg-autostart ]; then
+		$debug echo "----- $0 started by systemd for device $1 -----"
+
+		# TBD?: unique ID for multiple touchscreens of same type
+		# TBD?: DISPLAY != default
+		export DISPLAY=:0
+		TOUCHNAME=`cat /sys/class/input/$1/device/name`
+		$debug echo "Device: '$TOUCHNAME'"
+		set_device_vars
+		$debug echo "Checking for stored calibration in $CALFILE"
+		if grep "\"$TOUCHNAME\"" $CALFILE ; then
+			echo "Using calibration data stored in $CALFILE"
+			exit 0
+		fi
+	# called by: /etc/xdg/autostart/*.desktop check all devices - no recalibration
+	else
+		$debug echo "----- $0 started by autostart ----- "
+		$debug echo `date -u` ": delay ${max_delay_autostart}s ..."
+		sleep $max_delay_autostart
+
+		DEVICELIST=`$BINARY --list`
+		$debug $BINARY --list
+		# no devices?
+		if [ "x`echo $DEVICELIST | grep Device`" = "x" ]; then
+			exit 0
+		fi
+		DEVICECOUNT=`$BINARY --list | wc -l`
+		# for multiple devices the first uncalibrated is calibrated (TBD?)
+		DEVICENO=0
+		while [ "$DEVICENO" -ne "$DEVICECOUNT" ]; do
+			extract_next_dev
+			set_device_vars
+			$debug echo "Checking for stored calibration in $CALFILE"
+			if grep "\"$TOUCHNAME\"" $CALFILE ; then
+				$debug echo "Using calibration data stored in $CALFILE"
+				TOUCHNAME=
+			else
+				$debug echo "No calibration data found for '$TOUCHNAME'"
+				break
+			fi
+		done
+		if [ "x$TOUCHNAME" = "x" ]; then
+			echo 'All devices calibrated - exiting.'
+			exit 0
+		fi
+	fi
+# called manual: check all available devices - force recalibration
+else
+	echo "----- $0 started manually -----"
+	echo "auto detect touchscreen devices..."
+	# we are in a terminal so max output below is OK
+	debug=
+	DEVICELIST=`$BINARY --list`
+	$BINARY --list
+	# no devices?
+	if [ "x`echo $DEVICELIST | grep Device`" = "x" ]; then
+		exit 0
+	fi
+	DEVICECOUNT=`$BINARY --list | wc -l`
+	DEVICENO=0
+	# one device
+	if [ "$DEVICECOUNT" -eq "1" ]; then
+		extract_next_dev
+	# multiple devices
+	else
+		echo 'Multiple devices were found. Select the one to calibrate:'
+		while [ "$DEVICENO" -ne "$DEVICECOUNT" ]; do
+			extract_next_dev
+			echo -n "Calibrate '$TOUCHNAME' <y>? "
+			read YESNO
+			if [ "x$YESNO" = "xy" ]; then
+				break
+			else
+				TOUCHNAME=
+			fi
+		done
+		if [ "x$TOUCHNAME" = "x" ]; then
+			echo 'No device selected - exiting without calibration.'
+			exit 0
+		fi
+	fi
+	set_device_vars
+fi
+
+
+# wait for xserver to calibrate
+i=1
+while [ "$i" -ne "$max_try_systemd" ]; do
+	$debug echo `date -u` ": starting calibration"
+	$BINARY --device "$TOUCHNAME" --no-timeout --output-type xorg.conf.d $CMDOPTION
+	if [ $? = 0 ]; then
+		exit 0
+	fi
+	sleep 1
+	i="$((i+1))"
+done
+
+# when reaching here something went wrong
+echo "Could not calibrate '$TOUCHNAME'"
+exit 1
diff --git a/meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bb b/meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bb
index 6781e86..199ee34 100644
--- a/meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bb
+++ b/meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bb
@@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://src/calibrator.cpp;endline=22;md5=1bcba08f67cdb56f340
 DEPENDS = "virtual/libx11 libxi"
 
 PV = "0.7.5+git${SRCPV}"
-PR = "r2"
+PR = "r3"
 
 inherit autotools
 
@@ -19,6 +19,9 @@ SRC_URI = " \
     file://0004-CalibratorUsbtouchscreen-overridde-default-file-name.patch \
     file://0005-Make-all-Calibrator-destructors-virtual-to-fix-warni.patch \
     file://0006-Set-up-buffer-size-for-max-line-length-only-once-in-.patch \
+    file://99-xf86-xinput-calibrator.rules \
+    file://xinput-calibrator@.service \
+    file://xinput_calibrator_pointercal2.sh \
 "
 
 S = "${WORKDIR}/git"
@@ -27,14 +30,32 @@ S = "${WORKDIR}/git"
 EXTRA_OECONF += "--with-gui=x11"
 
 do_install_append() {
-        install -d ${D}${bindir}
-        install -m 0755 scripts/xinput_calibrator_pointercal.sh ${D}${bindir}/xinput_calibrator_once.sh
-
-        install -d ${D}${sysconfdir}/xdg/autostart
-        sed -i -e 's,^Exec=.*,Exec=${bindir}/xinput_calibrator_once.sh,' scripts/xinput_calibrator.desktop
-        install -m 0644 scripts/xinput_calibrator.desktop ${D}${sysconfdir}/xdg/autostart
+	install -d ${D}${bindir}
+	install -m 0755 ${WORKDIR}/xinput_calibrator_pointercal2.sh ${D}${bindir}
+	install -d ${D}/${sysconfdir}/X11/xorg.conf.d
+
+	# use our script to make calibration permanent (sufficiont rights assumed)
+	sed -i 	-e 's,^Exec=.*,Exec=${base_bindir}/sh -c '\''${bindir}/xinput_calibrator_pointercal2.sh; cat'\'',' \
+		${D}${datadir}/applications/xinput_calibrator.desktop
+
+	# udev/systemd start?
+	if ${@base_contains('DISTRO_FEATURES','systemd','true','false',d)}; then
+		install -d ${D}${systemd_unitdir}/system
+		install -m 0644 ${WORKDIR}/xinput-calibrator@.service ${D}${systemd_unitdir}/system
+		install -d ${D}${base_libdir}/udev/rules.d
+		install -m 0644 ${WORKDIR}/99-xf86-xinput-calibrator.rules ${D}${base_libdir}/udev/rules.d
+	# ${sysconfdir}/xdg/autostart?
+	else
+	        install -d ${D}${sysconfdir}/xdg/autostart
+	        install -m 0644 ${D}${datadir}/applications/xinput_calibrator.desktop ${D}${sysconfdir}/xdg/autostart
+		# use our script to make calibration permanent (sufficiont rights assumed) / not in Terminal
+		# /var/log is not accessible for all users so use user's home
+	        sed -i 	-e 's,^Exec=.*,Exec=${base_bindir}/sh -c '\''${bindir}/xinput_calibrator_pointercal2.sh xdg-autostart 1>>$HOME/xinput-calibration.log 2>\&1'\'',' \
+			-e 's,^Terminal=true,Terminal=false,' \
+			${D}${sysconfdir}/xdg/autostart/xinput_calibrator.desktop
+	fi
 }
 
-FILES_${PN} += "${sysconfdir}/xdg/autostart"
-RDEPENDS_${PN} = "xinput xterm"
+FILES_${PN} += "${sysconfdir}/xdg/autostart ${systemd_unitdir}/system"
+RDEPENDS_${PN} = "xterm"
 RRECOMMENDS_${PN} = "pointercal-xinput"
diff --git a/meta-systemd/meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/xinput-calibrator.service b/meta-systemd/meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/xinput-calibrator.service
deleted file mode 100644
index 2301876..0000000
--- a/meta-systemd/meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator/xinput-calibrator.service
+++ /dev/null
@@ -1,11 +0,0 @@
-[Unit]
-Description=Loads xinput calibration data
-ConditionPathExists=/etc/pointercal.xinput
-Requires=display-manager.service
-After=display-manager.service
-
-[Service]
-ExecStart=/usr/bin/xinput_calibrator_once.sh
-
-[Install]
-WantedBy=multi-user.target
diff --git a/meta-systemd/meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bbappend b/meta-systemd/meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bbappend
deleted file mode 100644
index 5bc5bc3..0000000
--- a/meta-systemd/meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bbappend
+++ /dev/null
@@ -1,10 +0,0 @@
-FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
-
-PRINC := "${@int(PRINC) + 2}"
-
-inherit systemd
-
-SRC_URI += "file://xinput-calibrator.service"
-
-SYSTEMD_PACKAGES = "${PN}-systemd"
-SYSTEMD_SERVICE = "${PN}.service"
-- 
1.7.6.5




^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [meta-oe-meta-systemd 4/5] pointercal-xinput: remove
  2013-02-05 22:18 [meta-oe-meta-systemd 0/5] xinput-calibrator rework Andreas Müller
                   ` (2 preceding siblings ...)
  2013-02-05 22:18 ` [meta-oe-meta-systemd 3/5] xinput-calibrator: rework Andreas Müller
@ 2013-02-05 22:18 ` Andreas Müller
  2013-02-06 14:48   ` Martin Jansa
  2013-02-07 10:01   ` Koen Kooi
  2013-02-05 22:18 ` [meta-oe-meta-systemd 5/5] xinput-calibrator: do not RDEPEND xterm Andreas Müller
  2013-02-07 10:06 ` [meta-oe-meta-systemd 0/5] xinput-calibrator rework Koen Kooi
  5 siblings, 2 replies; 16+ messages in thread
From: Andreas Müller @ 2013-02-05 22:18 UTC (permalink / raw)
  To: openembedded-devel

Calibration values are stored now in /etc/xorg.conf.d/99-<device>.conf. After
this is accepted patches to layers appending pointercal-xinput will be send.

Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
---
 .../pointercal-xinput/pointercal.xinput            |    1 -
 .../xinput-calibrator/pointercal-xinput_0.0.bb     |   19 -------------------
 .../xinput-calibrator/xinput-calibrator_git.bb     |    3 +--
 3 files changed, 1 insertions(+), 22 deletions(-)
 delete mode 100644 meta-oe/recipes-graphics/xinput-calibrator/pointercal-xinput/pointercal.xinput
 delete mode 100644 meta-oe/recipes-graphics/xinput-calibrator/pointercal-xinput_0.0.bb

diff --git a/meta-oe/recipes-graphics/xinput-calibrator/pointercal-xinput/pointercal.xinput b/meta-oe/recipes-graphics/xinput-calibrator/pointercal-xinput/pointercal.xinput
deleted file mode 100644
index 9633fc5..0000000
--- a/meta-oe/recipes-graphics/xinput-calibrator/pointercal-xinput/pointercal.xinput
+++ /dev/null
@@ -1 +0,0 @@
-# replace with valid machine specific pointercal.xinput
diff --git a/meta-oe/recipes-graphics/xinput-calibrator/pointercal-xinput_0.0.bb b/meta-oe/recipes-graphics/xinput-calibrator/pointercal-xinput_0.0.bb
deleted file mode 100644
index 9b68d54..0000000
--- a/meta-oe/recipes-graphics/xinput-calibrator/pointercal-xinput_0.0.bb
+++ /dev/null
@@ -1,19 +0,0 @@
-DESCRIPTION = "Touchscreen calibration data from xinput-calibrator"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
-
-PR = "r4"
-
-SRC_URI = "file://pointercal.xinput"
-S = "${WORKDIR}"
-
-do_install() {
-	# Only install file if it has a contents
-	if [ -s ${S}/pointercal.xinput ]; then
-	        install -d ${D}${sysconfdir}/
-	        install -m 0644 ${S}/pointercal.xinput ${D}${sysconfdir}/
-	fi
-}
-
-PACKAGE_ARCH = "${MACHINE_ARCH}"
-CONFFILES_${PN} = "${sysconfdir}/pointercal.xinput"
diff --git a/meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bb b/meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bb
index 199ee34..8ef774b 100644
--- a/meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bb
+++ b/meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bb
@@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://src/calibrator.cpp;endline=22;md5=1bcba08f67cdb56f340
 DEPENDS = "virtual/libx11 libxi"
 
 PV = "0.7.5+git${SRCPV}"
-PR = "r3"
+PR = "r4"
 
 inherit autotools
 
@@ -58,4 +58,3 @@ do_install_append() {
 
 FILES_${PN} += "${sysconfdir}/xdg/autostart ${systemd_unitdir}/system"
 RDEPENDS_${PN} = "xterm"
-RRECOMMENDS_${PN} = "pointercal-xinput"
-- 
1.7.6.5




^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [meta-oe-meta-systemd 5/5] xinput-calibrator: do not RDEPEND xterm
  2013-02-05 22:18 [meta-oe-meta-systemd 0/5] xinput-calibrator rework Andreas Müller
                   ` (3 preceding siblings ...)
  2013-02-05 22:18 ` [meta-oe-meta-systemd 4/5] pointercal-xinput: remove Andreas Müller
@ 2013-02-05 22:18 ` Andreas Müller
  2013-02-07 10:08   ` Koen Kooi
  2013-02-07 10:06 ` [meta-oe-meta-systemd 0/5] xinput-calibrator rework Koen Kooi
  5 siblings, 1 reply; 16+ messages in thread
From: Andreas Müller @ 2013-02-05 22:18 UTC (permalink / raw)
  To: openembedded-devel

This does not break automatic calibration (at first start or plugin of new
device). For manual recalibration we assume a terminal is installed and avoid
multiple terminals for most images.

Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
---
 .../xinput-calibrator/xinput-calibrator_git.bb     |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bb b/meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bb
index 8ef774b..d2c40e2 100644
--- a/meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bb
+++ b/meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bb
@@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://src/calibrator.cpp;endline=22;md5=1bcba08f67cdb56f340
 DEPENDS = "virtual/libx11 libxi"
 
 PV = "0.7.5+git${SRCPV}"
-PR = "r4"
+PR = "r5"
 
 inherit autotools
 
@@ -57,4 +57,3 @@ do_install_append() {
 }
 
 FILES_${PN} += "${sysconfdir}/xdg/autostart ${systemd_unitdir}/system"
-RDEPENDS_${PN} = "xterm"
-- 
1.7.6.5




^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [meta-oe-meta-systemd 4/5] pointercal-xinput: remove
  2013-02-05 22:18 ` [meta-oe-meta-systemd 4/5] pointercal-xinput: remove Andreas Müller
@ 2013-02-06 14:48   ` Martin Jansa
  2013-02-06 15:12     ` Andreas Müller
  2013-02-07 10:01   ` Koen Kooi
  1 sibling, 1 reply; 16+ messages in thread
From: Martin Jansa @ 2013-02-06 14:48 UTC (permalink / raw)
  To: openembedded-devel

[-- Attachment #1: Type: text/plain, Size: 3435 bytes --]

On Tue, Feb 05, 2013 at 11:18:42PM +0100, Andreas Müller wrote:
> Calibration values are stored now in /etc/xorg.conf.d/99-<device>.conf. After

So the plan to replace pointercal-xinput in BSP layers
is to convert pointercal.xinput files to 99-<device>.conf files provided
by xserver-xf86-conf bbappend?

And do you have some script to convert them or do you convert them
manually?

Regards,

> this is accepted patches to layers appending pointercal-xinput will be send.
> 
> Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
> ---
>  .../pointercal-xinput/pointercal.xinput            |    1 -
>  .../xinput-calibrator/pointercal-xinput_0.0.bb     |   19 -------------------
>  .../xinput-calibrator/xinput-calibrator_git.bb     |    3 +--
>  3 files changed, 1 insertions(+), 22 deletions(-)
>  delete mode 100644 meta-oe/recipes-graphics/xinput-calibrator/pointercal-xinput/pointercal.xinput
>  delete mode 100644 meta-oe/recipes-graphics/xinput-calibrator/pointercal-xinput_0.0.bb
> 
> diff --git a/meta-oe/recipes-graphics/xinput-calibrator/pointercal-xinput/pointercal.xinput b/meta-oe/recipes-graphics/xinput-calibrator/pointercal-xinput/pointercal.xinput
> deleted file mode 100644
> index 9633fc5..0000000
> --- a/meta-oe/recipes-graphics/xinput-calibrator/pointercal-xinput/pointercal.xinput
> +++ /dev/null
> @@ -1 +0,0 @@
> -# replace with valid machine specific pointercal.xinput
> diff --git a/meta-oe/recipes-graphics/xinput-calibrator/pointercal-xinput_0.0.bb b/meta-oe/recipes-graphics/xinput-calibrator/pointercal-xinput_0.0.bb
> deleted file mode 100644
> index 9b68d54..0000000
> --- a/meta-oe/recipes-graphics/xinput-calibrator/pointercal-xinput_0.0.bb
> +++ /dev/null
> @@ -1,19 +0,0 @@
> -DESCRIPTION = "Touchscreen calibration data from xinput-calibrator"
> -LICENSE = "MIT"
> -LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
> -
> -PR = "r4"
> -
> -SRC_URI = "file://pointercal.xinput"
> -S = "${WORKDIR}"
> -
> -do_install() {
> -	# Only install file if it has a contents
> -	if [ -s ${S}/pointercal.xinput ]; then
> -	        install -d ${D}${sysconfdir}/
> -	        install -m 0644 ${S}/pointercal.xinput ${D}${sysconfdir}/
> -	fi
> -}
> -
> -PACKAGE_ARCH = "${MACHINE_ARCH}"
> -CONFFILES_${PN} = "${sysconfdir}/pointercal.xinput"
> diff --git a/meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bb b/meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bb
> index 199ee34..8ef774b 100644
> --- a/meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bb
> +++ b/meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bb
> @@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://src/calibrator.cpp;endline=22;md5=1bcba08f67cdb56f340
>  DEPENDS = "virtual/libx11 libxi"
>  
>  PV = "0.7.5+git${SRCPV}"
> -PR = "r3"
> +PR = "r4"
>  
>  inherit autotools
>  
> @@ -58,4 +58,3 @@ do_install_append() {
>  
>  FILES_${PN} += "${sysconfdir}/xdg/autostart ${systemd_unitdir}/system"
>  RDEPENDS_${PN} = "xterm"
> -RRECOMMENDS_${PN} = "pointercal-xinput"
> -- 
> 1.7.6.5
> 
> 
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [meta-oe-meta-systemd 4/5] pointercal-xinput: remove
  2013-02-06 14:48   ` Martin Jansa
@ 2013-02-06 15:12     ` Andreas Müller
  2013-02-06 15:25       ` Martin Jansa
  0 siblings, 1 reply; 16+ messages in thread
From: Andreas Müller @ 2013-02-06 15:12 UTC (permalink / raw)
  To: openembedded-devel

On Wed, Feb 6, 2013 at 3:48 PM, Martin Jansa <martin.jansa@gmail.com> wrote:
> On Tue, Feb 05, 2013 at 11:18:42PM +0100, Andreas Müller wrote:
>> Calibration values are stored now in /etc/xorg.conf.d/99-<device>.conf. After
>
> So the plan to replace pointercal-xinput in BSP layers
> is to convert pointercal.xinput files to 99-<device>.conf files provided
> by xserver-xf86-conf bbappend?
I would have appended it to xinput-calibrator because that's where the
configuration files are used. I can put them also to xserver-xf86-conf
bbappend - have no strong opinion here.
>
> And do you have some script to convert them or do you convert them
> manually?
>
I wanted to convert them manually but a script is more reliable - will
do that next week.

Andreas



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [meta-oe-meta-systemd 4/5] pointercal-xinput: remove
  2013-02-06 15:12     ` Andreas Müller
@ 2013-02-06 15:25       ` Martin Jansa
  2013-02-06 15:45         ` Andreas Müller
  0 siblings, 1 reply; 16+ messages in thread
From: Martin Jansa @ 2013-02-06 15:25 UTC (permalink / raw)
  To: openembedded-devel

[-- Attachment #1: Type: text/plain, Size: 1437 bytes --]

On Wed, Feb 06, 2013 at 04:12:50PM +0100, Andreas Müller wrote:
> On Wed, Feb 6, 2013 at 3:48 PM, Martin Jansa <martin.jansa@gmail.com> wrote:
> > On Tue, Feb 05, 2013 at 11:18:42PM +0100, Andreas Müller wrote:
> >> Calibration values are stored now in /etc/xorg.conf.d/99-<device>.conf. After
> >
> > So the plan to replace pointercal-xinput in BSP layers
> > is to convert pointercal.xinput files to 99-<device>.conf files provided
> > by xserver-xf86-conf bbappend?
> I would have appended it to xinput-calibrator because that's where the
> configuration files are used. I can put them also to xserver-xf86-conf
> bbappend - have no strong opinion here.

xinput-calibrator does not need to be MACHINE_ARCH, that's why they were
in separate pointercal-xinput before.

xserver-xf86-config on other hand is usually MACHINE_ARCH so it would be
better to add them there.

Or create new recipe for them and RDEPEND it from xinput-calibrator...

> > And do you have some script to convert them or do you convert them
> > manually?
> >
> I wanted to convert them manually but a script is more reliable - will
> do that next week.
> 
> Andreas
> 
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [meta-oe-meta-systemd 4/5] pointercal-xinput: remove
  2013-02-06 15:25       ` Martin Jansa
@ 2013-02-06 15:45         ` Andreas Müller
  0 siblings, 0 replies; 16+ messages in thread
From: Andreas Müller @ 2013-02-06 15:45 UTC (permalink / raw)
  To: openembedded-devel

On Wed, Feb 6, 2013 at 4:25 PM, Martin Jansa <martin.jansa@gmail.com> wrote:
> On Wed, Feb 06, 2013 at 04:12:50PM +0100, Andreas Müller wrote:
>> On Wed, Feb 6, 2013 at 3:48 PM, Martin Jansa <martin.jansa@gmail.com> wrote:
>> > On Tue, Feb 05, 2013 at 11:18:42PM +0100, Andreas Müller wrote:
>> >> Calibration values are stored now in /etc/xorg.conf.d/99-<device>.conf. After
>> >
>> > So the plan to replace pointercal-xinput in BSP layers
>> > is to convert pointercal.xinput files to 99-<device>.conf files provided
>> > by xserver-xf86-conf bbappend?
>> I would have appended it to xinput-calibrator because that's where the
>> configuration files are used. I can put them also to xserver-xf86-conf
>> bbappend - have no strong opinion here.
>
> xinput-calibrator does not need to be MACHINE_ARCH, that's why they were
> in separate pointercal-xinput before.
>
> xserver-xf86-config on other hand is usually MACHINE_ARCH so it would be
> better to add them there.
>
> Or create new recipe for them and RDEPEND it from xinput-calibrator...
Or don't remove pointercal-xinput :)

Andreas



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [meta-oe-meta-systemd 4/5] pointercal-xinput: remove
  2013-02-05 22:18 ` [meta-oe-meta-systemd 4/5] pointercal-xinput: remove Andreas Müller
  2013-02-06 14:48   ` Martin Jansa
@ 2013-02-07 10:01   ` Koen Kooi
  2013-02-08 22:11     ` Andreas Müller
  1 sibling, 1 reply; 16+ messages in thread
From: Koen Kooi @ 2013-02-07 10:01 UTC (permalink / raw)
  To: openembedded-devel

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Op 05-02-13 23:18, Andreas Müller schreef:
> Calibration values are stored now in /etc/xorg.conf.d/99-<device>.conf.
> After this is accepted patches to layers appending pointercal-xinput will
> be send.

How does this work with board where you can plug in different touchscreen
(like beaglebone) or difference touchscreen controllers (beagleboard, olimex
allwinner boards, etc)?

regards,

Koen

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
Comment: GPGTools - http://gpgtools.org

iD8DBQFRE3tvMkyGM64RGpERAiSbAJ9lhIi1jSmhhM9UIePDIzICyQlTLQCfWgyi
oh3uluQd0wpW/61WheXTrz4=
=FYL8
-----END PGP SIGNATURE-----




^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [meta-oe-meta-systemd 0/5] xinput-calibrator rework
  2013-02-05 22:18 [meta-oe-meta-systemd 0/5] xinput-calibrator rework Andreas Müller
                   ` (4 preceding siblings ...)
  2013-02-05 22:18 ` [meta-oe-meta-systemd 5/5] xinput-calibrator: do not RDEPEND xterm Andreas Müller
@ 2013-02-07 10:06 ` Koen Kooi
  2013-02-08 22:10   ` Andreas Müller
  5 siblings, 1 reply; 16+ messages in thread
From: Koen Kooi @ 2013-02-07 10:06 UTC (permalink / raw)
  To: openembedded-devel

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Op 05-02-13 23:18, Andreas Müller schreef:
> * Implemented are 3 modes of invocation: 1. udev/systemd 2.
> /etc/xdg/autostart 3. manual 1/2 are selected upon DISTRO_FEATURES
> containing systemd or not
> 
> * The calibration is stored in
> /etc/X11/xorg.conf.d/99-<name-of-touchscreen>.conf Herby support for
> multiple touchsceen devices is prepared.
> 
> * The script detects upon parameter information how it was called and
> waits for xserver to come up / detect connected touchsceen devices. If no
> matching calibration file is found, the xinput_calibrator is called for
> this device. For systemd invocation the default display is choosen.
> 
> * For manual invocation and multiple touchscreen devices attached, the
> operator can select which device to calibrate interactively.
> 
> * Multiple touchscreen support is prepared - the following open issues
> are known: * Multiple touchscreens with same device name will get same
> calibration values. An unique device identifier could not be found yet. *
> systemd startup with multiple device cause multiple instances of 
> xinput_calibrator being started without information for which device the
> calibration is performed.
> 
> * Many many tests were performed: 2 automatic invocation types * (1st +
> 2nd startup) * (0, 1, 2 touchscreens)
> 
> * Other layers need alignment for pointercal removement. If accepted I
> can take care (this is NOT an extortion :)

At FOSDEM I found out that the Tias wearing the FOSDEM organization hoodie
is actually the same Tias who maintains xinput-calibrator. Long story short:
we should send all out patches upstream and he'll have a look at them. He is
a big fan of the xorg conf snippet that this patchset introduces.
In the long term I think we'll need to see how well the 'tagging' of the
evdev itself with the calibration value is working. I looked at it a few
years ago and it didn't work for our usecases, but that might have changed.
THat should make non-X apps work as well (e.g. QT/e).

regards,

Koen
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
Comment: GPGTools - http://gpgtools.org

iD8DBQFRE3y1MkyGM64RGpERAnfeAKC7FF+MGpDJXCr3hZ9f4HHbQUi3YgCgrrmZ
5UqAi0nnN/7uZ2X0v2x6acU=
=iaR5
-----END PGP SIGNATURE-----




^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [meta-oe-meta-systemd 5/5] xinput-calibrator: do not RDEPEND xterm
  2013-02-05 22:18 ` [meta-oe-meta-systemd 5/5] xinput-calibrator: do not RDEPEND xterm Andreas Müller
@ 2013-02-07 10:08   ` Koen Kooi
  0 siblings, 0 replies; 16+ messages in thread
From: Koen Kooi @ 2013-02-07 10:08 UTC (permalink / raw)
  To: openembedded-devel

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Op 05-02-13 23:18, Andreas Müller schreef:
> This does not break automatic calibration (at first start or plugin of
> new device). For manual recalibration we assume a terminal is installed
> and avoid multiple terminals for most images.

I ran into this a while ago, if you use GNOME, it will use xdg-utils to
launch the terminal, which wasn't installed in my system. I'm not sure where
I'd need to add the xdg-utils RDEPENDS to make it all work properly, any
suggestions?



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
Comment: GPGTools - http://gpgtools.org

iD8DBQFRE30UMkyGM64RGpERAqH/AJwOoKZTDX7el9o022dYnnETU5mUKACdFJ0X
HbT3Dk3QSbUzt4AoxskglvQ=
=aBd+
-----END PGP SIGNATURE-----




^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [meta-oe-meta-systemd 0/5] xinput-calibrator rework
  2013-02-07 10:06 ` [meta-oe-meta-systemd 0/5] xinput-calibrator rework Koen Kooi
@ 2013-02-08 22:10   ` Andreas Müller
  2013-02-14  9:41     ` Andreas Müller
  0 siblings, 1 reply; 16+ messages in thread
From: Andreas Müller @ 2013-02-08 22:10 UTC (permalink / raw)
  To: openembedded-devel

On Thu, Feb 7, 2013 at 11:06 AM, Koen Kooi <koen@dominion.thruhere.net> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Op 05-02-13 23:18, Andreas Müller schreef:
>> * Implemented are 3 modes of invocation: 1. udev/systemd 2.
>> /etc/xdg/autostart 3. manual 1/2 are selected upon DISTRO_FEATURES
>> containing systemd or not
>>
>> * The calibration is stored in
>> /etc/X11/xorg.conf.d/99-<name-of-touchscreen>.conf Herby support for
>> multiple touchsceen devices is prepared.
>>
>> * The script detects upon parameter information how it was called and
>> waits for xserver to come up / detect connected touchsceen devices. If no
>> matching calibration file is found, the xinput_calibrator is called for
>> this device. For systemd invocation the default display is choosen.
>>
>> * For manual invocation and multiple touchscreen devices attached, the
>> operator can select which device to calibrate interactively.
>>
>> * Multiple touchscreen support is prepared - the following open issues
>> are known: * Multiple touchscreens with same device name will get same
>> calibration values. An unique device identifier could not be found yet. *
>> systemd startup with multiple device cause multiple instances of
>> xinput_calibrator being started without information for which device the
>> calibration is performed.
>>
>> * Many many tests were performed: 2 automatic invocation types * (1st +
>> 2nd startup) * (0, 1, 2 touchscreens)
>>
>> * Other layers need alignment for pointercal removement. If accepted I
>> can take care (this is NOT an extortion :)
>
> At FOSDEM I found out that the Tias wearing the FOSDEM organization hoodie
> is actually the same Tias who maintains xinput-calibrator. Long story short:
> we should send all out patches upstream and he'll have a look at them. He is
> a big fan of the xorg conf snippet that this patchset introduces.
I will append the script/udev-rule/systemd service to the patchset.
With the systemd/udev stuff I would like to wait a bit until our users
have collected experience. After sending this series I saw that on
some images at first start xinput-calibrator is hidden by the greeter
application of dm. Up to now I did not yet find a good way to have
xinput_calibrator 'always on top'.

Andreas



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [meta-oe-meta-systemd 4/5] pointercal-xinput: remove
  2013-02-07 10:01   ` Koen Kooi
@ 2013-02-08 22:11     ` Andreas Müller
  0 siblings, 0 replies; 16+ messages in thread
From: Andreas Müller @ 2013-02-08 22:11 UTC (permalink / raw)
  To: openembedded-devel

On Thu, Feb 7, 2013 at 11:01 AM, Koen Kooi <koen@dominion.thruhere.net> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Op 05-02-13 23:18, Andreas Müller schreef:
>> Calibration values are stored now in /etc/xorg.conf.d/99-<device>.conf.
>> After this is accepted patches to layers appending pointercal-xinput will
>> be send.
>
> How does this work with board where you can plug in different touchscreen
> (like beaglebone) or difference touchscreen controllers (beagleboard, olimex
> allwinner boards, etc)?
>
Each device gets an conf-file named by the name of the device. An
example file I took from my gumstix:

Section "InputClass"
	Identifier	"calibration"
	MatchProduct	"ADS7846 Touchscreen"
	Option	"Calibration"	"96 3935 3591 98"
	Option	"SwapAxes"	"0"
EndSection

For devices with different name it works fine. I have no solution yet
for connecting multiple touchscreen devices of same device name -
similar to your use-case connecting different touchscreens on same
controller. There a manual recalibration has to be started which now
stores the data persistent (if the operator has the right to write to
/etc/X11/xorg.conf.d).

Andreas



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [meta-oe-meta-systemd 0/5] xinput-calibrator rework
  2013-02-08 22:10   ` Andreas Müller
@ 2013-02-14  9:41     ` Andreas Müller
  0 siblings, 0 replies; 16+ messages in thread
From: Andreas Müller @ 2013-02-14  9:41 UTC (permalink / raw)
  To: openembedded-devel; +Cc: koen, tias

On Fri, Feb 8, 2013 at 11:10 PM, Andreas Müller
<schnitzeltony@googlemail.com> wrote:
> On Thu, Feb 7, 2013 at 11:06 AM, Koen Kooi <koen@dominion.thruhere.net> wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> Op 05-02-13 23:18, Andreas Müller schreef:
>>> * Implemented are 3 modes of invocation: 1. udev/systemd 2.
>>> /etc/xdg/autostart 3. manual 1/2 are selected upon DISTRO_FEATURES
>>> containing systemd or not
>>>
>>> * The calibration is stored in
>>> /etc/X11/xorg.conf.d/99-<name-of-touchscreen>.conf Herby support for
>>> multiple touchsceen devices is prepared.
>>>
>>> * The script detects upon parameter information how it was called and
>>> waits for xserver to come up / detect connected touchsceen devices. If no
>>> matching calibration file is found, the xinput_calibrator is called for
>>> this device. For systemd invocation the default display is choosen.
>>>
>>> * For manual invocation and multiple touchscreen devices attached, the
>>> operator can select which device to calibrate interactively.
>>>
>>> * Multiple touchscreen support is prepared - the following open issues
>>> are known: * Multiple touchscreens with same device name will get same
>>> calibration values. An unique device identifier could not be found yet. *
>>> systemd startup with multiple device cause multiple instances of
>>> xinput_calibrator being started without information for which device the
>>> calibration is performed.
>>>
>>> * Many many tests were performed: 2 automatic invocation types * (1st +
>>> 2nd startup) * (0, 1, 2 touchscreens)
>>>
>>> * Other layers need alignment for pointercal removement. If accepted I
>>> can take care (this is NOT an extortion :)
>>
>> At FOSDEM I found out that the Tias wearing the FOSDEM organization hoodie
>> is actually the same Tias who maintains xinput-calibrator. Long story short:
>> we should send all out patches upstream and he'll have a look at them. He is
>> a big fan of the xorg conf snippet that this patchset introduces.
> I will append the script/udev-rule/systemd service to the patchset.
> With the systemd/udev stuff I would like to wait a bit until our users
> have collected experience. After sending this series I saw that on
> some images at first start xinput-calibrator is hidden by the greeter
> application of dm. Up to now I did not yet find a good way to have
> xinput_calibrator 'always on top'.
>
> Andreas
After using this solution for a while I see the following issues:

1. User rights: Currently only users with write permission on
/etc/X11/xorg.conf.d/ can make the calibration permanent. This can be
avoided by a single calibration file for all devices which is owned by
a new group 'touchcal'. Nice side effect: A single file reduces the
modifications on pointercal-xinput (for shipping default calibration
values).
2. udev/systemd invocation: On some of my images the display manager's
greeter starts after touchscreen_calibration and thereby hides it.
Since systemd cannot help me here, I think about a workaround like
this: If xinput_calibrator detects that it loses focus, it pushes
itself back to top. To avoid dead-loops in case the other application
follows same strategy the maximum number of regaining the focus is
limited to e.g 3.
3. Multiple instances of devices with same device-name / different
touch devices on same controller: Have no idea how to give X this
additional information.

My suggestion:

I will rework for 1+2. This leads to a much better solution than we
have currently. For 3 I am open on suggestions.

Andreas



^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2013-02-14  9:57 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-05 22:18 [meta-oe-meta-systemd 0/5] xinput-calibrator rework Andreas Müller
2013-02-05 22:18 ` [meta-oe-meta-systemd 1/5] xinput-calibrator: update to latest git commit Andreas Müller
2013-02-05 22:18 ` [meta-oe-meta-systemd 2/5] xinput-calibrator: Add --output-filename to store calibration to file Andreas Müller
2013-02-05 22:18 ` [meta-oe-meta-systemd 3/5] xinput-calibrator: rework Andreas Müller
2013-02-05 22:18 ` [meta-oe-meta-systemd 4/5] pointercal-xinput: remove Andreas Müller
2013-02-06 14:48   ` Martin Jansa
2013-02-06 15:12     ` Andreas Müller
2013-02-06 15:25       ` Martin Jansa
2013-02-06 15:45         ` Andreas Müller
2013-02-07 10:01   ` Koen Kooi
2013-02-08 22:11     ` Andreas Müller
2013-02-05 22:18 ` [meta-oe-meta-systemd 5/5] xinput-calibrator: do not RDEPEND xterm Andreas Müller
2013-02-07 10:08   ` Koen Kooi
2013-02-07 10:06 ` [meta-oe-meta-systemd 0/5] xinput-calibrator rework Koen Kooi
2013-02-08 22:10   ` Andreas Müller
2013-02-14  9:41     ` Andreas Müller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.