2023-11-15 15:15:48

by Benjamin Tissoires

[permalink] [raw]
Subject: Re: Requesting your attention and expertise regarding a Tablet/Kernel issue

Hi David,

On Tue, Nov 14, 2023 at 3:35 PM Benjamin Tissoires
<[email protected]> wrote:
[...]
> > > Could you please once again attach the hid-recorder of the Pro 24
> > > while doing the following sequence:
> > > - touch with the tip of the stylus the tablet
> > > - while touching, press the upper button (the problematic one)
> > > - still while touching, release the button
> > > - remove the stylus
> >
> > Sure, you'll find the action (repeated three times) recorded here [2]
>
> Thanks a lot. However, I realized this morning 2 issues (sorry):
> - you made the recording while the HID-BPF program was attached, which
> is now obvious that anyone would do that. But the program sometimes
> discards events, so I am not sure now if sometimes the device is not
> sending the spurious events, or if the filter was acting correctly.
> (Note to self, next time, while in the testing phase, do not blindly
> discard the events, but remap them to an ignored report)
> - that device is really "interesting" in how it behaves with the
> eraser mode emulation: when you press the second button while touching
> the pen, we get a spurious release of the touch event... And this
> leads me to think that I'm not sure about all of the transitions we
> can have with buttons :(
>
> TL;DR: there is still work to do for me and for you if you still agree
> to send me more traces.
>

I managed to refine the bpf filter. Assuming I am correct in what I
understand from the device, of course.
Also this time I made sure the original events are still around but
unprocessed by the input layer :)

So it would be nice if you could try the artifacts of job 51600738[4].
Again, download them (udev-hid-bpf_0.1.0-4-g5ab02ec.tar.xz), unpack,
sudo ./install --verbose, then unplug/replug the artist Pro 24.

Then, I'll need the following sequence (ideally repeated twice or
three times, given that your last record show a slight difference in
the first and second attempt):

- outside of the proximity of the sensor, press the upper button
- approach the stylus to the surface keeping the upper button pressed
- touch the surface with the tip while holding the upper button pressed
- release the upper button while keeping the tip pressed (like previously)
- press once again the upper button while keeping the tip touching the
surface (like previously)
- lift of the pen, keeping the upper button pressed, and still in
range of the sensor
- remove the pen from the proximity of the sensor entirely (move away
20 cm or so), while still keeping the upper button pressed

It's actually longer to describe than to execute :)

> >
> > > you could also give a test of the artifacts of job 51469284[3].
> > >
> > > The points to check are:
> > > - if you right click while touching the surface, do you still get only
> > > a right click or some weird glitches in addition to it?
> > > - if you right click while not touching (hovering), no glitches?
> >
> > I tested. It's a bit hard to tell if it causes glitches or if the
> > behavior is normal or not. I'm not using the right-click this way.
> > I always use it in "hover mode". With artifact or without, the
> > behavior is while the tip is pressed, the right-click quickly
> > 'disapear' but it is probably normal because I test on contextual
> > menu and clicking somewhere else makes this type of menu disapear.
>
> AFAICT you used the artifacts from job 51469284. Which is good. But as
> I mentioned above, the tablet is sending a spurious event I haven't
> anticipated, which results in a left click (well release/click) from
> the host point of view. And that very well explains the disappearance
> of the right-click menu.

I think I managed to remove the spurious release/click with the latest
udev-hid-bpf pipeline.

>
> >
> > I hope this will help,
>
> It does, but there are glitches that I'd like to fix. I need to iron
> out the bpf filter for those use cases. I rewrote the tests today to
> take those into account (assuming I understand the HW enough) and I
> think they are better now.
>
> But I would also totally understand that you had enough debugging and
> you would rather focus on using the tablets, instead of debugging
> them. In which case, someone else from the community might help me.
>
> Cheers,
> Benjamin
>
>
> > Cheers,
> >
> > David
> >
> > [1] https://www.davidrevoy.com/article1002/how-a-kernel-developer-made-my-styluses-work-again
> > [2] https://www.peppercarrot.com/extras/mailing-list/hid-records/XPPEN-Artist-24-Pro/XPPEN-Artist-24-Pro_pen_tip-contact-and-action-press-release-upper-stylus-button-x3.txt
> >

