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 786400 - "Art pen" named "Grip pen" in the Gnome Control Center
"Art pen" named "Grip pen" in the Gnome Control Center
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Backend: X11
unspecified
Other Linux
: Normal minor
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2017-08-17 08:10 UTC by Camille Bissuel
Modified: 2017-08-18 09:48 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
libwacom.stylus file (6.79 KB, text/plain)
2017-08-17 08:10 UTC, Camille Bissuel
  Details
~/.cache/gnome-control-center/wacom/devices (46 bytes, text/plain)
2017-08-17 10:17 UTC, Camille Bissuel
  Details
~/.cache/gnome-control-center/wacom/tools (65 bytes, text/plain)
2017-08-17 10:17 UTC, Camille Bissuel
  Details
gdk/x11: Extract GdkDeviceTool tool ID from "Wacom Serial IDs" property (3.17 KB, patch)
2017-08-17 14:26 UTC, Carlos Garnacho
committed Details | Review

Description Camille Bissuel 2017-08-17 08:10:41 UTC
Created attachment 357772 [details]
libwacom.stylus file

Hi dear Gnome maintainers, and Carlos !

After a discussion on IRC with Carlos Garnacho on Tuesday, I reported a small bug to the Linux Wacom Team:
In the Gnome Control Center, Wacom configuration part, my "Art Pen" (supporting rotation) is named a "Grip Pen" or maybe a "Pro Pen" :
https://sourceforge.net/p/linuxwacom/bugs/343/

According to Carlos, it comes from the ID/name mapping of libwacom, but Ping Cheng say the IDs are good : "Maybe Carlos can troubleshoot further into g-s-d, at least check out what IDs they get in g-s-d."

I'm an happy owner of a Cintiq 27QHD under Antergos (Arch based).
my packages :
linux 4.12.6
gnome 3.24.3
xorg 1.19.3
xf86-input-wacom 0.35.0
libwacom 0.24

Additionally the Gnome Control Center look to see 3 pens (1 Pro pen and 2 Grip pen) despite I have 2 pens : a Pro pen and an Art Pen...

please ask me if you need any logs, joined is my "libwacom.stylus" file, from which the names come from ;)

Thanks for your work !
Camille
Comment 1 Carlos Garnacho 2017-08-17 09:59:04 UTC
Uhm, the pen IDs indeed make sense... can you provide the content of ~/.cache/gnome-control-center/wacom/tools and ~/.cache/gnome-control-center/wacom/devices ?
Comment 2 Camille Bissuel 2017-08-17 10:17:08 UTC
Created attachment 357787 [details]
~/.cache/gnome-control-center/wacom/devices

Thanks Carlos, here they are !
Comment 3 Camille Bissuel 2017-08-17 10:17:31 UTC
Created attachment 357788 [details]
~/.cache/gnome-control-center/wacom/tools
Comment 4 Carlos Garnacho 2017-08-17 14:21:20 UTC
Ah I see, gnome-control-center seems to fallback into the "no known tool id" case, where it just fetches the first tool. This case is reserved for low end tablets that don't report the tool in use, but evidently shouldn't happen here.

This is down to GTK+ on X11, which is creating a tool with ID=0. gnome-control-center uses that information to add new styli to the dialog, which are persistently remembered through these files I asked you to attach. I'm attaching/pushing a GTK+ patch that fixes this.

A minor note though, gnome-control-center is apparently correct in thinking you've interacted with 3 styli, the relevant line in the "devices" file you attached is:

Styli=415b8047;4d1c804c;59168052;

Those are serial numbers as announced by tools, these serial numbers are unique for each physical stylus (no two styli will have the same), and all 3 seem legit.

You can delete those 2 files to reset gnome-control-center UI known styli. If you're confident that is a bug, would be nice if you could find the reproduction steps, the info as stored in these files don't help much with it :(.

And a tip btw, wayland does provide correct tool IDs. This means you should get the right stylus name/info if you delete the files and configure styli on the wayland session, in case you don't want to wait for the GTK+ fix. In any case the files should be manually deleted for the fix to be effective.
Comment 5 Carlos Garnacho 2017-08-17 14:26:18 UTC
Created attachment 357814 [details] [review]
gdk/x11: Extract GdkDeviceTool tool ID from "Wacom Serial IDs" property

This property contains 5 integers, of which the last 2 respectively
contain the tool serial number and tool ID. We were only extracting the
first so far, but GdkDeviceTool also has API getters for the latter,
which remained 0.
Comment 6 Carlos Garnacho 2017-08-17 14:36:40 UTC
The fix was pushed to gtk+ 3.22 and master.

Attachment 357814 [details] pushed as c2e0812 - gdk/x11: Extract GdkDeviceTool tool ID from "Wacom Serial IDs" property
Comment 7 Camille Bissuel 2017-08-18 09:48:00 UTC
Great work Carlos ! Thanks ;)
Deleting these two files correctly reset the number of pen to two ;)