GNOME Bugzilla – Bug 786400
"Art pen" named "Grip pen" in the Gnome Control Center
Last modified: 2017-08-18 09:48:00 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
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 ?
Created attachment 357787 [details] ~/.cache/gnome-control-center/wacom/devices Thanks Carlos, here they are !
Created attachment 357788 [details] ~/.cache/gnome-control-center/wacom/tools
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.
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.
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
Great work Carlos ! Thanks ;) Deleting these two files correctly reset the number of pen to two ;)