Cheers,
Benjamin

[4] https://gitlab.freedesktop.org/libevdev/udev-hid-bpf/-/jobs/51600738


2023-11-23 22:13:36

by David Revoy

[permalink] [raw]
Subject: Re: Requesting your attention and expertise regarding a Tablet/Kernel issue

Hi Benjamin,

Sorry for late reply.

> So it would be nice if you could try the artifacts of job 51600738[4].
> Again, download them (udev-hid-bpf_0.1.0-4-g5ab02ec.tar.xz), unpack,
> sudo ./install --verbose, then unplug/replug the artist Pro 24.

Ok, the main change I experienced after installing is xsetwacom
listing the ID name of the device with twice the name Stylus on
"UGTABLET 24 inch PenDisplay Stylus stylus". Before it was only
"UGTABLET 24 inch PenDisplay stylus".

$ xsetwacom --list
UGTABLET 24 inch PenDisplay Stylus stylus id: 10 type: STYLUS

Not a big deal, but I thought it was worth to mention it.

> Then, I'll need the following sequence (ideally repeated twice or
> three times, given that your last record show a slight difference in
> the first and second attempt):
>
> - outside of the proximity of the sensor, press the upper button
> - approach the stylus to the surface keeping the upper button pressed
> - touch the surface with the tip while holding the upper button pressed
> - release the upper button while keeping the tip pressed (like previously)
> - press once again the upper button while keeping the tip touching the
> surface (like previously)
> - lift of the pen, keeping the upper button pressed, and still in
> range of the sensor
> - remove the pen from the proximity of the sensor entirely (move away
> 20 cm or so), while still keeping the upper button pressed
>
> It's actually longer to describe than to execute :)
>

Thank you for the detailed steps. True, it makes sens once
practising it. I made the gesture three time on:

https://www.peppercarrot.com/extras/mailing-list/hid-records/XPPEN-Artist-24-Pro/2023-11-23_XPPEN-Artist-24-Pro_pen_tip-contact-and-press-release-upper-stylus-button-while-pressed-x3.txt

> But I would also totally understand that you had enough debugging and
> you would rather focus on using the tablets, instead of debugging
> them. In which case, someone else from the community might help me.

No problem for continue testing, I'm around! Thank you again
for improving the behavior of the tablets.

Cheers,
David

2023-11-24 17:19:15

by Benjamin Tissoires

[permalink] [raw]
Subject: Re: Requesting your attention and expertise regarding a Tablet/Kernel issue

Hi David,

On Thu, Nov 23, 2023 at 11:12 PM David Revoy <[email protected]> wrote:
>
> Hi Benjamin,
>
> Sorry for late reply.
>
> > So it would be nice if you could try the artifacts of job 51600738[4].
> > Again, download them (udev-hid-bpf_0.1.0-4-g5ab02ec.tar.xz), unpack,
> > sudo ./install --verbose, then unplug/replug the artist Pro 24.
>
> Ok, the main change I experienced after installing is xsetwacom
> listing the ID name of the device with twice the name Stylus on
> "UGTABLET 24 inch PenDisplay Stylus stylus". Before it was only
> "UGTABLET 24 inch PenDisplay stylus".
>
> $ xsetwacom --list
> UGTABLET 24 inch PenDisplay Stylus stylus id: 10 type: STYLUS
>
> Not a big deal, but I thought it was worth to mention it.

Oh, this might be because I added a debug device. Given that there are
2 devices on the HID node, then one is tagged as Stylus by the kernel.
Nothing to worry about.

