Bug 408943 - KWin-on-libinput ignores keyboard KCM settings; uses default repeat delay/rate
Summary: KWin-on-libinput ignores keyboard KCM settings; uses default repeat delay/rate
Alias: None
Product: kwin
Classification: Plasma
Component: libinput (show other bugs)
Version: git master
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
Keywords: wayland
: 409536 410628 450319 (view as bug list)
Depends on:
Reported: 2019-06-20 07:40 UTC by Sam Edwards
Modified: 2022-09-17 20:04 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.26


Note You need to log in before you can comment on or make changes to this bug.
Description Sam Edwards 2019-06-20 07:40:24 UTC
Forgive me for deviating from the usual template; I have already tracked this one down, just need a second pair of eyes to confirm it.

In input.cpp, within the InputRedirection::reconfigure function, kwin looks for a section in the kcminputrc called "keyboard" (small 'k'). However, the keyboard KCM actually calls this section "Keyboard" (big 'K'). As a result, when KWin takes this codepath, it will fail to find the user's preferences and instead use the hardcoded default keyboard repeat settings (enabled, 25 repeats/s, 660 ms repeat delay).

This can be reproduced by trying to disable keyboard repeat using the keyboard KCM, then holding down a key in libinput-enabled kwin_wayland to find that it doesn't respect the KCM's settings.

On my local system, I'm applying a patch to change the string in question from "keyboard" to "Keyboard" and the issue goes away for me.
Comment 1 Vlad Zahorodnii 2019-06-20 12:30:27 UTC
Can you submit that patch to Phabricator?

Comment 2 Patrick Silva 2019-07-08 15:59:49 UTC
*** Bug 409536 has been marked as a duplicate of this bug. ***
Comment 3 Vlad Zahorodnii 2019-07-08 18:02:59 UTC
@Sam Do you need help with submitting the patch?
Comment 4 Nate Graham 2019-07-10 23:14:00 UTC
Git commit 3b0f704e3b90b723a8516ce3fbff9bd18e2b11cf by Nate Graham, on behalf of Sam Edwards.
Committed on 10/07/2019 at 23:13.
Pushed by ngraham into branch 'Plasma/5.16'.

Fix case-sensitivity typo in libinput configuration function

This fixes the bug where KWin-on-Wayland doesn't respect keyboard repeat settings
FIXED-IN: 5.16.4

Test Plan:
1. Start Wayland session
2. Open Wayland KCM and note the keyboard repeat/rate/delay
3. Go to keyboard preferences KCM and adjust the keyboard repeat/rate/delay
4. Open the Wayland KCM again and verify the keyboard repeat/rate/delay adjustments (it may be necessary to restart the Wayland session before this step)

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

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

M  +1    -1    input.cpp

Comment 5 Patrick Silva 2019-07-30 18:16:26 UTC
Rate setting is still not working after update to plasma 5.16.4 on Arch Linux
even after relogin.

Operating System: Arch Linux 
KDE Plasma Version: 5.16.4
KDE Frameworks Version: 5.60.0
Qt Version: 5.13.0
Comment 6 Christoph Feck 2019-08-05 19:09:40 UTC
Patrick, either reopen, or create a new ticket. Comments on closed bugs rarely get seen.
Comment 7 Nate Graham 2019-08-06 17:20:44 UTC
*** Bug 410628 has been marked as a duplicate of this bug. ***
Comment 8 soredake 2020-08-09 14:34:11 UTC
Kubuntu 20.04, rate settings still not working.
Comment 9 David Edmundson 2020-08-09 15:10:20 UTC
>Rate setting is still not working after update to plasma 5.16.4 on Arch Linux
even after relogin.

Please set to something non standard and include output of

WAYLAND_DEBUG=1 qtdiag |& grep keyboard
Comment 10 Patrick Silva 2020-08-09 15:45:38 UTC
output on neon unstable

[3068071,334] wl_registry@2.global(3, "zwp_keyboard_shortcuts_inhibit_manager_v1", 1)
[3068072,417]  -> wl_seat@6.get_keyboard(new id wl_keyboard@3)
[3068073,268] wl_keyboard@3.repeat_info(25, 600)
[3068073,292] wl_keyboard@3.keymap(1, fd 4, 53810)
[3068107,012] wl_registry@12.global(3, "zwp_keyboard_shortcuts_inhibit_manager_v1", 1)
[3068116,561] wl_registry@21.global(3, "zwp_keyboard_shortcuts_inhibit_manager_v1", 1)
  keyboardInputInterval: 400
  keyboardAutoRepeatRate: 30
[3068207,640]  -> wl_keyboard@3.release()
Comment 11 David Edmundson 2020-08-10 08:29:47 UTC
urgh, indeed.
Comment 12 Vlad Zahorodnii 2022-09-12 09:09:28 UTC
This should be fixed
Comment 13 Prajna Sariputra 2022-09-12 11:22:56 UTC
> This should be fixed

As in on git master I assume? It still happens to me on Plasma 5.25.5 (more system info below).

Operating System: Arch Linux
KDE Plasma Version: 5.25.5
KDE Frameworks Version: 5.97.0
Qt Version: 5.15.6
Kernel Version: 5.19.7-arch1-1 (64-bit)
Graphics Platform: Wayland
Comment 14 Vlad Zahorodnii 2022-09-12 12:18:11 UTC
Hmm, maybe not then. At least I remember adding code that makes kwin process key repeat settings.
Comment 15 Bug Janitor Service 2022-09-12 12:31:01 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/1140
Comment 16 Vlad Zahorodnii 2022-09-12 12:41:03 UTC
Git commit 3c880f6c941b946d15a4245c8feef2c4f3e0de8d by Vlad Zahorodnii.
Committed on 12/09/2022 at 12:38.
Pushed by vladz into branch 'master'.

kcms/keyboard: Fix Notifiers field for KeyRepeat,RepeatDelay,RepeateRate options

KeyRepeat, RepeatDelay, and RepeateRate have custom names. We need to
specify those names in the Notifiers field otherwise kconfig source
generator won't generate relevant notification code.

M  +1    -1    kcms/keyboard/keyboardmiscsettings.kcfgc

Comment 17 Patrick Silva 2022-09-17 19:58:30 UTC
*** Bug 450319 has been marked as a duplicate of this bug. ***