Bug 433045 - Tablet configuration does not exist in wayland
Summary: Tablet configuration does not exist in wayland
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR grave
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords: wayland
: 446523 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-02-17 06:28 UTC by Raghavendra kamath
Modified: 2022-08-10 05:49 UTC (History)
13 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.24
Sentry Crash Report:


Attachments
screenshot showing the express button on tablet (75.16 KB, image/png)
2022-06-27 16:46 UTC, Raghavendra kamath
Details
screenshot showing the button on stylus (63.96 KB, image/png)
2022-06-27 16:47 UTC, Raghavendra kamath
Details
screenshot showing the dialog box for remaping individual button (22.52 KB, image/png)
2022-06-27 16:48 UTC, Raghavendra kamath
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Raghavendra kamath 2021-02-17 06:28:10 UTC
SUMMARY
When I use plasma Wayland session tablet configuration KCM says - "Unsupported platform. Currently, only X11 is supported." 

STEPS TO REPRODUCE
1. Run plasma under Wayland
2. Open graphic tablet section under the input device section of system settings


OBSERVED RESULT
Can't configure tablet under Wayland which will be default in most distributions

EXPECTED RESULT
KCM should support tablet configuration under Wayland.

Operating System: Arch Linux
KDE Plasma Version: 5.20.5
KDE Frameworks Version: 5.79.0
Qt Version: 5.15.2
Kernel Version: 5.10.16-arch1-1
OS Type: 64-bit
Processors: 8 × Intel® Core™ i7-4790K CPU @ 4.00GHz
Memory: 31.3 GiB of RAM
Graphics Processor: GeForce GTX 750 Ti/PCIe/SSE2
Comment 1 Aitor 2021-03-16 22:10:16 UTC
*** This bug has been confirmed by popular vote. ***
Comment 2 Patrick Silva 2021-12-05 19:30:53 UTC
*** Bug 446523 has been marked as a duplicate of this bug. ***
Comment 3 Nate Graham 2021-12-14 14:34:24 UTC
A new skeleton graphics tablet KCM was just merged for Wayland in https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/677.

This is missing most of the features of the old KCM, which were inherently not Wayland compatible and will have to be re-added one-by-one to the new one. That'll be happening over time.
Comment 4 Raghavendra kamath 2021-12-15 04:48:43 UTC
I saw the new KCM and really thanks for adding it. But it is very bare minimum. Should I make separate bug report with request to add the settings in it?
Comment 5 Aleix Pol 2021-12-15 14:23:44 UTC
https://phabricator.kde.org/T14971 < we at least need the button assigning and mapping to a region on the screen.
Comment 6 Nate Graham 2021-12-15 15:06:11 UTC
Probably a good idea, yeah.
Comment 7 sveb 2022-02-26 18:04:54 UTC
Tablet area mapping is also needed.
Comment 8 Nicolas Fella 2022-06-27 13:52:06 UTC
How would button remapping look like? Map a button to a specific key (combination)?

There's an open MR to add button remapping for mouse, is that how it should work for tablets as well?
Comment 9 Raghavendra kamath 2022-06-27 16:46:40 UTC
Created attachment 150196 [details]
screenshot showing the express button on tablet

The current KCM for tablets under X11 is perfect and gives extensive options. This is great reference of how it should work and look. I am attaching screenshots of existing KCM for your  reference of remapping buttons on the tablet and also for remapping button of the stylus.
Comment 10 Raghavendra kamath 2022-06-27 16:47:23 UTC
Created attachment 150197 [details]
screenshot showing the button on stylus

This is the screenshot showing the buttons on the stylus
Comment 11 Raghavendra kamath 2022-06-27 16:48:41 UTC
Created attachment 150198 [details]
screenshot showing the dialog box for remaping individual button
Comment 12 Bug Janitor Service 2022-07-08 15:53:38 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/1025
Comment 13 Bug Janitor Service 2022-07-10 16:36:02 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/2627
Comment 14 Aleix Pol 2022-07-25 23:41:51 UTC
Git commit 27f24d144933ef1c0916ae18737a69ca274bfe8a by Aleix Pol Gonzalez, on behalf of Aleix Pol.
Committed on 25/07/2022 at 23:29.
Pushed by apol into branch 'master'.

input: Introduce a outputArea property for tablet devices

It's important for tablet devices to be able to specify to which section
of the display we'll be fitting the tablet. This setting allows to
specify this by providing some options that will do so relative to the
output size.

M  +20   -0    autotests/libinput/mock_libinput.cpp
M  +28   -2    src/backends/libinput/device.cpp
M  +11   -0    src/backends/libinput/device.h
M  +7    -0    src/backends/libinput/events.cpp
M  +1    -5    src/backends/libinput/events.h