>
> > Then, I'll need the following sequence (ideally repeated twice or
> > three times, given that your last record show a slight difference in
> > the first and second attempt):
> >
> > - outside of the proximity of the sensor, press the upper button
> > - approach the stylus to the surface keeping the upper button pressed
> > - touch the surface with the tip while holding the upper button pressed
> > - release the upper button while keeping the tip pressed (like previously)
> > - press once again the upper button while keeping the tip touching the
> > surface (like previously)
> > - lift of the pen, keeping the upper button pressed, and still in
> > range of the sensor
> > - remove the pen from the proximity of the sensor entirely (move away
> > 20 cm or so), while still keeping the upper button pressed
> >
> > It's actually longer to describe than to execute :)
> >
>
> Thank you for the detailed steps. True, it makes sens once
> practising it. I made the gesture three time on:
>
> https://www.peppercarrot.com/extras/mailing-list/hid-records/XPPEN-Artist-24-Pro/2023-11-23_XPPEN-Artist-24-Pro_pen_tip-contact-and-press-release-upper-stylus-button-while-pressed-x3.txt

Thanks a lot. And of course this device doesn't react in the way I expected :)

Transitions from/to the tip touching the surface while the second
button is pressed are normal, there are no extra events...

But this also showed that the previous filter was better when pressing
the upper button while touching the tip on the surface, because now we
get another spurious event that was filtered before (and because it
was filtered, I thought it was not there).

Anyway, I couldn't rewrite the filter today, but I'll work on it next
week for sure.

>
> > But I would also totally understand that you had enough debugging and
> > you would rather focus on using the tablets, instead of debugging
> > them. In which case, someone else from the community might help me.
>
> No problem for continue testing, I'm around! Thank you again
> for improving the behavior of the tablets.
>

great!

Cheers,
Benjamin


> Cheers,
> David
>

2023-11-29 15:33:14

by Benjamin Tissoires

[permalink] [raw]
Subject: Re: Requesting your attention and expertise regarding a Tablet/Kernel issue

On Fri, Nov 24, 2023 at 6:18 PM Benjamin Tissoires
<[email protected]> wrote:
>
> Hi David,
>
> On Thu, Nov 23, 2023 at 11:12 PM David Revoy <[email protected]> wrote:
> >
> > Hi Benjamin,
> >
> > Sorry for late reply.
> >
> > > So it would be nice if you could try the artifacts of job 51600738[4].
> > > Again, download them (udev-hid-bpf_0.1.0-4-g5ab02ec.tar.xz), unpack,
> > > sudo ./install --verbose, then unplug/replug the artist Pro 24.
> >
> > Ok, the main change I experienced after installing is xsetwacom
> > listing the ID name of the device with twice the name Stylus on
> > "UGTABLET 24 inch PenDisplay Stylus stylus". Before it was only
> > "UGTABLET 24 inch PenDisplay stylus".
> >
> > $ xsetwacom --list
> > UGTABLET 24 inch PenDisplay Stylus stylus id: 10 type: STYLUS
> >
> > Not a big deal, but I thought it was worth to mention it.
>
> Oh, this might be because I added a debug device. Given that there are
> 2 devices on the HID node, then one is tagged as Stylus by the kernel.
> Nothing to worry about.
>
> >
> > > Then, I'll need the following sequence (ideally repeated twice or
> > > three times, given that your last record show a slight difference in
> > > the first and second attempt):
> > >
> > > - outside of the proximity of the sensor, press the upper button
> > > - approach the stylus to the surface keeping the upper button pressed
> > > - touch the surface with the tip while holding the upper button pressed
> > > - release the upper button while keeping the tip pressed (like previously)
> > > - press once again the upper button while keeping the tip touching the
> > > surface (like previously)
> > > - lift of the pen, keeping the upper button pressed, and still in
> > > range of the sensor
> > > - remove the pen from the proximity of the sensor entirely (move away
> > > 20 cm or so), while still keeping the upper button pressed
> > >
> > > It's actually longer to describe than to execute :)
> > >
> >
> > Thank you for the detailed steps. True, it makes sens once
> > practising it. I made the gesture three time on:
> >
> > https://www.peppercarrot.com/extras/mailing-list/hid-records/XPPEN-Artist-24-Pro/2023-11-23_XPPEN-Artist-24-Pro_pen_tip-contact-and-press-release-upper-stylus-button-while-pressed-x3.txt
>
> Thanks a lot. And of course this device doesn't react in the way I expected :)
>
> Transitions from/to the tip touching the surface while the second
> button is pressed are normal, there are no extra events...
>
> But this also showed that the previous filter was better when pressing
> the upper button while touching the tip on the surface, because now we
> get another spurious event that was filtered before (and because it
> was filtered, I thought it was not there).
>
> Anyway, I couldn't rewrite the filter today, but I'll work on it next
> week for sure.


