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 781703 - Can't calibrate Wacom tablet with gnome 3.24 (Xorg or Wayland)
Can't calibrate Wacom tablet with gnome 3.24 (Xorg or Wayland)
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: general
3.24.x
Other Linux
: Normal major
: ---
Assigned To: mutter-maint
mutter-maint
: 782235 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2017-04-25 09:45 UTC by Camille Bissuel
Modified: 2017-07-21 09:31 UTC
See Also:
GNOME target: ---
GNOME version: 3.23/3.24


Attachments
backends/x11: Fix c&p issue in tablet area calculation (1.03 KB, patch)
2017-06-16 18:14 UTC, Carlos Garnacho
committed Details | Review

Description Camille Bissuel 2017-04-25 09:45:55 UTC
Hi, 

I just updated to Gnome 3.24 under Antergos (Arch based)...
Congrats for the new design work on the wacom tablet calibration and new support of Wayland, but it's buggy for me with a Wacom Cintiq 27 QHD Touch. With Xorg or Wayland it's the same.

I can't calibrate anymore, I'm stuck at the third click as you can see with this video : https://camille.cozycloud.cc/public/files/files/32aac78d7cff212331ec689e7d9a8cfc/attach/calibration-gnome324-wacomcintiq27.webm


So I have to Escape and the mapping is completely broken (cursor stuck at the top border with the pen).

Please tell me if you need any logs, for now my downgrading to gnome 3.22

Thanks again
Comment 1 Camille Bissuel 2017-04-27 13:08:41 UTC
Reproduced on a Cintiq Companion 2, also with Antergos
Comment 2 Jason Gerecke 2017-05-01 21:57:24 UTC
Similar behavior observed under Arch Linux on my own system.

When I use `dconf-editor` and `xinput watch-props` to observe what is going on, I see that starting the calibration process resets `/org/gnome/desktop/peripherals/tablets/$VID:$PID/area` to the value '[0.0, 0.0, 0.0, 0.0]', and that the X driver's "Wacom Tablet Area" property is set to "0, 0, 64800, 0" (note that the default area for my Cintiq 24HDT should be "0, 0, 103680, 64800").

Manually changing the setting in dconf to e.g. '[0.0, 0.0, 1.0, 1.0]' changes the cursor position as expected, but doesn't reset it to the default like I'd expect. It seems GNOME may be both incorrectly initializing the 'area' key and incorrectly calculating the area from the value of 'area' and the tablet's X/Y dimensions.

System Info
--------------
Arch Linux
gnome-control-center 3.24.1-1
gnome-settings-daemon 3.24.1+7+g42f75ed4-1
mutter 3.24.1+1+geb394f19d-1
xf86-input-wacom 0.34.2-1
xorg-server 1.19.3-2
Xorg session
Displays: Cintiq 24HDT (left) & DTH-2242 (right)
Comment 3 Carlos Garnacho 2017-06-16 18:13:28 UTC
(In reply to Jason Gerecke from comment #2)
> Similar behavior observed under Arch Linux on my own system.
> 
> When I use `dconf-editor` and `xinput watch-props` to observe what is going
> on, I see that starting the calibration process resets
> `/org/gnome/desktop/peripherals/tablets/$VID:$PID/area` to the value '[0.0,
> 0.0, 0.0, 0.0]', and that the X driver's "Wacom Tablet Area" property is set
> to "0, 0, 64800, 0" (note that the default area for my Cintiq 24HDT should
> be "0, 0, 103680, 64800").

Caught the cause... silly c&p typo.

> 
> Manually changing the setting in dconf to e.g. '[0.0, 0.0, 1.0, 1.0]'
> changes the cursor position as expected, but doesn't reset it to the default
> like I'd expect. It seems GNOME may be both incorrectly initializing the

FYI, the 4 double values in the newer "area" setting in org.gnome.desktop.peripherals went from device units to unitless, where 0 is untransformed and 1 is "the whole device is dead from this edge".

