Bug 500025 - Touch/tablet mode always disabled by buttonrebinds plugin
Summary: Touch/tablet mode always disabled by buttonrebinds plugin
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: input (show other bugs)
Version: 6.3.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2025-02-13 20:46 UTC by tobi291019
Modified: 2025-02-19 21:40 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tobi291019 2025-02-13 20:46:32 UTC
SUMMARY
Setting touch mode to automatic results in it being always disabled since 6.3.0. Automatic orientation no longer works when restricted to tablet mode and UI elements no longer increase in size when disconnecting the "pointer" device (mouse or touchpad).

STEPS TO REPRODUCE
1. Set touch mode to "automatically enable as needed"
2. Have a device with a touchscreen, but no mouse or touchpad
3. Query org.kde.KWin.TabletModeManager tabletMode property on D-Bus, it always returns false
4. Unload the buttonrebinds plugin (e.g. using D-Bus)
5. tabletMode should return true

OBSERVED RESULT
tabletMode always is false and display orientation as well as UI elements stay in non touch mode. Once the buttonrebinds plugin is unloaded, everything works as expected.

EXPECTED RESULT
tabletMode returns true once mouse and touchpad are disconnected, even if the buttonrebinds plugin is loaded.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.3.0
KDE Frameworks Version: 6.10.0
Qt Version: 6.8.2
Kernel Version: 6.13.2-zen1-1-zen (64-bit)
Graphics Platform: Wayland
Processors: 4 × Intel® Core™ i7-7500U CPU @ 2.70GHz
Memory: 7.5 GiB of RAM
Graphics Processor: Intel® HD Graphics 620
Manufacturer: Acer
Product Name: Switch SW512-52
System Version: V1.08

ADDITIONAL INFORMATION
The buttonrebinds device now counts as a pointer device in 6.3.0, but is not ignored by shouldIgnoreDevice in tabletmodemanager.cpp.

My device specifically has no built-in tablet mode switch and instead relies on the cover keyboard (which contains a touchpad) physically disconnecting, meaning kwin used to switch based on any pointer device existing.
Comment 1 Bug Janitor Service 2025-02-19 15:11:59 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/7198
Comment 2 Vlad Zahorodnii 2025-02-19 17:42:58 UTC
Git commit 72c841e743487fbbe14f6ee7267ef739db442f41 by Vlad Zahorodnii.
Committed on 19/02/2025 at 17:26.
Pushed by vladz into branch 'master'.

Prevent virtual input devices from blocking tablet mode

Let only physical input devices block the tablet mode. If more input
devices need to block the tablet mode, we can look into adding generic
tags in the InputDevice.

M  +11   -17   src/tabletmodemanager.cpp

https://invent.kde.org/plasma/kwin/-/commit/72c841e743487fbbe14f6ee7267ef739db442f41
Comment 3 Vlad Zahorodnii 2025-02-19 18:03:19 UTC
Git commit f16c06d1d45fe3a58d0c3540ac1b0355047dd990 by Vlad Zahorodnii.
Committed on 19/02/2025 at 17:49.
Pushed by vladz into branch 'Plasma/6.3'.

Prevent virtual input devices from blocking tablet mode

Let only physical input devices block the tablet mode. If more input
devices need to block the tablet mode, we can look into adding generic
tags in the InputDevice.


(cherry picked from commit 72c841e743487fbbe14f6ee7267ef739db442f41)

Co-authored-by: Vlad Zahorodnii <vlad.zahorodnii@kde.org>

M  +11   -17   src/tabletmodemanager.cpp

https://invent.kde.org/plasma/kwin/-/commit/f16c06d1d45fe3a58d0c3540ac1b0355047dd990