After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 785358 - Cannot configure touch ring actions of some Wacom tablets
Cannot configure touch ring actions of some Wacom tablets
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks:
 
 
Reported: 2017-07-24 17:33 UTC by Jason Gerecke
Modified: 2017-08-23 22:36 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
evemu-record and libinput-debug-events logs (4.08 KB, application/gzip)
2017-07-24 20:48 UTC, Jason Gerecke
  Details
padOsd: Add one to the >1 rings (1005 bytes, patch)
2017-08-03 20:02 UTC, Carlos Garnacho
committed Details | Review

Description Jason Gerecke 2017-07-24 17:33:53 UTC
When configuring a Wacom tablet through the gnome-control-center, it may not be possible to assign actions to the touch ring in some instances. Of the three devices I've tested, I have the following results:

 * Cintiq 24HD Touch: Left touch ring is configurable, but the right is not. (Both Xorg and Wayland)

 * 2nd-gen Intuos Pro: The device's single touch ring is not configurable under Xorg, but is configurable under Wayland.

 * 1st-gen Intuos Pro: The device's single touch ring is configurable under both Xorg and Wayland.

When a touch ring is not configurable, the "leader lines" from the layout SVG will be rendered, but no text is rendered. Touching the touch ring should change the text to a dropdown, but again no dropdown is rendered.


System is running Arch Linux with the following locally-compiled packages:

gnome-control-center	3.24.2+22+g2bebdf11b
gnome-shell		3.24.3
gtk3			3.22.17+5+g32919a4a02
mutter			3.24.4
nautilus		3.24.2+1+gaab979bbd
gnome-settings-daemon	3.24.3
Comment 1 Carlos Garnacho 2017-07-24 20:25:13 UTC
I think that boils down to feature detection in x11/evdev ClutterInputDevice implementations (the n-rings and n-strips properties). The interesting part is that the wayland bits are getting that information from libinput directly.

Could you attach evemu records for these pads and/or check that libinput-debug-events does see events for these rings?
Comment 2 Jason Gerecke 2017-07-24 20:48:35 UTC
Created attachment 356323 [details]
evemu-record and libinput-debug-events logs

I've recorded logs from both evemu-record and libinput-debug-events of my Cintiq 24HDT, 1st-gen Intuos Pro, and 2nd-gen Intuos Pro. Each device's pair of logs were recorded simultaneously and capture a gesture on the ring(s) starting at the bottom, moving clockwise, and ending at the bottom again.

I should note that I found some kernel issues with the 2nd-gen Intuos Pro while bug hunting... The attached logs from it are with a modified kernel module to fix most of those issues. Kernel patches to be submitted upstream soon(TM).
Comment 3 Carlos Garnacho 2017-08-03 20:02:54 UTC
Created attachment 356887 [details] [review]
padOsd: Add one to the >1 rings

Ring leader/label SVG elements for the second ring are named *Ring2*.
We need to add one here for elements >1, this is consistent with strips.
Comment 4 Carlos Garnacho 2017-08-03 20:11:49 UTC
This patch fixes the Cintiq 24hdt issue, I think the Intuos 2nd-gen problem is different though.
Comment 5 Carlos Garnacho 2017-08-03 20:12:44 UTC
Comment on attachment 356887 [details] [review]
padOsd: Add one to the >1 rings