I've updated the HID-BPF filter, and you can find it in the latest pipeline[0].
I've removed the extra "Stylus" and you should have a better
experience with the upper button now.


>
>
> >
> > > But I would also totally understand that you had enough debugging and
> > > you would rather focus on using the tablets, instead of debugging
> > > them. In which case, someone else from the community might help me.
> >
> > No problem for continue testing, I'm around! Thank you again
> > for improving the behavior of the tablets.
> >

I think we are done with the XP-Pen Pro 24. But now I wonder if the
Pro 16 (gen2) doesn't also have those glitches.

Could you send me the same debug sequence as the last time
(transitions from/to touching the surface while holding the upper
button) but on the 16 now?

There is a chance I'll need the same filter to remove the extra left
click that might appear when you press the upper button while touching
the surface.

Cheers,
Benjamin


[0] https://gitlab.freedesktop.org/libevdev/udev-hid-bpf/-/jobs/52148274

2023-11-30 22:25:21

by David Revoy

[permalink] [raw]
Subject: Re: Requesting your attention and expertise regarding a Tablet/Kernel issue

Hi Benjamin,

> I've updated the HID-BPF filter, and you can find it in the latest pipeline[0].
> I've removed the extra "Stylus" and you should have a better
> experience with the upper button now.
> [0] https://gitlab.freedesktop.org/libevdev/udev-hid-bpf/-/jobs/52148274

Thanks for the update!

> I think we are done with the XP-Pen Pro 24. But now I wonder if the
> Pro 16 (gen2) doesn't also have those glitches.
> Could you send me the same debug sequence as the last time
> (transitions from/to touching the surface while holding the upper
> button) but on the 16 now?

Sure, here is the same action, three time but now on the Pro 16 (Gen2):
https://www.peppercarrot.com/extras/mailing-list/hid-records/XPPEN-Artist-16-Pro-Gen2/2023-11-30_XPPEN-Artist-16-Pro-Gen2_pen_tip-contact-and-press-release-upper-stylus-button-while-pressed-x3.txt

Have a good end of week,
David.

2023-12-01 15:42:24

by Benjamin Tissoires

[permalink] [raw]
Subject: Re: Requesting your attention and expertise regarding a Tablet/Kernel issue

Hi David,

On Thu, Nov 30, 2023 at 11:25 PM David Revoy <[email protected]> wrote:
>
> Hi Benjamin,
>
> > I've updated the HID-BPF filter, and you can find it in the latest pipeline[0].
> > I've removed the extra "Stylus" and you should have a better
> > experience with the upper button now.
> > [0] https://gitlab.freedesktop.org/libevdev/udev-hid-bpf/-/jobs/52148274
>
> Thanks for the update!
>
> > I think we are done with the XP-Pen Pro 24. But now I wonder if the
> > Pro 16 (gen2) doesn't also have those glitches.
> > Could you send me the same debug sequence as the last time
> > (transitions from/to touching the surface while holding the upper
> > button) but on the 16 now?
>
> Sure, here is the same action, three time but now on the Pro 16 (Gen2):
> https://www.peppercarrot.com/extras/mailing-list/hid-records/XPPEN-Artist-16-Pro-Gen2/2023-11-30_XPPEN-Artist-16-Pro-Gen2_pen_tip-contact-and-press-release-upper-stylus-button-while-pressed-x3.txt

Thanks a lot.

And the good news is that we get correct events all the time, so
nothing more to fix here. The current filter is doing a good job
already :)

>
> Have a good end of week,
> David.

Cheers,
Benjamin

>