Patchwork [meta-oe-meta-systemd,0/5] xinput-calibrator rework

login
register
mail settings
Submitter Andreas Müller
Date Feb. 5, 2013, 10:18 p.m.
Message ID <1360102723-27891-1-git-send-email-schnitzeltony@googlemail.com>
Download mbox
Permalink /patch/44153/
State Not Applicable, archived
Headers show

Pull-request

git://gitorious.org/schnitzeltony-oe-meta/meta-openembedded.git xinput-calibrator

Comments

Andreas Müller - Feb. 5, 2013, 10:18 p.m.
* 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
Koen Kooi - Feb. 7, 2013, 10:06 a.m.
-----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-----
Andreas Müller - Feb. 8, 2013, 10:10 p.m.
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
Andreas Müller - Feb. 14, 2013, 9:41 a.m.
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