GNOME Bugzilla – Bug 763092
Mapping Wacom Intuos4 keys using on-screen overlay not possible
Last modified: 2016-03-19 12:42:26 UTC
I'm using Wacom Intuos4 tablet, which I can confirm by: $ lsusb | grep Wacom Bus 002 Device 005: ID 056a:00b9 Wacom Co., Ltd PTK-640 [Intuos4 (6x9)] Distribution Antergos (which is Arch based and therefore as close to vanilla packages as possible) with: extra/xf86-input-wacom 0.32.0-1 [installed] extra/libwacom 0.18-1 [installed] (not sure if following informations are relevant, but I have included them anyway) extra/xorg-server 1.18.1-3 (xorg) [installed] extra/xf86-input-evdev 2.10.1-3 (xorg-drivers xorg) [installed] extra/nvidia-340xx 340.96-6 [installed] A few more, possibly useful informations: $ dmesg |grep wacom [ 11.809476] wacom 0003:056A:00B9.0008: hidraw5: USB HID v1.00 Mouse [Tablet PTK-640] on usb-0000:00:02.0-7/input0 $ dmesg |grep Wacom [ 11.808035] input: Wacom Intuos4 6x9 Pen as /devices/pci0000:00/0000:00:02.0/usb2/2-7/2-7:1.0/0003:056A:00B9.0008/input/input8 [ 11.808224] input: Wacom Intuos4 6x9 Pad as /devices/pci0000:00/0000:00:02.0/usb2/2-7/2-7:1.0/0003:056A:00B9.0008/input/input10 $ xinput list ⎡ Virtual core pointer id=2 [master pointer (3)] ⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)] ⎜ ↳ Logitech M705 id=9 [slave pointer (2)] ⎜ ↳ RAPOO RAPOO 5G Wireless Device id=11 [slave pointer (2)] ⎜ ↳ Wacom Intuos4 6x9 Pad pad id=12 [slave pointer (2)] ⎜ ↳ Wacom Intuos4 6x9 Pen stylus id=13 [slave pointer (2)] ⎜ ↳ Wacom Intuos4 6x9 Pen eraser id=16 [slave pointer (2)] ⎜ ↳ Wacom Intuos4 6x9 Pen cursor id=17 [slave pointer (2)] ⎣ Virtual core keyboard id=3 [master keyboard (2)] ↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)] ↳ Power Button id=6 [slave keyboard (3)] ↳ Power Button id=7 [slave keyboard (3)] ↳ Burr-Brown from TI USB Audio CODEC id=8 [slave keyboard (3)] ↳ RAPOO RAPOO 5G Wireless Device id=10 [slave keyboard (3)] ↳ UVC Camera (046d:0825) id=14 [slave keyboard (3)] ↳ AT Translated Set 2 keyboard id=15 [slave keyboard (3)] $ gsettings get org.gnome.settings-daemon.plugins.gsdwacom active true $ i4oled-gui for setting up pad LED icons works, so I guess the pad itself is initialised correctly. Control Center's Wacom setup utility didn't work even prior to installing that small helper app. No special xorg.conf setings for identifing Wacom tablet. Everything works as expected when set from Wacom control panel, except button mapping. I get that nicely drawn overlay with correct button layout, but nothing if functional there, except Edit button and Esc key. When I click at it, app still doesn't register any button as pressed. Maybe I'm doing something wrong or I simply can not figure out how it works. Cheers, Vlada
I can reproduce the problem with GNOME 3.18, but not with the latest 3.19.x versions. It seems however to be a knock-on effect of removing some older code in the mouse plugin. Running: gsettings set org.gnome.settings-daemon.plugins.mouse active false works around the problem for me. The only relevant debug from the mouse plugin is: (gnome-settings-daemon:26333): mouse-plugin-DEBUG: setting handedness on Wacom Intuos4 6x9 Pen cursor (gnome-settings-daemon:26333): mouse-plugin-DEBUG: setting motion on Wacom Intuos4 6x9 Pen cursor (gnome-settings-daemon:26333): mouse-plugin-DEBUG: Setting accel 10/1, threshold 1 for device 'Wacom Intuos4 6x9 Pen cursor'
Apparently it's a problem in synaptics_is_present()...
I'm at a loss here. When synaptics_is_present() is called, and the wacom pad device is opened then closed at: https://git.gnome.org/browse/gnome-settings-daemon/tree/plugins/common/gsd-input-helper.c?h=gnome-3-18#n212 I don't receive any more events from the device through XIGrabButton()... I can reproduce this on an updated Fedora 23 with: xorg-x11-drv-wacom-0.30.0-3.fc23.x86_64
(In reply to Bastien Nocera from comment #3) > I'm at a loss here. When synaptics_is_present() is called, and the wacom pad > device is opened then closed at: > https://git.gnome.org/browse/gnome-settings-daemon/tree/plugins/common/gsd- > input-helper.c?h=gnome-3-18#n212 > I don't receive any more events from the device through XIGrabButton()... > > I can reproduce this on an updated Fedora 23 with: > xorg-x11-drv-wacom-0.30.0-3.fc23.x86_64 Not calling XCloseDevice() fixes the problem, which leads me to believe there's a file descriptor refcounting problem.
Opened https://bugs.freedesktop.org/show_bug.cgi?id=94487 with a test case.
Thank you for looking at this bug. I'll subscribe myself to that freedesktop bug and watch how things are developing there. Regards, Vlada
It is a GNOME bug after all, caused by less than ideal API :/
Created attachment 324094 [details] [review] mouse, common: Fix Wacom buttons not receiving events When configuring mice and touchpads, we might stumble upon a Wacom pad device. To check whether it's a synaptics device, we open the device, get the properties, and close it back up. But when we close it, we end up releasing whatever grab the wacom plugin might have had on the pad buttons: When a client makes an XCloseDevice request, any active grabs that the client has on the device are released. Any event selections that the client has are deleted, as well as any passive grabs. If the requesting client is the last client accessing the device, the server may disable all access by X to the device. As we cannot change that behaviour, we'll use a call that doesn't require opening the device so we don't have to close it. See https://bugs.freedesktop.org/show_bug.cgi?id=94487
Comment on attachment 324094 [details] [review] mouse, common: Fix Wacom buttons not receiving events Acked-by: Peter Huttere <peter.hutterer@who-t.net> Just as a warning: when you're switching from XI1 properties to XI2 propertes watch out for 32-bit properties. When retrieved via XIGetProperty() they are actually uint32_t, not longs, so you can use them directly and don't have to do the 8-byte dance.
Pushed as-is, it's a copy of the "is libinput" function, and doesn't exist in GNOME 3.20 anymore. Attachment 324094 [details] pushed as 552258b - mouse, common: Fix Wacom buttons not receiving events
Thanks for the push! Will it make it into gnome 3.20? I can follow a link to a commit directly from this bug report, but, strangly, I don't see "mouse, common: Fix Wacom buttons not receiving events" in gnome-settings-daemon cumulative commit log. Thanks again, Vlada
My bad! I spoke three minutes to soon... I failed to read your comment correctly. So, this goes into bugfix release of 3.18, but in 3.20 it is not applicable, because 3.20 works through other mechanisms. Unfortunately, I have no means to test 3.20 currently, so I must believe you that it will work. ;) Sorry for the noise. Vlada
The code that got fixed doesn't exist in 3.20. Either have your distribution package 3.18.3 or use 3.20. gnome-settings-daemon 3.18.3 is already in Fedora updates.