https://invent.kde.org/plasma/kwin/commit/27f24d144933ef1c0916ae18737a69ca274bfe8a
Comment 15 Aleix Pol 2022-07-25 23:51:25 UTC
Git commit 5312497e47e64ec95e2265f5899e784c65026597 by Aleix Pol Gonzalez, on behalf of Aleix Pol.
Committed on 25/07/2022 at 23:29.
Pushed by apol into branch 'master'.

tablet: Make it possible to specify how a tablet maps to an output

M  +11   -2    kcms/tablet/inputdevice.cpp
M  +19   -0    kcms/tablet/inputdevice.h
M  +24   -2    kcms/tablet/kcmtablet.cpp
A  +75   -0    kcms/tablet/package/contents/ui/Output.qml     [License: GPL(v2.0+)]
M  +144  -12   kcms/tablet/package/contents/ui/main.qml

https://invent.kde.org/plasma/plasma-desktop/commit/5312497e47e64ec95e2265f5899e784c65026597
Comment 16 Raghavendra kamath 2022-07-31 04:38:21 UTC
@Aleix Pol thanks for the recent feature of mapping the portion of the screen to tablet. Is mapping a portion of the tablet to target screen possible with this MR? Because that is more important than mapping portion of screen to entire tablet area. More often the screen aspect ratio is different than the tablet area aspect ratio and when drawing a perfect circle we get an egg shape
Comment 17 Aleix Pol 2022-07-31 18:03:51 UTC
Please try it.
Comment 18 Chris 2022-08-03 02:33:15 UTC
(In reply to Raghavendra kamath from comment #10)
> Created attachment 150197 [details]
> screenshot showing the button on stylus
> 
> This is the screenshot showing the buttons on the stylus

I'm using a tablet-pc with a wacom digitizer and a wacom compatible stylus salvaged from lenovo helix gen 2, meaning nothing could be more plain in this setting. Everything is working great, including using `libinput debug-events` I can see I have a `TABLET_TOOL_BUTTON`. (Hum, to clarify, this event is sent when I use the pen/stylus button.)
The system is pure wayland debian unstable. I haven't installed sddm because it's pulling x11.
Anyway, the tablet-pc is displaying some degree of usability.
But often I get stuck, and often a "right mouse click" could fix that.
In the past, with x11, I've associated the pen button, aka "TABLET_TOOL_BUTTON", with mouse-right-click, and it was very convenient.
Often a mouse right click is what gets you a contextual menu and that can get you out of a tight spot.
So that would be the first thing I would like to see implemented in system settings tablet configuration.
Because that could make the difference between working and not working for tablet-pc.
Comment 19 Raghavendra kamath 2022-08-04 11:52:00 UTC
(In reply to Aleix Pol from comment #17)
> Please try it.

Hi  Aleix,

I tried the tablet configuration page in the KCM, the problem of the aspect ratio is solved by the second option in the dropdown I think it is  "Fit output in tablet". I would prefer this to be the default option.
However these are some of my observation.

1 - the cursor when using graphic tablet is a + cursor and not the regular arrow cursor of breeze.
2 - The drag to resize handle to adjust custom area doesn't work properly with the tablet as well as mouse. For me it only worked if I dragged horizontally and not vertically. When I tried to drag in diagonally to reduce the area of the screen it scrolled the whole page.

3 - There is only way to draw active on the screen to be used by entire tablet surface and there is no way (at-least visually) to draw or select an area of the tablet to be mapped to entire screen. This is use case is much more prevalent than mapping a portion of screen to entire tablet surface.
Comment 20 Naomi Calabretta 2022-08-05 19:41:46 UTC
Just a heads up for this issue which affects tablet configuration and it is nerve wracking: https://bugs.kde.org/show_bug.cgi?id=450874
Comment 21 Aleix Pol 2022-08-06 23:37:27 UTC
Please open separate issues for anything that isn't strictly "missing features on the configuration module".

There's no way we can keep track of it all in here.
Comment 22 Naomi Calabretta 2022-08-06 23:57:48 UTC
> Please open separate issues for anything that isn't strictly "missing
> features on the configuration module".

It is a separate issue, but it also is a missing feature of the configuration module. I see no "map to all available outputs" option in kcm_tablet, and I see no other way of bypassing it for certain input devices. I am only bringing this here in the hopes a switch / checkbox / something that accounts for that issue can be made as a feature in kcm_tablet.
Comment 23 Nate Graham 2022-08-08 15:30:34 UTC
Let's get new bug reports for new bugs/feature requests for the new KCM.
Comment 24 Chris 2022-08-08 17:09:57 UTC
(In reply to Nate Graham from comment #23)
> Let's get new bug reports for new bugs/feature requests for the new KCM.

I've created bug 457636, regarding configuration of stylus buttons.
Comment 25 Raghavendra kamath 2022-08-10 05:49:52 UTC
A bug report for not being able to select tablet surface area to map to entire screen area - https://bugs.kde.org/show_bug.cgi?id=457703