These values are picked by mutter and applied in backend dependent ways, transforming that to device units on x11/wacomdrv and applying it to the device matrix on wayland/libinput.

So, yeah, I'd expect 0,0,1,1 to be broken :). The default should be 0,0,0,0; if it were applied correctly...

(In reply to Camille Bissuel from comment #0)
> Hi, 
> 
> I just updated to Gnome 3.24 under Antergos (Arch based)...
> Congrats for the new design work on the wacom tablet calibration and new
> support of Wayland, but it's buggy for me with a Wacom Cintiq 27 QHD Touch.
> With Xorg or Wayland it's the same.

However I don't find an explanation to this. The patch I'm submitting affects X11 paths only. Wayland is unaffected and I've been able to calibrate successfully on wayland multiple times in a row.
Comment 4 Carlos Garnacho 2017-06-16 18:14:10 UTC
Created attachment 353914 [details] [review]
backends/x11: Fix c&p issue in tablet area calculation

instead of filling in the last array value, it overwrote the previous one.
Comment 5 Camille Bissuel 2017-06-19 08:11:18 UTC
Thanks a lot for the fix Carlos !
Is there a relatively easy way or a tutorial I can use to test your patch ?

And I tested again with Wayland today, and calibration works. I'm sorry I probably tested too quickly with Xorg twice instead of correctly switching to Wayland.

Cheers !
Comment 6 Jason Gerecke 2017-06-19 21:39:41 UTC
Confirmed that this lets me finish the calibration successfully. I'm encountering some issues with the calculated/applied calibration, but I'll file a separate bug for that since it seems like there are multiple causes.

Camille: if you're familiar/comfortable with using PKGBUILDs, you might be use the "Arch Build System"[1] to generate local versions of the distro packages. After getting the PKGBUILD and other supporting files files for (in this case) mutter, I also save a copy of the patch(es) I'd like to apply on top and then edit the PKGBUILD to apply them to the source tree. After that, I just use `makepkg` to build and install the package.

[1]: https://wiki.archlinux.org/index.php/Arch_Build_System
Comment 7 Camille Bissuel 2017-06-20 08:33:11 UTC
Hi,

I successfully complied by copying and tweaking another PKGBUILD from AUR, and I'm happy to say it's fixed... !

But after calibration, the cursor is slightly offset from the pen (to the bottom right) : I suppose it's what Jason mean and reported elsewhere (where exactly ?).

So I'm closing this bug, thanks for the work !
Comment 8 Florian Müllner 2017-06-20 08:35:25 UTC
(In reply to Camille Bissuel from comment #7)
> I successfully complied by copying and tweaking another PKGBUILD from AUR,
> and I'm happy to say it's fixed... !

Are you saying the issue is fixed without the patch on this bug?
Comment 9 Camille Bissuel 2017-06-20 08:46:30 UTC
No, I'm sorry I was unclear, the patch is obviously needed to fix ;)
Comment 10 Florian Müllner 2017-06-20 08:57:15 UTC
Then the bug isn't fixed, as the patch hasn't been committed.
Comment 11 Camille Bissuel 2017-06-20 09:06:15 UTC
Ok, sorry, I'm not familiar with the procedure, I'm not a developer myself. I'll know it in the future...
Comment 12 Jason Gerecke 2017-06-20 19:57:51 UTC
For reference, I've filed the calibration offset issue as bug 784009 and provided patches that should fix it.
Comment 13 Carlos Garnacho 2017-06-20 20:12:52 UTC
Thanks for testing! The fix is now in master and gnome-3-24 branches. Together with other fixes.

Attachment 353914 [details] pushed as 48e8202 - backends/x11: Fix c&p issue in tablet area calculation
Comment 14 Carlos Garnacho 2017-07-21 09:31:06 UTC
*** Bug 782235 has been marked as a duplicate of this bug. ***