Bug 500124 - KWin overrides drawing tablet orientation configuration whenever adding a tablet
Summary: KWin overrides drawing tablet orientation configuration whenever adding a tablet
Status: CONFIRMED
Alias: None
Product: kwin
Classification: Plasma
Component: libinput (other bugs)
Version First Reported In: 6.3.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-02-15 12:07 UTC by Arsen Arsenović
Modified: 2025-09-16 16:52 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Arsen Arsenović 2025-02-15 12:07:06 UTC
SUMMARY
After plugging in a drawing tablet, KWin loads its configuration, applies its orientation, but then, shortly after, calls Connection::applyScreenToDevice, which does device->setOrientation(Qt::PrimaryOrientation), thereby overriding the previously read orientation config.

My tablet is not a display tablet, so its orientation is not tied to a display.  I have it rotated so that it fits on my desk better.  I suspect the call above is not really applicable for drawing tablets without screens in them.

I've used GDB to narrow down that the applyDeviceConfig and applyScreenToDevice calls in processEvents' LIBINPUT_EVENT_DEVICE_ADDED case set the correct orientation (the one in the config file) and reset the orientation, respectively, in kwin/src/backends/libinput/connection.cpp.

STEPS TO REPRODUCE
1. Plug in a tablet
2. Set its orientation to something other than PrimaryOrientation
3. Unplug and plug the tablet back in
4. Observe the orientation

OBSERVED RESULT
Orientation is reverted to default

EXPECTED RESULT
Orientation is kept as what I set it

SOFTWARE/OS VERSIONS
Operating System: Gentoo Linux 2.17
KDE Plasma Version: 6.3.0
KDE Frameworks Version: 6.10.0
Qt Version: 6.8.2
Kernel Version: 6.6.74-gentoo-dist (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 3800X 8-Core Processor
Memory: 62.7 GiB of RAM
Graphics Processor: AMD Radeon RX 6700 XT

ADDITIONAL INFORMATION
The tablet is a One by Wacom CTL-672, but I doubt this is relevant.