Re: [PATCH weston 00/25] A new touchscreen calibrator

2018-04-04 Thread Matt Hoosier
On Wed, Apr 4, 2018 at 2:27 AM, Pekka Paalanen  wrote:

> On Wed, 04 Apr 2018 00:37:58 +
> Matt Hoosier  wrote:
>
> > On Tue, Apr 3, 2018, 08:10 Matt Hoosier  wrote:
> >
> > > On Tue, Apr 3, 2018 at 5:35 AM, Philipp Kerling 
> > > wrote:
> > >
> > >> > Do you happen to know of a good readymade program that fakes the
> > >> > presence of a touch input device with uinput? I'd love to test this
> > >> > series, but current Weston is far ahead of what my embedded devices
> > >> > will do; so I'm in the position of mostly relying on the desktop for
> > >> > testing.
> > >> I'm not sure whether it fits your use case, but you can give mtemu a
> > >> spin.
> > >>
> > > https://gitlab.com/shul/mtemu
> > >
> > >
> > > Thanks. That looks like a really useful program. As it turns out, I
> ended
> > > up being able to find some real touch hardware to use. It was ancient
> stuff
> > > that required writing a uinput program to translate the old
> ABS_X/Y-style
> > > input into modern mtdev representation, but it eventually worked.
> > >
> > > The calibration functionality in Pekka's patch series seems to work for
> > > me. I didn't test out any of the mechanism to spawn an auxiliary
> program
> > > that saves the results to disk, but the hot-installed copy of the
> > > calibration worked.
> > >
> > > I did have a little trouble understanding how I can pick-and-choose
> from
> > > the client side which touch device should be associated with which
> output.
> > > The new weston-touch-calibrator program just prints out a flat list of
> > > input devices and head names, but doesn't seem to let you do
> permutations
> > > of that.
> > >
> > > So I ended up having to use a 'mode=off' directive in weston.ini to
> > > temporarily turn off the main display of my laptop so that the
> touchscreen
> > > got pegged to the correct physical output. I have the feeling that I
> just
> > > overlooked some aspect of configuration about this.
> > >
> >
> > ... which is of course the statically set UDev properties that associate
> an
> > input device with the Wayland output. Nevermind about this question.
>
> Indeed. There is no runtime way to change the touchscreen/output
> associations in Weston, it picks it up from the udev properties on the
> touch device. Other DEs may have their ways, but I considered it out of
> scope for this protocol extension.
>
> Thank you for testing! I wonder if I can out your Tested-by tag in all
> the patches, or maybe some specific patch... like the "clients: add a
> new touchscreen calibrator"?
>

Sure. Let's say that all the patches in this series except "doc: add
example calibration-helper script" are:

Tested-by: Matt Hoosier 

You're welcome to apply the my T-B to the final patch too, but since it's
only documentation, I'm not sure the testing is very relevant there.


>
>
> Thanks,
> pq
>
___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel


Re: [PATCH weston 00/25] A new touchscreen calibrator

2018-04-03 Thread Peter Hutterer
On Tue, Apr 03, 2018 at 12:20:08PM +0300, Pekka Paalanen wrote:
> On Mon, 02 Apr 2018 13:11:24 +
> Matt Hoosier  wrote:
> 
> > Do you happen to know of a good readymade program that fakes the presence
> > of a touch input device with uinput? I'd love to test this series, but
> > current Weston is far ahead of what my embedded devices will do; so I'm in
> > the position of mostly relying on the desktop for testing.
> 
> Hi Matt,
> 
> sorry, I have no knowledge of such tool, and the lack of it has
> prevented me from testing things before as well.
> 
> Right now I have two borrowed touchscreens to work with, but I need to
> send them back one day.


$ cat /etc/udev/rules.d/99-touchpads-are-touchscreens.rules
ACTION!="add|change", GOTO="_end"
ENV{ID_INPUT_TOUCHPAD}=="1", ENV{ID_INPUT_TOUCHPAD}="", 
ENV{ID_INPUT_TOUCHSCREEN}="1"
LABEL="_end"

This turns your touchpad into a touchscreen, should be good enough for
testing. Afterwards, reboot or run

sudo udevadm test /sys/class/input/event17
sudo udevadm test /sys/class/input/event17/device

with your event node. Note that you need both the event node and the parent
input device to avoid both flags being set.

Cheers,
   Peter

___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel


Re: [PATCH weston 00/25] A new touchscreen calibrator

2018-04-03 Thread Matt Hoosier
On Tue, Apr 3, 2018, 08:10 Matt Hoosier  wrote:

> On Tue, Apr 3, 2018 at 5:35 AM, Philipp Kerling 
> wrote:
>
>> > Do you happen to know of a good readymade program that fakes the
>> > presence of a touch input device with uinput? I'd love to test this
>> > series, but current Weston is far ahead of what my embedded devices
>> > will do; so I'm in the position of mostly relying on the desktop for
>> > testing.
>> I'm not sure whether it fits your use case, but you can give mtemu a
>> spin.
>>
> https://gitlab.com/shul/mtemu
>
>
> Thanks. That looks like a really useful program. As it turns out, I ended
> up being able to find some real touch hardware to use. It was ancient stuff
> that required writing a uinput program to translate the old ABS_X/Y-style
> input into modern mtdev representation, but it eventually worked.
>
> The calibration functionality in Pekka's patch series seems to work for
> me. I didn't test out any of the mechanism to spawn an auxiliary program
> that saves the results to disk, but the hot-installed copy of the
> calibration worked.
>
> I did have a little trouble understanding how I can pick-and-choose from
> the client side which touch device should be associated with which output.
> The new weston-touch-calibrator program just prints out a flat list of
> input devices and head names, but doesn't seem to let you do permutations
> of that.
>
> So I ended up having to use a 'mode=off' directive in weston.ini to
> temporarily turn off the main display of my laptop so that the touchscreen
> got pegged to the correct physical output. I have the feeling that I just
> overlooked some aspect of configuration about this.
>

