Bug 476982 - Support pen calibration in UI
Summary: Support pen calibration in UI
Status: ASSIGNED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_tablet (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: Joshua Goins
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-11-14 09:48 UTC by David REVOY
Modified: 2023-11-30 19:36 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
^ video IRL of the bug (1.76 MB, video/mp4)
2023-11-14 09:48 UTC, David REVOY
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David REVOY 2023-11-14 09:48:28 UTC
Created attachment 163143 [details]
^ video IRL of the bug

Hi,

I jumped to the Wayland session this morning to evaluate it, and one of my first show-stopper for making art is the lack of configuration tool for calibrating the stylus.

I have a big offset between the tip of my stylus and the cursor position due to not having any possibilities to fix the parralax (see short MP4 video in attachement, no audio, only 13 seconds).

On X11, I could use the kcm_tablet plugin to perform a calibration, or use xinput-calibrator ( https://github.com/tias/xinput_calibrator ) to get the four coordinate and apply them with something like `xsetwacom set "UGTABLET Artist Pro 16 (Gen2) stylus" Area 125 45 32810 32792` and fix the parralax.

This issue is important if you want to maintain https://kde.org/for/creators/ compatible with the Wayland session, because I don't know any artists/graphists able to design, draw or paint on a display tablet without parralax correction ...

Here are steps of what I'm used to see on the user experience side, for references in case you don't know how other products solved it:
1. Map the tablet to a monitor (Important: many 'display pen tablet' after being connected transform the desktop into a multi-monitor setup [1] [2] and after that the stylus enter a mapping accross all monitors. It must be restricted to a single monitor before starting a calibration).
2. User usually click on a 'calibrate' button in the system settings/tablet  GUI.
3. The display fills with a unified color (or a grid), and shows:
    - Four 'targets' to click on their center, they look like a crosses, it must be precise. They usually appears step by step on the four corners.
    - A button to cancel calibration (Escape key on keyboard also cancel it). I also met the case with a 'timer' so the calibration cancel automatically if the four targets are not clicked within a time period. I'm not fan of it, because it put pressure on user to perform the calibration in a given time.
    - Sometime a button to restore default ( 0 calibration ).
    (see [3] [4] [5] )
Once calibration is done, these set of coordinate must also be applied to the "eraser" tip of the same stylus, because it is often a separate device requiring also the same parallax.

That's all, thank you for the work on Wayland!

Note: with Fedora 40 KDE Wayland only in the horyzon, I cross finger I'll can continue to use GNU/Linux for making my webcomic Pepper&Carrot. Being forced to become in exile for finding a distro with X11 just to configure my tablet or getting back to Windows because of Wayland would be so frustrating and devastating for my efforts of 100% FLOSS workflow over the last 14 years.

[1] https://www.davidrevoy.com/article993/review-of-a-new-tablet-soon
[2] https://www.davidrevoy.com/article999/current-workspace-setup
[3] https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/2043260534312/original/9V8rRXmG0w7bjlgA3UhpQreS0exVisLWqw.png?1632393352
[4] https://lh4.googleusercontent.com/-pVSVTIEy9lA/VNBYzOK5hnI/AAAAAAAA3FM/Jdrk6lCMrww/w490/Calibration%2B2.jpg
[5] https://storyart.education/wp-content/uploads/2016/08/Screen-Shot-2016-08-17-at-8.52.01-AM.png
Comment 1 Nicolas Fella 2023-11-14 11:55:45 UTC
On the backend/KWin side we expose a "calibration Matrix" property already, which I _think_ is all we need to make this work. 

In principle you could already set that via the InputDevice DBus interface, but that's not user-friendly at all. What we are lacking is the interactive GUI integration for it
Comment 2 Joshua Goins 2023-11-14 23:18:56 UTC
Implemented a working prototype, thanks for all of the information! I should be able to integrate it into the Tablet KCM before the feature freeze.
Comment 3 Bug Janitor Service 2023-11-15 23:06:54 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/1833