Bug 361743 - kded_wacomtablet does detect when a tablet is disconnected/reconnected
Summary: kded_wacomtablet does detect when a tablet is disconnected/reconnected
Status: RESOLVED FIXED
Alias: None
Product: wacomtablet
Classification: Plasma
Component: general (show other bugs)
Version: unspecified
Platform: Debian unstable Linux
: NOR normal
Target Milestone: ---
Assignee: Valerii Malov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-14 00:31 UTC by onitake
Modified: 2018-01-02 19:11 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description onitake 2016-04-14 00:31:26 UTC
When disconnecting/reconnecting a tablet (a Wacom Bamboo Create in both wired and wireless mode), kded_wacomtablet does not automatically detect the change and switch profiles or set parameters.
Only when restarting kded5, redetection is performed.

Reproducible: Always

Steps to Reproduce:
1. Disconnect tablet
2. Start kded5
3. Connect tablet
4. Open KDE System Settings -> Input Devices -> Graphic Tablet

Actual Results:  
kcm_wacomtablet reports that not tablet was detected, and parameters (like touch on/off, sensitivity, button mappings, etc.) are not set

Expected Results:  
kcm_wacomtablet correctly reflects the state of the tablet connection and all parameters of the last session are restored.
Comment 1 Fabian Vogt 2017-12-30 23:09:21 UTC
I just hit the same issue.
Unloading and loading the kded module again causes the tablet to be detected.
Comment 2 Fabian Vogt 2017-12-31 00:12:34 UTC
This was indeed due to libxcb being built without --enable-xinput (although I could swear it was in the past...).

However, as xcb-input is apparently not widely available, re-enabling the Xlib detection is probably the best option - it looks like the keyboard kded module has a workaround: https://github.com/KDE/plasma-desktop/blob/44051d03232e11ceb7e2b0567662a638caf16156/kcms/keyboard/xinput_helper.cpp
Comment 3 Fabian Vogt 2018-01-02 19:11:29 UTC
Git commit 17d5878d56da3384b29cc5aa13f11af8576776dc by Fabian Vogt.
Committed on 02/01/2018 at 19:11.
Pushed by fvogt into branch 'master'.

Implement hotplugging on Xlib

Summary:
Register for events using Xlib and read them using Xcb.
This is a mixture of the method used in
qtbase/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
and plasma-desktop's ca7618dd6173db8a8f0e36d91a38a1d4ac7d0706

Test Plan:
Restarted kded after make install, plugging and unplugging
causes notifications.

Reviewers: valeriymalov

Reviewed By: valeriymalov

Subscribers: valeriymalov

Differential Revision: https://phabricator.kde.org/D9576

M  +1    -1    CMakeLists.txt
M  +75   -27   src/kded/x11eventnotifier-xlib.cpp

https://commits.kde.org/wacomtablet/17d5878d56da3384b29cc5aa13f11af8576776dc