... which is of course the statically set UDev properties that associate an
input device with the Wayland output. Nevermind about this question.


> -Matt
>
>
>>
>>
>>
>> > On Fri, Mar 23, 2018, 09:38 Matt Hoosier 
>> > wrote:
>> > > On Fri, Mar 23, 2018 at 9:30 AM, Pekka Paalanen > > > m> wrote:
>> > > > On Fri, 23 Mar 2018 08:46:46 -0500
>> > > > Matt Hoosier  wrote:
>> > > >
>> > > >> I am very much in favor of the overall approach on this patch
>> > > series.
>> > > >> I've experienced every single one of the problems described in
>> > > this
>> > > >> summary, and my company currently resorts to maintaining a hacky
>> > > >> out-of-tree calibration tool to paper over these problems.
>> > > >
>> > > > Hi Matt,
>> > > >
>> > > > that is very heartwarming to hear. Is your tool specifically for
>> > > Weston
>> > > > too?
>> > >
>> > > Yes and no. It's not phrased as a patch against the Weston source
>> > > code, but it uses heuristics for determining which output the raw
>> > > /dev/input/* events should be correlated against, and those
>> > > heuristics
>> > > probably would fail if some different compositor happened to be
>> > > running.
>> > >
>> > > >
>> > > > I would be very happy if this proposal fits your needs, and
>> > > certainly
>> > > > interested in hearing where it falls short.
>> > > >
>> > > >
>> > > > Thanks,
>> > > > pq
>> > > >
>> > > >> On Fri, Mar 23, 2018 at 7:00 AM, Pekka Paalanen > > > .com> wrote:
>> > > >> > From: Pekka Paalanen 
>> > > >> >
>> > > >> > Hi all,
>> > > >> >
>> > > >> > the existing touchscreen calibrator in Weston has several
>> > > problems. This
>> > > >> > proposal intends to solve them all by introducing a new
>> > > protocol
>> > > >> > extension for touchscreen calibration and a new calibrator
>> > > tool.
>> > > >> >
>> > > >> > The benefits of the new tool, which the old tool lacks, are:
>> > > >> >
>> > > >> > - You can unambiguously pick a physical touch device to
>> > > calibrate.
>> > > >> >
>> > > >> > - You can be sure your touch events come only from that
>> > > particular
>> > > >> >   device, and that you cannot miss touch events even if the
>> > > current
>> > > >> >   calibration is horribly wrong.
>> > > >> >
>> > > >> > - You can be sure the calibration window (pattern) is shown on
>> > > the right
>> > > >> >   output with the right coordinates.
>> > > >> >
>> > > >> > - You can unambiguously calibrate even multiple touchscreens
>> > > that are
>> > > >> >   all cloned (showing the same image).
>> > > >> >
>> > > >> > - You get a libinput style calibation matrix instead of the
>> > > >> >   WL_CALIBRATION format which depends on output resolution.
>> > > >> >
>> > > >> > - You can load a new calibration into the compositor without
>> > > playing
>> > > >> >   tricks with udev or restarting the compositor.
>> > > >> >
>> > > >> > There is more discussion about the topic at:
>> > > >> > https://phabricator.freedesktop.org/T7868
>> > > >> >
>> > > >> > This patch series depends on the clone mode series:
>> > > >> > https://patchwork.freedesktop.org/series/32898/
>> > > >> >
>> > > >> > There is a full branch available at:
>> > > >> > 

Re: [PATCH weston 00/25] A new touchscreen calibrator

2018-04-03 Thread Matt Hoosier
On Tue, Apr 3, 2018 at 5:35 AM, Philipp Kerling  wrote:

> > Do you happen to know of a good readymade program that fakes the
> > presence of a touch input device with uinput? I'd love to test this
> > series, but current Weston is far ahead of what my embedded devices
> > will do; so I'm in the position of mostly relying on the desktop for
> > testing.
> I'm not sure whether it fits your use case, but you can give mtemu a
> spin.
>
https://gitlab.com/shul/mtemu


Thanks. That looks like a really useful program. As it turns out, I ended
up being able to find some real touch hardware to use. It was ancient stuff
that required writing a uinput program to translate the old ABS_X/Y-style
input into modern mtdev representation, but it eventually worked.

The calibration functionality in Pekka's patch series seems to work for me.
I didn't test out any of the mechanism to spawn an auxiliary program that
saves the results to disk, but the hot-installed copy of the calibration
worked.

I did have a little trouble understanding how I can pick-and-choose from
the client side which touch device should be associated with which output.
The new weston-touch-calibrator program just prints out a flat list of
input devices and head names, but doesn't seem to let you do permutations
of that.

So I ended up having to use a 'mode=off' directive in weston.ini to
temporarily turn off the main display of my laptop so that the touchscreen
got pegged to the correct physical output. I have the feeling that I just
overlooked some aspect of configuration about this.

-Matt


>
>
>
> > On Fri, Mar 23, 2018, 09:38 Matt Hoosier 
> > wrote:
> > > On Fri, Mar 23, 2018 at 9:30 AM, Pekka Paalanen  > > m> wrote:
> > > > On Fri, 23 Mar 2018 08:46:46 -0500
> > > > Matt Hoosier  wrote:
> > > >
> > > >> I am very much in favor of the overall approach on this patch
> > > series.
> > > >> I've experienced every single one of the problems described in
> > > this
> > > >> summary, and my company currently resorts to maintaining a hacky
> > > >> out-of-tree calibration tool to paper over these problems.
> > > >
> > > > Hi Matt,
> > > >
> > > > that is very heartwarming to hear. Is your tool specifically for
> > > Weston
> > > > too?
> > >
> > > Yes and no. It's not phrased as a patch against the Weston source
> > > code, but it uses heuristics for determining which output the raw
> > > /dev/input/* events should be correlated against, and those
> > > heuristics
> > > probably would fail if some different compositor happened to be
> > > running.
> > >
> > > >
> > > > I would be very happy if this proposal fits your needs, and
> > > certainly
> > > > interested in hearing where it falls short.
> > > >
> > > >
> > > > Thanks,
> > > > pq
> > > >
> > > >> On Fri, Mar 23, 2018 at 7:00 AM, Pekka Paalanen  > > .com> wrote:
> > > >> > From: Pekka Paalanen 
> > > >> >
> > > >> > Hi all,
> > > >> >
> > > >> > the existing touchscreen calibrator in Weston has several
> > > problems. This
> > > >> > proposal intends to solve them all by introducing a new
> > > protocol
> > > >> > extension for touchscreen calibration and a new calibrator
> > > tool.
> > > >> >
> > > >> > The benefits of the new tool, which the old tool lacks, are:
> > > >> >
> > > >> > - You can unambiguously pick a physical touch device to
> > > calibrate.
> > > >> >
> > > >> > - You can be sure your touch events come only from that
> > > particular
> > > >> >   device, and that you cannot miss touch events even if the
> > > current
> > > >> >   calibration is horribly wrong.
> > > >> >
> > > >> > - You can be sure the calibration window (pattern) is shown on
> > > the right
> > > >> >   output with the right coordinates.
> > > >> >
> > > >> > - You can unambiguously calibrate even multiple touchscreens
> > > that are
> > > >> >   all cloned (showing the same image).
> > > >> >
> > > >> > - You get a libinput style calibation matrix instead of the
> > > >> >   WL_CALIBRATION format which depends on output resolution.
> > > >> >
> > > >> > - You can load a new calibration into the compositor without
> > > playing
> > > >> >   tricks with udev or restarting the compositor.
> > > >> >
> > > >> > There is more discussion about the topic at:
> > > >> > https://phabricator.freedesktop.org/T7868
> > > >> >
> > > >> > This patch series depends on the clone mode series:
> > > >> > https://patchwork.freedesktop.org/series/32898/
> > > >> >
> > > >> > There is a full branch available at:
> > > >> > https://gitlab.collabora.com/pq/weston/commits/touchcalib-1
> > > >
> >
> > ___
> > wayland-devel mailing list
> > wayland-devel@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/wayland-devel
>
___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org

Re: [PATCH weston 00/25] A new touchscreen calibrator

2018-04-03 Thread Philipp Kerling
> Do you happen to know of a good readymade program that fakes the
> presence of a touch input device with uinput? I'd love to test this
> series, but current Weston is far ahead of what my embedded devices
> will do; so I'm in the position of mostly relying on the desktop for
> testing. 
I'm not sure whether it fits your use case, but you can give mtemu a
spin.

https://gitlab.com/shul/mtemu


> On Fri, Mar 23, 2018, 09:38 Matt Hoosier 
> wrote:
> > On Fri, Mar 23, 2018 at 9:30 AM, Pekka Paalanen  > m> wrote:
> > > On Fri, 23 Mar 2018 08:46:46 -0500
> > > Matt Hoosier  wrote:
> > >
> > >> I am very much in favor of the overall approach on this patch
> > series.
> > >> I've experienced every single one of the problems described in
> > this
> > >> summary, and my company currently resorts to maintaining a hacky
> > >> out-of-tree calibration tool to paper over these problems.
> > >
> > > Hi Matt,
> > >
> > > that is very heartwarming to hear. Is your tool specifically for
> > Weston
> > > too?
> > 
> > Yes and no. It's not phrased as a patch against the Weston source
> > code, but it uses heuristics for determining which output the raw
> > /dev/input/* events should be correlated against, and those
> > heuristics
> > probably would fail if some different compositor happened to be
> > running.
> > 
> > >
> > > I would be very happy if this proposal fits your needs, and
> > certainly
> > > interested in hearing where it falls short.
> > >
> > >
> > > Thanks,
> > > pq
> > >
> > >> On Fri, Mar 23, 2018 at 7:00 AM, Pekka Paalanen  > .com> wrote:
> > >> > From: Pekka Paalanen 
> > >> >
> > >> > Hi all,
> > >> >
> > >> > the existing touchscreen calibrator in Weston has several
> > problems. This
> > >> > proposal intends to solve them all by introducing a new
> > protocol
> > >> > extension for touchscreen calibration and a new calibrator
> > tool.
> > >> >
> > >> > The benefits of the new tool, which the old tool lacks, are:
> > >> >
> > >> > - You can unambiguously pick a physical touch device to
> > calibrate.
> > >> >
> > >> > - You can be sure your touch events come only from that
> > particular
> > >> >   device, and that you cannot miss touch events even if the
> > current
> > >> >   calibration is horribly wrong.
> > >> >
> > >> > - You can be sure the calibration window (pattern) is shown on
> > the right
> > >> >   output with the right coordinates.
> > >> >
> > >> > - You can unambiguously calibrate even multiple touchscreens
> > that are
> > >> >   all cloned (showing the same image).
> > >> >
> > >> > - You get a libinput style calibation matrix instead of the
> > >> >   WL_CALIBRATION format which depends on output resolution.
> > >> >
> > >> > - You can load a new calibration into the compositor without
> > playing
> > >> >   tricks with udev or restarting the compositor.
> > >> >
> > >> > There is more discussion about the topic at:
> > >> > https://phabricator.freedesktop.org/T7868
> > >> >
> > >> > This patch series depends on the clone mode series:
> > >> > https://patchwork.freedesktop.org/series/32898/
> > >> >
> > >> > There is a full branch available at:
> > >> > https://gitlab.collabora.com/pq/weston/commits/touchcalib-1
> > >
> 
> ___
> wayland-devel mailing list
> wayland-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/wayland-devel
___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel


Re: [PATCH weston 00/25] A new touchscreen calibrator

2018-04-03 Thread Pekka Paalanen
On Mon, 02 Apr 2018 13:11:24 +
Matt Hoosier  wrote:

> Do you happen to know of a good readymade program that fakes the presence
> of a touch input device with uinput? I'd love to test this series, but
> current Weston is far ahead of what my embedded devices will do; so I'm in
> the position of mostly relying on the desktop for testing.

Hi Matt,

sorry, I have no knowledge of such tool, and the lack of it has
prevented me from testing things before as well.

Right now I have two borrowed touchscreens to work with, but I need to
send them back one day.


Thanks,
pq


pgp3oLHfa0iqF.pgp
Description: OpenPGP digital signature
___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel


Re: [PATCH weston 00/25] A new touchscreen calibrator

2018-04-02 Thread Matt Hoosier
Do you happen to know of a good readymade program that fakes the presence
of a touch input device with uinput? I'd love to test this series, but
current Weston is far ahead of what my embedded devices will do; so I'm in
the position of mostly relying on the desktop for testing.

On Fri, Mar 23, 2018, 09:38 Matt Hoosier  wrote:

> On Fri, Mar 23, 2018 at 9:30 AM, Pekka Paalanen 
> wrote:
> > On Fri, 23 Mar 2018 08:46:46 -0500
> > Matt Hoosier  wrote:
> >
> >> I am very much in favor of the overall approach on this patch series.
> >> I've experienced every single one of the problems described in this
> >> summary, and my company currently resorts to maintaining a hacky
> >> out-of-tree calibration tool to paper over these problems.
> >
> > Hi Matt,
> >
> > that is very heartwarming to hear. Is your tool specifically for Weston
> > too?
>
> Yes and no. It's not phrased as a patch against the Weston source
> code, but it uses heuristics for determining which output the raw
> /dev/input/* events should be correlated against, and those heuristics
> probably would fail if some different compositor happened to be
> running.
>
> >
> > I would be very happy if this proposal fits your needs, and certainly
> > interested in hearing where it falls short.
> >
> >
> > Thanks,
> > pq
> >
> >> On Fri, Mar 23, 2018 at 7:00 AM, Pekka Paalanen 
> wrote:
> >> > From: Pekka Paalanen 
> >> >
> >> > Hi all,
> >> >
> >> > the existing touchscreen calibrator in Weston has several problems.
> This
> >> > proposal intends to solve them all by introducing a new protocol
> >> > extension for touchscreen calibration and a new calibrator tool.
> >> >
> >> > The benefits of the new tool, which the old tool lacks, are:
> >> >
> >> > - You can unambiguously pick a physical touch device to calibrate.
> >> >
> >> > - You can be sure your touch events come only from that particular
> >> >   device, and that you cannot miss touch events even if the current
> >> >   calibration is horribly wrong.
> >> >
> >> > - You can be sure the calibration window (pattern) is shown on the
> right
> >> >   output with the right coordinates.
> >> >
> >> > - You can unambiguously calibrate even multiple touchscreens that are
> >> >   all cloned (showing the same image).
> >> >
> >> > - You get a libinput style calibation matrix instead of the
> >> >   WL_CALIBRATION format which depends on output resolution.
> >> >
> >> > - You can load a new calibration into the compositor without playing
> >> >   tricks with udev or restarting the compositor.
> >> >
> >> > There is more discussion about the topic at:
> >> > https://phabricator.freedesktop.org/T7868
> >> >
> >> > This patch series depends on the clone mode series:
> >> > https://patchwork.freedesktop.org/series/32898/
> >> >
> >> > There is a full branch available at:
> >> > https://gitlab.collabora.com/pq/weston/commits/touchcalib-1
> >
>
___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel


Re: [PATCH weston 00/25] A new touchscreen calibrator

2018-03-27 Thread Pekka Paalanen
On Mon, 26 Mar 2018 07:58:47 -0700
Jason Gerecke  wrote:

> On Mon, Mar 26, 2018 at 2:36 AM, Pekka Paalanen  wrote:
> > On Fri, 23 Mar 2018 09:33:10 -0700
> > Jason Gerecke  wrote:
> >  
> >> Nice! Do you think its reasonable to extend the allowed use of this
> >> protocol to other kinds of direct-input devices? I don't see anything
> >> which would prevent this protocol from working equally well to
> >> calibrate the pen input for a tablet PC or Cintiq for example. The
> >> compositor would need to obviously have pen support and notify the
> >> client of the device in a "touch_device" event, but otherwise it looks
> >> like the client doesn't really have to care about the underlying
> >> device -- the protocol provides its own definition of down/up/motion
> >> events. Just the documentation would need to be tweaked.  
> >
> > Hi Jason,
> >
> > I suppose, but I am not at all familiar with such devices, so I cannot
> > make the call. I have never even used one.
> >
> > If the design is a good match for other devices, I would be happy to
> > accept spec changes and renaming interfaces to be more generic, but
> > only if someone is working on an implementation somewhere as well.
> >
> > Currently the protocol is being proposed to be Weston private. We might
> > land it as is, and then talk about how it should be generalized and
> > which package should install it for public use. We can have
> > libweston-dev install the XML file, or it could be proposed to be
> > included in wayland-protocols if it satisfies the general inclusion
> > requirements there. Or somewhere else.
> >
> >
> > Thanks,
> > pq
> >  
> 
> Good to know. It certainly seems like a good match at least for this
> second class of devices, so I would be very interested in seeing the
> wording made a bit more generic.
> 
> Weston's tablet support is still in the works (I believe Lyude was
> last working on it?) so there's not an urgent need to make these
> changes, but it would be good to think about them if/when the protocol
> goes public. I imagine GNOME would be remotely interested in this
> protocol... Their current tablet calibration tool has to deal with
> exactly the same issues that this protocol very nicely addresses (e.g.
> un-transforming coordinates, screen mapping, grabbing input).

Ok, very good. Personally I won't worry about the wording until someone
proposes a patch to install the XML file for public consumption.

The implementation I referred to does not need to be in Weston by the
way. Any serious implementation would be good enough for me to accept
spec changes.


Thanks,
pq


pgpNF7IqssrKn.pgp
Description: OpenPGP digital signature
___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel


Re: [PATCH weston 00/25] A new touchscreen calibrator

2018-03-26 Thread Jason Gerecke
On Mon, Mar 26, 2018 at 2:36 AM, Pekka Paalanen  wrote:
> On Fri, 23 Mar 2018 09:33:10 -0700
> Jason Gerecke  wrote:
>
>> Nice! Do you think its reasonable to extend the allowed use of this
>> protocol to other kinds of direct-input devices? I don't see anything
>> which would prevent this protocol from working equally well to
>> calibrate the pen input for a tablet PC or Cintiq for example. The
>> compositor would need to obviously have pen support and notify the
>> client of the device in a "touch_device" event, but otherwise it looks
>> like the client doesn't really have to care about the underlying
>> device -- the protocol provides its own definition of down/up/motion
>> events. Just the documentation would need to be tweaked.
>
> Hi Jason,
>
> I suppose, but I am not at all familiar with such devices, so I cannot
> make the call. I have never even used one.
>
> If the design is a good match for other devices, I would be happy to
> accept spec changes and renaming interfaces to be more generic, but
> only if someone is working on an implementation somewhere as well.
>
> Currently the protocol is being proposed to be Weston private. We might
> land it as is, and then talk about how it should be generalized and
> which package should install it for public use. We can have
> libweston-dev install the XML file, or it could be proposed to be
> included in wayland-protocols if it satisfies the general inclusion
> requirements there. Or somewhere else.
>
>
> Thanks,
> pq
>

Good to know. It certainly seems like a good match at least for this
second class of devices, so I would be very interested in seeing the
wording made a bit more generic.

Weston's tablet support is still in the works (I believe Lyude was
last working on it?) so there's not an urgent need to make these
changes, but it would be good to think about them if/when the protocol
goes public. I imagine GNOME would be remotely interested in this
protocol... Their current tablet calibration tool has to deal with
exactly the same issues that this protocol very nicely addresses (e.g.
un-transforming coordinates, screen mapping, grabbing input).

Jason
---
Now instead of four in the eights place /
you’ve got three, ‘Cause you added one  /
(That is to say, eight) to the two, /
But you can’t take seven from three,/
So you look at the sixty-fours

>
>> On Fri, Mar 23, 2018 at 5:00 AM, Pekka Paalanen  wrote:
>> > From: Pekka Paalanen 
>> >
>> > Hi all,
>> >
>> > the existing touchscreen calibrator in Weston has several problems. This
>> > proposal intends to solve them all by introducing a new protocol
>> > extension for touchscreen calibration and a new calibrator tool.
___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel


Re: [PATCH weston 00/25] A new touchscreen calibrator

2018-03-26 Thread Pekka Paalanen
On Fri, 23 Mar 2018 09:33:10 -0700
Jason Gerecke  wrote:

> Nice! Do you think its reasonable to extend the allowed use of this
> protocol to other kinds of direct-input devices? I don't see anything
> which would prevent this protocol from working equally well to
> calibrate the pen input for a tablet PC or Cintiq for example. The
> compositor would need to obviously have pen support and notify the
> client of the device in a "touch_device" event, but otherwise it looks
> like the client doesn't really have to care about the underlying
> device -- the protocol provides its own definition of down/up/motion
> events. Just the documentation would need to be tweaked.

Hi Jason,

I suppose, but I am not at all familiar with such devices, so I cannot
make the call. I have never even used one.

If the design is a good match for other devices, I would be happy to
accept spec changes and renaming interfaces to be more generic, but
only if someone is working on an implementation somewhere as well.

Currently the protocol is being proposed to be Weston private. We might
land it as is, and then talk about how it should be generalized and
which package should install it for public use. We can have
libweston-dev install the XML file, or it could be proposed to be
included in wayland-protocols if it satisfies the general inclusion
requirements there. Or somewhere else.


Thanks,
pq


> On Fri, Mar 23, 2018 at 5:00 AM, Pekka Paalanen  wrote:
> > From: Pekka Paalanen 
> >
> > Hi all,
> >
> > the existing touchscreen calibrator in Weston has several problems. This
> > proposal intends to solve them all by introducing a new protocol
> > extension for touchscreen calibration and a new calibrator tool.


pgpTeDp8gznMr.pgp
Description: OpenPGP digital signature
___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel


Re: [PATCH weston 00/25] A new touchscreen calibrator

2018-03-23 Thread Jason Gerecke
Nice! Do you think its reasonable to extend the allowed use of this
protocol to other kinds of direct-input devices? I don't see anything
which would prevent this protocol from working equally well to
calibrate the pen input for a tablet PC or Cintiq for example. The
compositor would need to obviously have pen support and notify the
client of the device in a "touch_device" event, but otherwise it looks
like the client doesn't really have to care about the underlying
device -- the protocol provides its own definition of down/up/motion
events. Just the documentation would need to be tweaked.

Jason
---
Now instead of four in the eights place /
you’ve got three, ‘Cause you added one  /
(That is to say, eight) to the two, /
But you can’t take seven from three,/
So you look at the sixty-fours


On Fri, Mar 23, 2018 at 5:00 AM, Pekka Paalanen  wrote:
> From: Pekka Paalanen 
>
> Hi all,
>
> the existing touchscreen calibrator in Weston has several problems. This
> proposal intends to solve them all by introducing a new protocol
> extension for touchscreen calibration and a new calibrator tool.
>
> The benefits of the new tool, which the old tool lacks, are:
>
> - You can unambiguously pick a physical touch device to calibrate.
>
> - You can be sure your touch events come only from that particular
>   device, and that you cannot miss touch events even if the current
>   calibration is horribly wrong.
>
> - You can be sure the calibration window (pattern) is shown on the right
>   output with the right coordinates.
>
> - You can unambiguously calibrate even multiple touchscreens that are
>   all cloned (showing the same image).
>
> - You get a libinput style calibation matrix instead of the
>   WL_CALIBRATION format which depends on output resolution.
>
> - You can load a new calibration into the compositor without playing
>   tricks with udev or restarting the compositor.
>
> There is more discussion about the topic at:
> https://phabricator.freedesktop.org/T7868
>
> This patch series depends on the clone mode series:
> https://patchwork.freedesktop.org/series/32898/
>
> There is a full branch available at:
> https://gitlab.collabora.com/pq/weston/commits/touchcalib-1
>
> This series contains many patches that could be landed separately, but I
> have not pulled them out at this point.
>
> A notable single patch is patch 3 which deprecates the udev property
> WL_CALIBRATION. It is completely already superseded by
> LIBINPUT_CALIBRATION_MATRIX property. I would hope to remove
> WL_CALIBRATION support after few releases and the old calibrator tool
> with it.
>
> Patch 21 adds the touchscreen calibration protocol, patch 24 adds the
> new calibrator tool, and patch 25 gives suggestions on how to let the
> server permanently store a new calibration into udev rules.
>
> As LIBINPUT_CALIBRATION_MATRIX is automatically handled by libinput,
> being a description of the physical input device (like e.g. mouse dpi),
> it perfectly possible to run Weston and the calibrator once to calibrate
> your touchscreens, and then run whatever compositor you want.
>
> One major thing this patch series does not address is how a Wayland
> client gets authorized to use the touchscreen calibration interface. The
> interface offers two privileged actions: the ability to grab all touch
> input (but with provision for the server to cancel at will - not
> implemented in weston so far), and the ability to upload a new
> calibration for a touch device. Obviously these should not be free for
> all. The method implemented here is a simple global configuration
> setting to advertise or not the touchscreen calibration interface. If
> advertised, it is free for all. Therefore it is not advertised by
> default.
>
>
> Thanks,
> pq
>
>
> Louis-Francis Ratté-Boulianne (7):
>   input: introduce weston_touch_device
>   libweston: fix weston_touch_start_grab() arg name
>   input: move touchpoint counting up
>   input: introduce touch event mode for calibrator
>   libweston: implement touch calibration protocol
>   weston: add touchscreen_calibrator option
>   clients: add a new touchscreen calibrator
>
> Pekka Paalanen (18):
>   libinput: remove evdev_device::devnode
>   libinput: note if calibrating without an output
>   libinput: deprecate WL_CALIBRATION
>   libinput: log input device to output associations
>   libinput: make setting the same output a no-op
>   libinput: allow evdev_device_set_output(dev, NULL)
>   libinput: use head names for output matching
>   libweston: require connected heads for input devices
>   libinput: do not switch output associations on disable
>   man: document WESTON_LIBINPUT_LOG_PRIORITY env
>   tests: add test_seat_release() for symmetry
>   libinput: move calibration printing into do_set_calibration()
>   libweston: notify_touch API to use weston_touch_device
>   libweston: unexport weston_{pointer,keyboard,touch}_{create,destroy}()
>   libweston: introduce 

Re: [PATCH weston 00/25] A new touchscreen calibrator

2018-03-23 Thread Matt Hoosier
On Fri, Mar 23, 2018 at 9:30 AM, Pekka Paalanen  wrote:
> On Fri, 23 Mar 2018 08:46:46 -0500
> Matt Hoosier  wrote:
>
>> I am very much in favor of the overall approach on this patch series.
>> I've experienced every single one of the problems described in this
>> summary, and my company currently resorts to maintaining a hacky
>> out-of-tree calibration tool to paper over these problems.
>
> Hi Matt,
>
> that is very heartwarming to hear. Is your tool specifically for Weston
> too?

Yes and no. It's not phrased as a patch against the Weston source
code, but it uses heuristics for determining which output the raw
/dev/input/* events should be correlated against, and those heuristics
probably would fail if some different compositor happened to be
running.

>
> I would be very happy if this proposal fits your needs, and certainly
> interested in hearing where it falls short.
>
>
> Thanks,
> pq
>
>> On Fri, Mar 23, 2018 at 7:00 AM, Pekka Paalanen  wrote:
>> > From: Pekka Paalanen 
>> >
>> > Hi all,
>> >
>> > the existing touchscreen calibrator in Weston has several problems. This
>> > proposal intends to solve them all by introducing a new protocol
>> > extension for touchscreen calibration and a new calibrator tool.
>> >
>> > The benefits of the new tool, which the old tool lacks, are:
>> >
>> > - You can unambiguously pick a physical touch device to calibrate.
>> >
>> > - You can be sure your touch events come only from that particular
>> >   device, and that you cannot miss touch events even if the current
>> >   calibration is horribly wrong.
>> >
>> > - You can be sure the calibration window (pattern) is shown on the right
>> >   output with the right coordinates.
>> >
>> > - You can unambiguously calibrate even multiple touchscreens that are
>> >   all cloned (showing the same image).
>> >
>> > - You get a libinput style calibation matrix instead of the
>> >   WL_CALIBRATION format which depends on output resolution.
>> >
>> > - You can load a new calibration into the compositor without playing
>> >   tricks with udev or restarting the compositor.
>> >
>> > There is more discussion about the topic at:
>> > https://phabricator.freedesktop.org/T7868
>> >
>> > This patch series depends on the clone mode series:
>> > https://patchwork.freedesktop.org/series/32898/
>> >
>> > There is a full branch available at:
>> > https://gitlab.collabora.com/pq/weston/commits/touchcalib-1
>
___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel


Re: [PATCH weston 00/25] A new touchscreen calibrator

2018-03-23 Thread Pekka Paalanen
On Fri, 23 Mar 2018 08:46:46 -0500
Matt Hoosier  wrote:

> I am very much in favor of the overall approach on this patch series.
> I've experienced every single one of the problems described in this
> summary, and my company currently resorts to maintaining a hacky
> out-of-tree calibration tool to paper over these problems.

Hi Matt,

that is very heartwarming to hear. Is your tool specifically for Weston
too?

I would be very happy if this proposal fits your needs, and certainly
interested in hearing where it falls short.


Thanks,
pq

> On Fri, Mar 23, 2018 at 7:00 AM, Pekka Paalanen  wrote:
> > From: Pekka Paalanen 
> >
> > Hi all,
> >
> > the existing touchscreen calibrator in Weston has several problems. This
> > proposal intends to solve them all by introducing a new protocol
> > extension for touchscreen calibration and a new calibrator tool.
> >
> > The benefits of the new tool, which the old tool lacks, are:
> >
> > - You can unambiguously pick a physical touch device to calibrate.
> >
> > - You can be sure your touch events come only from that particular
> >   device, and that you cannot miss touch events even if the current
> >   calibration is horribly wrong.
> >
> > - You can be sure the calibration window (pattern) is shown on the right
> >   output with the right coordinates.
> >
> > - You can unambiguously calibrate even multiple touchscreens that are
> >   all cloned (showing the same image).
> >
> > - You get a libinput style calibation matrix instead of the
> >   WL_CALIBRATION format which depends on output resolution.
> >
> > - You can load a new calibration into the compositor without playing
> >   tricks with udev or restarting the compositor.
> >
> > There is more discussion about the topic at:
> > https://phabricator.freedesktop.org/T7868
> >
> > This patch series depends on the clone mode series:
> > https://patchwork.freedesktop.org/series/32898/
> >
> > There is a full branch available at:
> > https://gitlab.collabora.com/pq/weston/commits/touchcalib-1



pgpfS3uY3fmnE.pgp
Description: OpenPGP digital signature
___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel


Re: [PATCH weston 00/25] A new touchscreen calibrator

2018-03-23 Thread Matt Hoosier
I am very much in favor of the overall approach on this patch series.
I've experienced every single one of the problems described in this
summary, and my company currently resorts to maintaining a hacky
out-of-tree calibration tool to paper over these problems.

On Fri, Mar 23, 2018 at 7:00 AM, Pekka Paalanen  wrote:
> From: Pekka Paalanen 
>
> Hi all,
>
> the existing touchscreen calibrator in Weston has several problems. This
> proposal intends to solve them all by introducing a new protocol
> extension for touchscreen calibration and a new calibrator tool.
>
> The benefits of the new tool, which the old tool lacks, are:
>
> - You can unambiguously pick a physical touch device to calibrate.
>
> - You can be sure your touch events come only from that particular
>   device, and that you cannot miss touch events even if the current
>   calibration is horribly wrong.
>
> - You can be sure the calibration window (pattern) is shown on the right
>   output with the right coordinates.
>
> - You can unambiguously calibrate even multiple touchscreens that are
>   all cloned (showing the same image).
>
> - You get a libinput style calibation matrix instead of the
>   WL_CALIBRATION format which depends on output resolution.
>
> - You can load a new calibration into the compositor without playing
>   tricks with udev or restarting the compositor.
>
> There is more discussion about the topic at:
> https://phabricator.freedesktop.org/T7868
>
> This patch series depends on the clone mode series:
> https://patchwork.freedesktop.org/series/32898/
>
> There is a full branch available at:
> https://gitlab.collabora.com/pq/weston/commits/touchcalib-1
>
> This series contains many patches that could be landed separately, but I
> have not pulled them out at this point.
>
> A notable single patch is patch 3 which deprecates the udev property
> WL_CALIBRATION. It is completely already superseded by
> LIBINPUT_CALIBRATION_MATRIX property. I would hope to remove
> WL_CALIBRATION support after few releases and the old calibrator tool
> with it.
>
> Patch 21 adds the touchscreen calibration protocol, patch 24 adds the
> new calibrator tool, and patch 25 gives suggestions on how to let the
> server permanently store a new calibration into udev rules.
>
> As LIBINPUT_CALIBRATION_MATRIX is automatically handled by libinput,
> being a description of the physical input device (like e.g. mouse dpi),
> it perfectly possible to run Weston and the calibrator once to calibrate
> your touchscreens, and then run whatever compositor you want.
>
> One major thing this patch series does not address is how a Wayland
> client gets authorized to use the touchscreen calibration interface. The
> interface offers two privileged actions: the ability to grab all touch
> input (but with provision for the server to cancel at will - not
> implemented in weston so far), and the ability to upload a new
> calibration for a touch device. Obviously these should not be free for
> all. The method implemented here is a simple global configuration
> setting to advertise or not the touchscreen calibration interface. If
> advertised, it is free for all. Therefore it is not advertised by
> default.
>
>
> Thanks,
> pq
>
>
> Louis-Francis Ratté-Boulianne (7):
>   input: introduce weston_touch_device
>   libweston: fix weston_touch_start_grab() arg name
>   input: move touchpoint counting up
>   input: introduce touch event mode for calibrator
>   libweston: implement touch calibration protocol
>   weston: add touchscreen_calibrator option
>   clients: add a new touchscreen calibrator
>
> Pekka Paalanen (18):
>   libinput: remove evdev_device::devnode
>   libinput: note if calibrating without an output
>   libinput: deprecate WL_CALIBRATION
>   libinput: log input device to output associations
>   libinput: make setting the same output a no-op
>   libinput: allow evdev_device_set_output(dev, NULL)
>   libinput: use head names for output matching
>   libweston: require connected heads for input devices
>   libinput: do not switch output associations on disable
>   man: document WESTON_LIBINPUT_LOG_PRIORITY env
>   tests: add test_seat_release() for symmetry
>   libinput: move calibration printing into do_set_calibration()
>   libweston: notify_touch API to use weston_touch_device
>   libweston: unexport weston_{pointer,keyboard,touch}_{create,destroy}()
>   libweston: introduce notify_touch_cal() and doc
>   input: do not forward unmatched touch-ups
>   protocol: add weston_touch_calibration
>   doc: add example calibration-helper script
>
>  .gitignore|   1 +
>  Makefile.am   |  21 +-
>  clients/touch-calibrator.c| 774 
> ++
>  clients/window.c  |   4 +-
>  clients/window.h  |   4 +
>  compositor/main.c |  68 +++
>  doc/calibration-helper.bash   |  44 ++
>  

[PATCH weston 00/25] A new touchscreen calibrator

2018-03-23 Thread Pekka Paalanen
From: Pekka Paalanen 

Hi all,

the existing touchscreen calibrator in Weston has several problems. This
proposal intends to solve them all by introducing a new protocol
extension for touchscreen calibration and a new calibrator tool.

The benefits of the new tool, which the old tool lacks, are:

- You can unambiguously pick a physical touch device to calibrate.

- You can be sure your touch events come only from that particular
  device, and that you cannot miss touch events even if the current
  calibration is horribly wrong.

- You can be sure the calibration window (pattern) is shown on the right
  output with the right coordinates.

- You can unambiguously calibrate even multiple touchscreens that are
  all cloned (showing the same image).

- You get a libinput style calibation matrix instead of the
  WL_CALIBRATION format which depends on output resolution.

- You can load a new calibration into the compositor without playing
  tricks with udev or restarting the compositor.

There is more discussion about the topic at:
https://phabricator.freedesktop.org/T7868

This patch series depends on the clone mode series:
https://patchwork.freedesktop.org/series/32898/

There is a full branch available at:
https://gitlab.collabora.com/pq/weston/commits/touchcalib-1

This series contains many patches that could be landed separately, but I
have not pulled them out at this point.

A notable single patch is patch 3 which deprecates the udev property
WL_CALIBRATION. It is completely already superseded by
LIBINPUT_CALIBRATION_MATRIX property. I would hope to remove
WL_CALIBRATION support after few releases and the old calibrator tool
with it.

Patch 21 adds the touchscreen calibration protocol, patch 24 adds the
new calibrator tool, and patch 25 gives suggestions on how to let the
server permanently store a new calibration into udev rules.

As LIBINPUT_CALIBRATION_MATRIX is automatically handled by libinput,
being a description of the physical input device (like e.g. mouse dpi),
it perfectly possible to run Weston and the calibrator once to calibrate
your touchscreens, and then run whatever compositor you want.

One major thing this patch series does not address is how a Wayland
client gets authorized to use the touchscreen calibration interface. The
interface offers two privileged actions: the ability to grab all touch
input (but with provision for the server to cancel at will - not
implemented in weston so far), and the ability to upload a new
calibration for a touch device. Obviously these should not be free for
all. The method implemented here is a simple global configuration
setting to advertise or not the touchscreen calibration interface. If
advertised, it is free for all. Therefore it is not advertised by
default.


Thanks,
pq


Louis-Francis Ratté-Boulianne (7):
  input: introduce weston_touch_device
  libweston: fix weston_touch_start_grab() arg name
  input: move touchpoint counting up
  input: introduce touch event mode for calibrator
  libweston: implement touch calibration protocol
  weston: add touchscreen_calibrator option
  clients: add a new touchscreen calibrator

Pekka Paalanen (18):
  libinput: remove evdev_device::devnode
  libinput: note if calibrating without an output
  libinput: deprecate WL_CALIBRATION
  libinput: log input device to output associations
  libinput: make setting the same output a no-op
  libinput: allow evdev_device_set_output(dev, NULL)
  libinput: use head names for output matching
  libweston: require connected heads for input devices
  libinput: do not switch output associations on disable
  man: document WESTON_LIBINPUT_LOG_PRIORITY env
  tests: add test_seat_release() for symmetry
  libinput: move calibration printing into do_set_calibration()
  libweston: notify_touch API to use weston_touch_device
  libweston: unexport weston_{pointer,keyboard,touch}_{create,destroy}()
  libweston: introduce notify_touch_cal() and doc
  input: do not forward unmatched touch-ups
  protocol: add weston_touch_calibration
  doc: add example calibration-helper script

 .gitignore|   1 +
 Makefile.am   |  21 +-
 clients/touch-calibrator.c| 774 ++
 clients/window.c  |   4 +-
 clients/window.h  |   4 +
 compositor/main.c |  68 +++
 doc/calibration-helper.bash   |  44 ++
 libweston/compositor-wayland.c|  31 +-
 libweston/compositor.c|  32 ++
 libweston/compositor.h| 174 +++-
 libweston/input.c | 330 +--
 libweston/libinput-device.c   | 238 ---
 libweston/libinput-device.h   |   4 +-
 libweston/libinput-seat.c |  88 +++-
 libweston/libinput-seat.h |   1 +
 libweston/touch-calibration.c | 667 +
 man/weston-drm.man|   4 +