Hi David, On Tue, Nov 14, 2023 at 3:35 PM Benjamin Tissoires <benjamin.tissoires@xxxxxxxxxx> 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