Attachment 356887 [details] pushed as 508e3e5 - padOsd: Add one to the >1 rings
Comment 6 Carlos Garnacho 2017-08-04 09:41:12 UTC
(In reply to Jason Gerecke from comment #0)
>  * 2nd-gen Intuos Pro: The device's single touch ring is not configurable
> under Xorg, but is configurable under Wayland.
> 

This I couldn't reproduce... Logged in on the Xorg session and running mutter/gnome-shell master, I've been able to map actions and reproduce these with the evemu-record log file you provided.
Comment 7 Jason Gerecke 2017-08-09 23:20:31 UTC
(In reply to Carlos Garnacho from comment #6)
> (In reply to Jason Gerecke from comment #0)
> >  * 2nd-gen Intuos Pro: The device's single touch ring is not configurable
> > under Xorg, but is configurable under Wayland.
> > 
> 
> This I couldn't reproduce... Logged in on the Xorg session and running
> mutter/gnome-shell master, I've been able to map actions and reproduce these
> with the evemu-record log file you provided.

Interesting. I've confirmed that your patch does fix the issue for my 24HD, so I'm confused as to what is preventing my device from working. Can you suggest any particular ways to debug or places to look? Hopefully its just some out-of-date component on my system :)
Comment 8 Carlos Garnacho 2017-08-10 09:18:03 UTC
(In reply to Jason Gerecke from comment #7)
> (In reply to Carlos Garnacho from comment #6)
> > (In reply to Jason Gerecke from comment #0)
> > >  * 2nd-gen Intuos Pro: The device's single touch ring is not configurable
> > > under Xorg, but is configurable under Wayland.
> > > 
> > 
> > This I couldn't reproduce... Logged in on the Xorg session and running
> > mutter/gnome-shell master, I've been able to map actions and reproduce these
> > with the evemu-record log file you provided.
> 
> Interesting. I've confirmed that your patch does fix the issue for my 24HD,
> so I'm confused as to what is preventing my device from working. Can you
> suggest any particular ways to debug or places to look? Hopefully its just
> some out-of-date component on my system :)

Yeah... I'm a bit baffled too, except the number of buttons there doesn't seem to be any fundamental difference with the other intuos. And the fix for the 24hdt just affected devices with a second ring. The logic goes like this:

1) Clutter figures out the additional capabilities of the pad
https://git.gnome.org/browse/mutter/tree/clutter/clutter/x11/clutter-device-manager-xi2.c#n371

2) Clutter emits CLUTTER_PAD_RING events for the ring axis:
https://git.gnome.org/browse/mutter/tree/clutter/clutter/x11/clutter-device-manager-xi2.c#n1123

3) gnome-shell populates the pad osd based on the pad ClutterInputDevice capabilities:
https://git.gnome.org/browse/gnome-shell/tree/js/ui/padOsd.js#n713

4) gnome-shell reacts to CLUTTER_PAD_RING events and triggers action edition:
https://git.gnome.org/browse/gnome-shell/tree/js/ui/padOsd.js#n805

If you don't even get the description labels at the end of ring leader lines, it's maybe something with the check inside the for loop at #3, so gnome-shell would seem to fail fetching the rsvg elements and the label positions for the ring actions. If the actions are visible, but can't be edited/triggered, then it somehow has to do with event delivery (#2 or #4), but that all seemed correct to me from your evemu traces.
Comment 9 Carlos Garnacho 2017-08-10 09:31:59 UTC
Oh, and bear in mind, passive grabs when you restart the shell happen at a point where the previous shell didn't give up its own, thus may fail. You can find that pad actions alternately work across restarts, because the previous shell didn't have a passive grab because it's previous shell did have one, etc...

This would be nice to fix (also a problem on touchscreens), but it does work on a brand new session and across crashes, so low prio anyway... Unplugging and plugging the device again shall work too.
Comment 10 Jason Gerecke 2017-08-10 22:14:29 UTC
Looks like the Intuos Pro bug is my fault. xf86-input-wacom doesn't set up the valuators properly for this tablet (and a few others), which causes `get_pad_features` to not detect any rings. Once I modify the driver to report the proper valuators, the UI allows me to configure the ring. I assume you're using xf86-input-libinput since that's the only way I can imagine the ring showing up properly for you.
Comment 11 Carlos Garnacho 2017-08-12 17:20:36 UTC
(In reply to Jason Gerecke from comment #10)
> Looks like the Intuos Pro bug is my fault. xf86-input-wacom doesn't set up
> the valuators properly for this tablet (and a few others), which causes
> `get_pad_features` to not detect any rings. Once I modify the driver to
> report the proper valuators, the UI allows me to configure the ring. I
> assume you're using xf86-input-libinput since that's the only way I can
> imagine the ring showing up properly for you.

Ugh, plain and simply pebcak. I managed to overwrite intuos-pro2.evemu.log with intuos-pro1 when extracting those one by one from the tarball you provided, which of course worked fine. FYI, mutter doesn't support yet libinput for tablets on X11.

At least the debugging I induced wasn't infructuous after all... Is there anything left to address in this bug?
Comment 12 Jason Gerecke 2017-08-23 22:10:28 UTC
I've given all the devices listed in the bug one last test with updated kernel and X drivers and it appears to be resolved. Thanks again!
Comment 13 Carlos Garnacho 2017-08-23 22:36:54 UTC
\m/, thanks for testing!