Bug 349545 - Disable touchpad when mouse is plugged in, never re-enables when mouse is unplugged
Summary: Disable touchpad when mouse is plugged in, never re-enables when mouse is unp...
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_touchpad (show other bugs)
Version: 5.17.5
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
: 360372 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-06-23 20:09 UTC by Rex Dieter
Modified: 2020-01-22 21:36 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rex Dieter 2015-06-23 20:09:57 UTC
Summary says it all.  Trying to use the "Disable touchpad when mouse is plugged in" feature, which works well for disabilng touchpad when a mouse is plugged in.

My expectation was that the touchpad would re-enable itself when I unplugged my mouse, except that never happens.  The touchpad stays disabled.

Is that an invalid expectation or just a bug?

Either way, can it be fixed? :)


Reproducible: Always
Comment 1 Rex Dieter 2015-06-23 20:10:27 UTC
I tested and verified this behavior using both libinput and synaptics backends.
Comment 2 Weng Xuetian 2015-12-25 19:03:44 UTC
(In reply to Rex Dieter from comment #1)
> I tested and verified this behavior using both libinput and synaptics
> backends.

I have a review that may fix this bug: https://git.reviewboard.kde.org/r/126513/
Comment 3 Weng Xuetian 2016-01-11 20:54:16 UTC
Git commit a39677c1fd1e6303ddaf31da5ccd0a6454104066 by Weng Xuetian.
Committed on 11/01/2016 at 20:38.
Pushed by xuetianweng into branch 'master'.

Refactor kcm touchpad to fix some issue related to hotplug touchpad

1. Remove SynapticsBackend and LibinputBackend and add three new classes
called XlibTouchpad/SynapticsTouchpad/LibinputTouchpad. So findTouchpad
may pick up both synaptics or libinput device, and no need to depend on
a fixed backend. This change also make it easier to support multiple
touchpad device easier if needed.

2. hotplug touchpad config not being applied (bug 356923) is mainly
because one can't apply settings to a disabled device. Change the
statement order in handleReset, apply settings first then set enable
status.

3. findTouchpad() is changed to use XListInputDevices, because it
provides necessary information of device type in order to filter
out non-touchpad device. xf86-input-libinput doesn't have a
unique atom for touchpad, so current identityAtom cannot
guarantee that findTouchpad always returns a touchpad device for
libinput.

4. On my surface pro 4 system, if touchpad is unpluged, the device will
be set to disabled automatically first, then touchpadDetached is called,
which makes m_enabled in TouchpadDisabled always to be false after
unplug the touchapd. This patch makes TouchpadDisabler have two
different enabled property. m_userRequestedState only stores the user
requested status, so when handleReset is called, it can properly set
enabled state to the last user requested state.

REVIEW: 126513
Related: bug 356923
FIXED-IN: 5.6.0

M  +2    -2    kcms/touchpad/src/applet/qml/contents/ui/touchpad.qml
M  +7    -6    kcms/touchpad/src/applet/touchpadengine.cpp
M  +1    -0    kcms/touchpad/src/applet/touchpadengine.h
M  +5    -3    kcms/touchpad/src/backends/x11.cmake
R  +28   -2    kcms/touchpad/src/backends/x11/libinputtouchpad.cpp [from: kcms/touchpad/src/backends/x11/libinputproperties.c - 059% similarity]
C  +7    -22   kcms/touchpad/src/backends/x11/libinputtouchpad.h [from: kcms/touchpad/src/applet/touchpadengine.h - 055% similarity]
A  +90   -0    kcms/touchpad/src/backends/x11/propertyinfo.cpp     [License: GPL (v2+)]
C  +23   -18   kcms/touchpad/src/backends/x11/propertyinfo.h [from: kcms/touchpad/src/applet/touchpadengine.h - 060% similarity]
R  +178  -69   kcms/touchpad/src/backends/x11/synapticstouchpad.cpp [from: kcms/touchpad/src/backends/x11/synclientproperties.c - 053% similarity]
C  +12   -20   kcms/touchpad/src/backends/x11/synapticstouchpad.h [from: kcms/touchpad/src/applet/touchpadengine.h - 056% similarity]
D  +0    -71   kcms/touchpad/src/backends/x11/synclientproperties.h
M  +79   -557  kcms/touchpad/src/backends/x11/xlibbackend.cpp
M  +20   -30   kcms/touchpad/src/backends/x11/xlibbackend.h
A  +292  -0    kcms/touchpad/src/backends/x11/xlibtouchpad.cpp     [License: UNKNOWN]  *
A  +88   -0    kcms/touchpad/src/backends/x11/xlibtouchpad.h     [License: GPL (v2+)]
M  +39   -13   kcms/touchpad/src/kded/kded.cpp
M  +5    -1    kcms/touchpad/src/kded/kded.h
M  +2    -1    kcms/touchpad/src/touchpadbackend.h

The files marked with a * at the end have a non valid license. Please read: http://techbase.kde.org/Policies/Licensing_Policy and use the headers which are listed at that page.


http://commits.kde.org/plasma-desktop/a39677c1fd1e6303ddaf31da5ccd0a6454104066
Comment 4 Rajeesh K V 2016-03-11 20:15:52 UTC
*** Bug 360372 has been marked as a duplicate of this bug. ***
Comment 5 jose luis m 2016-05-16 08:25:04 UTC
This problem isn't fixed for everybody, in my system ,re-enable the touchpad once a mouse gets disconnected never worked. Not now , not before. I'm in Arch linux using:
Touchpad  KCM version 5.6.4  
KDE Frameworks 5.21.0
Qt 5.6.0 (built against 5.6.0)
Comment 6 Weng Xuetian 2016-05-17 01:34:56 UTC
(In reply to jose luis m from comment #5)
> This problem isn't fixed for everybody, in my system ,re-enable the touchpad
> once a mouse gets disconnected never worked. Not now , not before. I'm in
> Arch linux using:
> Touchpad  KCM version 5.6.4  
> KDE Frameworks 5.21.0
> Qt 5.6.0 (built against 5.6.0)

I just tried it and it worked for me. You'd probably want to blacklist some of your usb device in kcm.