Bug 449843

Summary: Can't save any configuration any more because "Apply" button isn't activated after changing anything (X11 mode)
Product: [Applications] systemsettings Reporter: Andreas Hartmann <andihartmann>
Component: kcm_touchpadAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: eoinlane92, fabian, loganturner547, nate, nicolas.fella, pill.pt.time
Priority: VHI Keywords: regression
Version: 5.24.0   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In: 5.24.3
Sentry Crash Report:

Description Andreas Hartmann 2022-02-09 12:20:29 UTC
SUMMARY
It's impossible to save any change in system configuration -> touchpad configuration, because the "Apply" button isn't activated.

STEPS TO REPRODUCE
1. Start systemsettings
2. Go to Hardware -> Input devices
3.  Go to Touchpad
4. Use first tab and change 2 finger mode to middle mouse key. 
5. You could try to change any other parameter in any other tab. The apply button never gets activated.

OBSERVED RESULT
Apply button is not activated

EXPECTED RESULT
Apply button must be activated

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 5.24.0
KDE Frameworks Version: 5.90.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
Comment 1 Andreas Hartmann 2022-02-09 16:32:29 UTC
Reverting to 5.23.5 makes it working again.
Comment 2 Nicolas Fella 2022-02-10 23:15:25 UTC
*** Bug 449978 has been marked as a duplicate of this bug. ***
Comment 3 Nate Graham 2022-02-11 22:37:44 UTC
Cannot reproduce on Wayland, must be X11-specific.
Comment 4 Nicolas Fella 2022-02-11 22:40:20 UTC
I cannot reproduce on X11 either
Comment 5 Andreas Hartmann 2022-02-12 06:49:37 UTC
Doesn't work with Wayland, either (regardless if amd or nvidia). 

BTW: I even tested with a fresh account (no existing historic configuration before - same problem).

Can you say how to debug the problem?
Comment 6 Andreas Hartmann 2022-02-12 07:19:54 UTC
Maybe you could provide some debug output to the source code to narrow down, where the problem happens? I'm able to recompile https://ftp.lysator.liu.se/pub/opensuse/repositories/KDE:/Frameworks5/openSUSE_Leap_15.3/src/plasma5-desktop-5.24.0-lp153.504.2.src.rpm and may add the debug output before ... .
Comment 7 Carlos Pinto 2022-02-12 23:41:32 UTC
I'm also on 5.24.0 and have the same problem, on both Wayland and X11.
However, doing `kcmshell5 kcm_touchpad` in a terminal and configuring the touchpad in the window it opens, the 'Apply' button works.
Comment 8 Andreas Hartmann 2022-02-13 07:04:12 UTC
I already tested the "konsole" workaround you described - doesn't work here either. Anyway I sometimes could see differences between start via konsole and start via icon in start menu: the two radio options for 2 finger tipping (right click or middle click) are often disabled when starting from start menu - after it has been started via konsole, they are active.
If started from konsole, I'm getting the following debug output:

~> systemsettings kcm_touchpad
kf.configwidgets: A widget named ' "kcfg_osdKbdLayoutChangedEnabled" ' was found but there is no setting named ' "osdKbdLayoutChangedEnabled" '
kf.configwidgets: A widget named ' "kcfg_repeatRate" ' was found but there is no setting named ' "repeatRate" '
kf.configwidgets: A widget named ' "kcfg_repeatDelay" ' was found but there is no setting named ' "repeatDelay" '
kf.configwidgets: A widget named ' "kcfg_resetOldXkbOptions" ' was found but there is no setting named ' "resetOldXkbOptions" '
kf.configwidgets: A widget named ' "kcfg_configureLayouts" ' was found but there is no setting named ' "configureLayouts" '
kf.configwidgets: A widget named ' "kcfg_repeatRate" ' was found but there is no setting named ' "repeatRate" '
kf.configwidgets: A widget named ' "kcfg_repeatDelay" ' was found but there is no setting named ' "repeatDelay" '
kcm_touchpad: Using X11 backend
qml: Touchpad configuration of device '1 : ELAN1200:00 04F3:30BA Touchpad' opened
file:///usr/lib64/qt5/qml/org/kde/kirigami.2/FormLayout.qml:283:9: QML QQuickItem* (parent or ancestor of QQuickLayoutAttached): Binding loop detected for property "preferredWidth"
qrc:/libinput/touchpad.qml:108:5: QML FormLayout: Binding loop detected for property "implicitHeight"
Comment 9 Patrick Silva 2022-02-15 11:06:20 UTC
*** Bug 450293 has been marked as a duplicate of this bug. ***
Comment 10 Fabian Vogt 2022-02-24 20:06:13 UTC
There's a weird "Q_EMIT changed(false);" in "TouchpadConfigContainer::resizeEvent", which would disable the Apply button on resizes.

Can you set a breakpoint on KCModule::changed(bool) and for each call get the argument value as well as a backtrace?
Comment 11 Bug Janitor Service 2022-02-24 20:31:09 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/852
Comment 12 Fabian Vogt 2022-02-24 21:05:22 UTC
Git commit 369eab6457965de99119f9966a009f98a60745bc by Fabian Vogt.
Committed on 24/02/2022 at 20:25.
Pushed by fvogt into branch 'master'.

kcms/touchpad: Remove weird Q_EMIT changed(false) in resizeEvent

That looks rather out of place there and does actually disable the apply button
when resizing the window. I don't understand what it's supposed to be doing
there, but if it has an actual purpose it needs to be addressed differently.

M  +0    -1    kcms/touchpad/kcm/touchpadconfigcontainer.cpp

https://invent.kde.org/plasma/plasma-desktop/commit/369eab6457965de99119f9966a009f98a60745bc
Comment 13 Fabian Vogt 2022-02-24 21:05:47 UTC
Git commit 5cf2788fdd18cb8604fd172535b044c6cfd370fc by Fabian Vogt.
Committed on 24/02/2022 at 21:05.
Pushed by fvogt into branch 'Plasma/5.24'.

kcms/touchpad: Remove weird Q_EMIT changed(false) in resizeEvent

That looks rather out of place there and does actually disable the apply button
when resizing the window. I don't understand what it's supposed to be doing
there, but if it has an actual purpose it needs to be addressed differently.


(cherry picked from commit 369eab6457965de99119f9966a009f98a60745bc)

M  +0    -1    kcms/touchpad/kcm/touchpadconfigcontainer.cpp

https://invent.kde.org/plasma/plasma-desktop/commit/5cf2788fdd18cb8604fd172535b044c6cfd370fc
Comment 14 Andreas Hartmann 2022-02-24 22:35:08 UTC
The proposed patch fixes the problem of not activated apply button for me. I tested against 5.24.2.