Bug 474606 - Keyboard input doesn't work under Wayland
Summary: Keyboard input doesn't work under Wayland
Status: RESOLVED DOWNSTREAM
Alias: None
Product: kwin
Classification: Plasma
Component: input (other bugs)
Version First Reported In: 5.27.8
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: wayland-only
: 476741 (view as bug list)
Depends on:
Blocks:
 
Reported: 2023-09-17 09:12 UTC by Riccardo Robecchi
Modified: 2024-03-13 10:43 UTC (History)
5 users (show)

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


Attachments
kwinrc (5.07 KB, text/plain)
2023-12-10 23:15 UTC, Riccardo Robecchi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Riccardo Robecchi 2023-09-17 09:12:38 UTC
SUMMARY
As the title says, on my computer keyboard input simply doesn't work under Wayland. Key presses appear to simply not be registered by any application.

STEPS TO REPRODUCE
1. Log in
2. ?

OBSERVED RESULT
Keyboard input doesn't work.

EXPECTED RESULT
Keyboard input works.

SOFTWARE/OS VERSIONS
Linux: KDE neon
KDE Plasma Version: 5.27.7
KDE Frameworks Version: 5.109.0
Qt Version: 5.15.10

ADDITIONAL INFORMATION
I realise this is very generic, but I have no clue as to what the cause may be nor how to find it, so please bear with me.
Comment 1 Riccardo Robecchi 2023-09-17 09:18:06 UTC
As requested in bug 467744, IBus seems not to be active, though it is installed. I do not recall disabling it, though I may have done so at some point in the past (and this goes back to the impossibility of simply disabling autostart entries in the autostart KCM instead of deleting them entirely, as one easily loses track of what's going on).
Comment 2 Nate Graham 2023-09-18 18:29:41 UTC
Is this a laptop or a desktop?
Comment 3 Riccardo Robecchi 2023-09-19 08:12:35 UTC
This is desktop.
Comment 4 Nate Graham 2023-09-19 15:56:58 UTC
Any chance you can try a different keyboard? Or, if you can, does it affect *all* keyboards you use?
Comment 5 Riccardo Robecchi 2023-09-20 07:45:44 UTC
It's not related to the specific keyboard as it seems to affect all of them.
Comment 6 Nate Graham 2023-09-20 17:37:19 UTC
How odd. Let me ask some KWin devs and see what they say.
Comment 7 Zamundaaa 2023-09-20 17:52:46 UTC
There's two things I can think of that we should look at.

First, please start the Wayland session, log out again and then attach the output of `journalctl --user-unit plasma-kwin_wayland --boot 0` from the X11 session here.

Second, make sure you have Maliit installed. Then put KWIN_IM_SHOW_ALWAYS=1 into /etc/environment, start the Wayland session again and select Maliit in system settings > input devices > virtual keyboard. Now you should have a virtual keyboard you can operate with the mouse; with that you can run "sudo libinput debug-events" in konsole.
When you now press keys on your physical keyboard, does libinput print events about it?
Comment 8 Bug Janitor Service 2023-10-05 03:46:30 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 9 Riccardo Robecchi 2023-10-07 16:03:32 UTC
Sorry for making you wait, I was away. libinput appears to correctly register key presses and releases. In fact, using shortcuts (e.g. alt+tab) does work. The issue is with input into any text field.
It looks as if the text field becomes unfocused, so the keyboard input doesn't work. In fact, in Plasma dialogues that seems to be exactly what happens, as the "halo" around the text field (e.g. in the dialogue to input the sudo password) disappears and doesn't come back even if I click in there again.
One weird thing I have noticed and which might be related is this: I opened Konsole to test keyboard input, it wouldn't work so I clicked on a random point in Konsole's window; after that point, every other click would highlight the lines between the first point I had clicked and the more recent one. In other words, it's as if the click got stuck.

Here is the output of journalctl:
ott 07 16:40:04 Wotan systemd[4959]: Starting KDE Window Manager...
ott 07 16:40:04 Wotan systemd[4959]: Started KDE Window Manager.
ott 07 16:40:05 Wotan kwin_wayland[5141]: No backend specified, automatically choosing drm
ott 07 16:40:05 Wotan kwin_wayland[5141]: kf.globalaccel.kglobalacceld: No desktop file found for service  "nvidia x server settings.desktop"
ott 07 16:40:05 Wotan kwin_wayland[5141]: OpenGL vendor string:                   AMD
ott 07 16:40:05 Wotan kwin_wayland[5141]: OpenGL renderer string:                 AMD Radeon RX 5700 XT (navi10, LLVM 15.0.7, DRM 3.54, 6.5.5-x64v3-xanmod1)
ott 07 16:40:05 Wotan kwin_wayland[5141]: OpenGL version string:                  4.6 (Core Profile) Mesa 23.0.4-0ubuntu1~22.04.1
ott 07 16:40:05 Wotan kwin_wayland[5141]: OpenGL shading language version string: 4.60
ott 07 16:40:05 Wotan kwin_wayland[5141]: Driver:                                 Unknown
ott 07 16:40:05 Wotan kwin_wayland[5141]: GPU class:                              Unknown
ott 07 16:40:05 Wotan kwin_wayland[5141]: OpenGL version:                         4.6
ott 07 16:40:05 Wotan kwin_wayland[5141]: GLSL version:                           4.60
ott 07 16:40:05 Wotan kwin_wayland[5141]: Mesa version:                           23.0.4
ott 07 16:40:05 Wotan kwin_wayland[5141]: Linux kernel version:                   6.5.5
ott 07 16:40:05 Wotan kwin_wayland[5141]: Requires strict binding:                no
ott 07 16:40:05 Wotan kwin_wayland[5141]: GLSL shaders:                           yes
ott 07 16:40:05 Wotan kwin_wayland[5141]: Texture NPOT support:                   yes
ott 07 16:40:05 Wotan kwin_wayland[5141]: Virtual Machine:                        no
ott 07 16:40:05 Wotan kwin_wayland_wrapper[5311]: (WW) Option "-listen" for file descriptors is deprecated
ott 07 16:40:05 Wotan kwin_wayland_wrapper[5311]: Please use "-listenfd" instead.
ott 07 16:40:05 Wotan kwin_wayland_wrapper[5311]: (WW) Option "-listen" for file descriptors is deprecated
ott 07 16:40:05 Wotan kwin_wayland_wrapper[5311]: Please use "-listenfd" instead.
ott 07 16:40:07 Wotan kwin_wayland[5141]: kwin_scripting: /home/riccardo/.local/share/kwin/scripts/gamemode/contents/code/main.js:56: error: Cannot call method 'connect' of undefined
ott 07 16:40:07 Wotan kwin_wayland_wrapper[5360]: The XKEYBOARD keymap compiler (xkbcomp) reports:
ott 07 16:40:07 Wotan kwin_wayland_wrapper[5360]: > Warning:          Unsupported maximum keycode 708, clipping.
ott 07 16:40:07 Wotan kwin_wayland_wrapper[5360]: >                   X11 cannot support keycodes above 255.
ott 07 16:40:07 Wotan kwin_wayland_wrapper[5360]: Errors from xkbcomp are not fatal to the X server
ott 07 16:40:09 Wotan kwin_wayland[5141]: kwin_core: Could not find window with uuid "{2d5c2095-e99d-45d1-bd93-2ebe382dc710}"
ott 07 16:40:16 Wotan kwin_wayland[5141]: kwin_core: Could not find window with uuid "{2d5c2095-e99d-45d1-bd93-2ebe382dc710}"
ott 07 16:40:16 Wotan kwin_wayland[5141]: kwin_core: Could not find window with uuid "{2d5c2095-e99d-45d1-bd93-2ebe382dc710}"
ott 07 16:40:16 Wotan kwin_wayland[5141]: kwin_core: Could not find window with uuid "{2d5c2095-e99d-45d1-bd93-2ebe382dc710}"
ott 07 16:42:53 Wotan kwin_wayland[5141]: This plugin does not support raise()
ott 07 16:44:35 Wotan kwin_wayland[5141]: This plugin does not support raise()
ott 07 16:44:49 Wotan kwin_wayland[5141]: QtDBus: cannot relay signals from parent QObject(0x562894b887d0 "") unless they are emitted in the object's thread QThread(0x562894a26f68 "libinput-connection"). Current thread is QThread(0x562894616dd0 "").
ott 07 16:44:49 Wotan systemd[4959]: Stopped KDE Window Manager.
ott 07 16:44:49 Wotan systemd[4959]: plasma-kwin_wayland.service: Consumed 17.152s CPU time.

Funny bit: I was excited for a moment because keyboard input seemed to work after installing libinput-tools, so I thought I had fixed it... and then I found out that I had logged into X11 by mistake!
Comment 10 Nate Graham 2023-10-08 00:18:15 UTC
This looks suspicious:

ott 07 16:40:07 Wotan kwin_wayland_wrapper[5360]: The XKEYBOARD keymap compiler
(xkbcomp) reports:
ott 07 16:40:07 Wotan kwin_wayland_wrapper[5360]: > Warning:         
Unsupported maximum keycode 708, clipping.
ott 07 16:40:07 Wotan kwin_wayland_wrapper[5360]: >                   X11
cannot support keycodes above 255.
ott 07 16:40:07 Wotan kwin_wayland_wrapper[5360]: Errors from xkbcomp are not
fatal to the X server

Are you using any key remapping scripts or tools?

Also, when booted into an X11 session, can you see if the QT_IM_MODULE environment variable is set to anything? You can do it with  `env | grep QT_IM_MODULE`
Comment 11 Riccardo Robecchi 2023-10-08 10:49:39 UTC
(In reply to Nate Graham from comment #10)
> Are you using any key remapping scripts or tools?

No, I don't think so. This is an OS install I have been upgrading for years, so there might be something I set ages ago which I can't recall, but I don't recall ever using key remapping scripts or tools.
 
> Also, when booted into an X11 session, can you see if the QT_IM_MODULE
> environment variable is set to anything? You can do it with  `env | grep
> QT_IM_MODULE`

No, it's not set.
Comment 12 Zamundaaa 2023-10-10 14:31:11 UTC
Have you tested the Wayland session with a new user account?
Comment 13 Teemu Rytilahti 2023-10-17 09:34:00 UTC
I am experiencing the very same issue, some notes:
* I am also running a setup which has carried the $HOME over for a long time.
* Log has the same keycode clipping warning, but also a couple of `unrecognized keysym`s.
* Some inputs are working fine, like changing virtual consoles to access other ttys and alt+tab, `libinput debug-events` receives keys.
* Screen locker works as expected and receives keys, verified that it was running (according to env variables) on Wayland, too.
* Most notably, everything is working as expected when using a clean user! I'm not sure where to go look for the potential cause, so let me know if I you want me to try something out. I have a couple of keyboard related settings, like this custom ~/.Xmodmap file:
```
keycode  34 = udiaeresis Udiaeresis
keycode  57 = n N n N ntilde Ntilde
```

and this $HOME/.config/kxkbrc:
```
[$Version]
update_info=kxkb_variants.upd:split-variants,kxkb.upd:remove-empty-lists,kxkb.upd:add-back-resetoptions

[Layout]
DisplayNames=,,
LayoutList=fi,ru,ua
LayoutLoopCount=-1
Model=pc105
Options=lv3:caps_switch
ResetOldOptions=true
ShowFlag=false
ShowLabel=true
ShowLayoutIndicator=true
ShowSingle=false
SwitchMode=Global
Use=true
VariantList=,phonetic,phonetic
```

Log:
```
systemd[1647]: Starting KDE Window Manager...
systemd[1647]: Started KDE Window Manager.
kwin_wayland[28065]: No backend specified, automatically choosing drm
kwin_wayland[28065]: OpenGL vendor string:                   Intel
kwin_wayland[28065]: OpenGL renderer string:                 Mesa Intel(R) UHD Graphics 620 (KBL GT2)
kwin_wayland[28065]: OpenGL version string:                  4.6 (Core Profile) Mesa 23.2.1-arch1.1
kwin_wayland[28065]: OpenGL shading language version string: 4.60
kwin_wayland[28065]: Driver:                                 Intel
kwin_wayland[28065]: GPU class:                              Kaby Lake
kwin_wayland[28065]: OpenGL version:                         4.6
kwin_wayland[28065]: GLSL version:                           4.60
kwin_wayland[28065]: Mesa version:                           23.2.1
kwin_wayland[28065]: Linux kernel version:                   6.5.5
kwin_wayland[28065]: Requires strict binding:                no
kwin_wayland[28065]: GLSL shaders:                           yes
kwin_wayland[28065]: Texture NPOT support:                   yes
kwin_wayland[28065]: Virtual Machine:                        no
kwin_wayland[28065]: kwin_core: Parse error in tiles configuration for monitor "28eb92d0-b82a-573c-9f71-b7d18e5fca24" : "illegal value" Creating default setup
kwin_wayland[28065]: kwin_xkbcommon: XKB: inet:323:58: unrecognized keysym "XF86EmojiPicker"
kwin_wayland[28065]: kwin_xkbcommon: XKB: inet:324:58: unrecognized keysym "XF86Dictate"
kwin_wayland_wrapper[28122]: (WW) Option "-listen" for file descriptors is deprecated
kwin_wayland_wrapper[28122]: Please use "-listenfd" instead.
kwin_wayland_wrapper[28122]: (WW) Option "-listen" for file descriptors is deprecated
kwin_wayland_wrapper[28122]: Please use "-listenfd" instead.
kwin_wayland_wrapper[28163]: The XKEYBOARD keymap compiler (xkbcomp) reports:
kwin_wayland_wrapper[28163]: > Warning:          Unsupported maximum keycode 708, clipping.
kwin_wayland_wrapper[28163]: >                   X11 cannot support keycodes above 255.
kwin_wayland_wrapper[28163]: Errors from xkbcomp are not fatal to the X server
kwin_wayland[28065]: OpenGL vendor string:                   Intel
kwin_wayland[28065]: OpenGL renderer string:                 Mesa Intel(R) UHD Graphics 620 (KBL GT2)
kwin_wayland[28065]: OpenGL version string:                  4.6 (Core Profile) Mesa 23.2.1-arch1.1
kwin_wayland[28065]: OpenGL shading language version string: 4.60
kwin_wayland[28065]: Driver:                                 Intel
kwin_wayland[28065]: GPU class:                              Kaby Lake
kwin_wayland[28065]: OpenGL version:                         4.6
kwin_wayland[28065]: GLSL version:                           4.60
kwin_wayland[28065]: Mesa version:                           23.2.1
kwin_wayland[28065]: X server version:                       1.23.2
kwin_wayland[28065]: Linux kernel version:                   6.5.5
kwin_wayland[28065]: Requires strict binding:                no
kwin_wayland[28065]: GLSL shaders:                           yes
kwin_wayland[28065]: Texture NPOT support:                   yes
kwin_wayland[28065]: Virtual Machine:                        no
kwin_wayland[28065]: BlurConfig::instance called after the first use - ignoring
kwin_wayland[28065]: ZoomConfig::instance called after the first use - ignoring
kwin_wayland[28065]: WindowViewConfig::instance called after the first use - ignoring
kwin_wayland[28065]: SlidingPopupsConfig::instance called after the first use - ignoring
kwin_wayland[28065]: SlideConfig::instance called after the first use - ignoring
kwin_wayland[28065]: OverviewConfig::instance called after the first use - ignoring
kwin_wayland[28065]: KscreenConfig::instance called after the first use - ignoring
kwin_wayland[28065]: DesktopGridConfig::instance called after the first use - ignoring
kwin_wayland[28065]: kf.config.core: "\"fsrestore1\" - conversion of \"0,0,0,0\" to QRect failed"
kwin_wayland[28065]: kf.config.core: "\"fsrestore2\" - conversion of \"0,0,0,0\" to QRect failed"
kwin_wayland[28065]: kf.config.core: "\"fsrestore3\" - conversion of \"0,0,0,0\" to QRect failed"
kwin_wayland[28065]: kf.config.core: "\"fsrestore4\" - conversion of \"0,0,0,0\" to QRect failed"
kwin_wayland[28065]: kf.config.core: "\"fsrestore5\" - conversion of \"0,0,0,0\" to QRect failed"
kwin_wayland[28065]: kf.config.core: "\"fsrestore6\" - conversion of \"0,0,0,0\" to QRect failed"
kwin_wayland[28065]: kf.config.core: "\"fsrestore7\" - conversion of \"0,0,0,0\" to QRect failed"
kwin_wayland[28065]: kf.config.core: "\"geometry8\" - conversion of \"0,40,0,0\" to QRect failed"
kwin_wayland[28065]: kf.config.core: "\"restore8\" - conversion of \"0,0,0,40\" to QRect failed"
kwin_wayland[28065]: kf.config.core: "\"fsrestore8\" - conversion of \"0,0,0,0\" to QRect failed"
kwin_wayland[28065]: kf.config.core: "\"fsrestore9\" - conversion of \"0,0,0,0\" to QRect failed"
kwin_wayland[28065]: kf.config.core: "\"fsrestore10\" - conversion of \"0,0,0,0\" to QRect failed"
kwin_wayland[28065]: kf.config.core: "\"fsrestore11\" - conversion of \"0,0,0,0\" to QRect failed"
kwin_wayland[28065]: kf.config.core: "\"fsrestore12\" - conversion of \"0,0,0,0\" to QRect failed"
kwin_wayland[28065]: kf.config.core: "\"fsrestore13\" - conversion of \"0,0,0,0\" to QRect failed"
kwin_wayland[28065]: kf.config.core: "\"fsrestore14\" - conversion of \"0,0,0,0\" to QRect failed"
kwin_wayland[28065]: kf.config.core: "\"fsrestore15\" - conversion of \"0,0,0,0\" to QRect failed"
kwin_wayland[28065]: kf.config.core: "\"fsrestore16\" - conversion of \"0,0,0,0\" to QRect failed"
kwin_wayland[28065]: kwin_core: Could not find window with uuid "{612f9308-7249-4d3b-929a-b2406c4ca15c}"
kwin_wayland[28065]: kwin_core: Could not find window with uuid "{612f9308-7249-4d3b-929a-b2406c4ca15c}"
kwin_wayland[28065]: kwin_core: Could not find window with uuid "{612f9308-7249-4d3b-929a-b2406c4ca15c}"
kwin_wayland[28065]: kwin_core: Could not find window with uuid "{612f9308-7249-4d3b-929a-b2406c4ca15c}"
kwin_wayland[28065]: qml: PlasmaExtras.ScrollArea is deprecated. Use PlasmaComponents3.ScrollView instead.
kwin_wayland[28065]: This plugin does not support raise()
kwin_wayland[28065]: This plugin does not support raise()
kwin_wayland[28065]: This plugin does not support raise()
kwin_wayland[28065]: This plugin does not support raise()
kwin_wayland[28065]: This plugin does not support raise()
kwin_wayland[28065]: This plugin does not support raise()
kwin_wayland[28065]: This plugin does not support raise()
kwin_wayland[28065]: This plugin does not support raise()
kwin_wayland[28065]: This plugin does not support raise()
kscreenlocker_greet[34667]: file:///usr/share/plasma/wallpapers/org.kde.slideshow/contents/ui/main.qml:66: TypeError: Property 'setAction' of object ScreenLocker::WallpaperIntegration(0x565300a6eec0) is not a function
kscreenlocker_greet[34667]: kf.kirigami: Failed to find a Kirigami platform plugin
kscreenlocker_greet[34667]: qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
kscreenlocker_greet[34667]: qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
kwin_wayland[28065]: kwin_libinput: Libinput: event5  - USB-HID Keyboard: client bug: event processing lagging behind by 29ms, your system is too slow
kwin_wayland[28065]: This plugin does not support raise()
kwin_wayland[28065]: This plugin does not support raise()
kwin_wayland[28065]: This plugin does not support raise()
kwin_wayland[28065]: This plugin does not support raise()
kwin_wayland[28065]: This plugin does not support raise()
kscreenlocker_greet[35971]: file:///usr/share/plasma/wallpapers/org.kde.slideshow/contents/ui/main.qml:66: TypeError: Property 'setAction' of object ScreenLocker::WallpaperIntegration(0x563eff1fdec0) is not a function
kscreenlocker_greet[35971]: kf.kirigami: Failed to find a Kirigami platform plugin
kscreenlocker_greet[35971]: qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
kscreenlocker_greet[35971]: qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
kwin_wayland[28065]: This plugin does not support raise()
kwin_wayland[28065]: QtDBus: cannot relay signals from parent QObject(0x565516994db0 "") unless they are emitted in the object's thread QThread(0x565516796858 "libinput-connection"). Current thread is QThread(0x565516753bc0 "").
systemd[1647]: plasma-kwin_wayland.service: Consumed 1min 39.492s CPU time.
```

Also, the kwin settings (i.e., windows and apps to restore) were lost between testing out the wayland instance, unrelated to the issue at hand but that's very unfortunate :-(
Comment 14 Bug Janitor Service 2023-11-01 03:45:33 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 15 Praddyumn Yadav 2023-11-02 17:27:08 UTC
Exactly Same Issue but it is on Fedora 38 everything is updated fully but in my case after 10 minutes It starts Working on Application and other KDE Utilities, Plasmoids etc. but It works perfectly well in Overview Search and it also doesn't work in krunner.
BTW am also Running cinnamon Desktop Side by Side.
Comment 16 Zamundaaa 2023-11-09 15:02:47 UTC
*** Bug 476741 has been marked as a duplicate of this bug. ***
Comment 17 Stefan Burnicki 2023-11-09 20:36:28 UTC
I have the same problem. Thanks to the last comments I could also confirm that I don't have the problem with a new user, only the existing one that migrated $HOME for like 2 years.

I used ibus once (can't recall why, maybe when trying stuff with fingerprint?), but it's disabled now. I tried to use wayland with and without it, same result: works for new user, does not work for existing user.

"journalctl --user-unit plasma-kwin_wayland --boot 0" also contains the following suspicious lines:

kwin_wayland_wrapper[135634]: (WW) Option "-listen" for file descriptors is deprecated
kwin_wayland_wrapper[135634]: Please use "-listenfd" instead.
kwin_wayland_wrapper[135634]: (WW) Option "-listen" for file descriptors is deprecated
kwin_wayland_wrapper[135634]: Please use "-listenfd" instead.
kwin_wayland_wrapper[135670]: The XKEYBOARD keymap compiler (xkbcomp) reports:
kwin_wayland_wrapper[135670]: > Warning:          Unsupported maximum keycode 708, clipping.
kwin_wayland_wrapper[135670]: >                   X11 cannot support keycodes above 255.
kwin_wayland_wrapper[135670]: Errors from xkbcomp are not fatal to the X server
kwin_wayland[135583]: QtDBus: cannot relay signals from parent QObject(0x564c8ae63d50 "") unless they are emitted in the object's thread QThread(0x564c8ab>

but so it does for the new user where the input works properly.

Running "sudo libinput debug-events" and pressing some keys:
 event8   KEYBOARD_KEY            +1.307s       *** (-1) pressed
s event8   KEYBOARD_KEY            +1.339s      *** (-1) pressed
d event8   KEYBOARD_KEY            +1.387s      *** (-1) released
 event8   KEYBOARD_KEY            +1.475s       *** (-1) released
 event8   KEYBOARD_KEY            +2.195s       KEY_LEFTMETA (125) pressed
 event8   KEYBOARD_KEY            +2.331s       KEY_LEFTMETA (125) released

Interestingly most keys show as ***(-1), but left meta does not. However, shortcuts like "Alt+Tab" and "Alt+F2" still work, even if the output shows *** (-1) for those keys. With the other user and in X11 session, the output is the same.

What also seems weird to me: It's not like the keyboard input is the only thing not working properly: When I open e.g. systemsettings, I can focus an input field and see the blinking cursor. But as soon as I press a key, both the input field and the window seem to lose focus. And even if I click back into the input field, I see a blue focus on the input, but I don't see a blinking cursor and the window still seems to not be focused (telling from the window decoration color). 

Any ideas if this could hint to a different problem?

Otherwise I would try to copy parts of my home folder to the new user and see when it stops working to narrow down the problem.
Comment 18 Bug Janitor Service 2023-11-24 03:45:36 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 19 Bug Janitor Service 2023-12-09 03:46:14 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!
Comment 20 Riccardo Robecchi 2023-12-10 11:03:13 UTC
I'm sorry it took me a while to respond. I have tried with a new user and everything works as expected there. This, of course, isn't really a solution (I can't even begin to fathom transitioning all the settings to a new user...).

(In reply to Stefan Burnicki from comment #17)
> What also seems weird to me: It's not like the keyboard input is the only
> thing not working properly: When I open e.g. systemsettings, I can focus an
> input field and see the blinking cursor. But as soon as I press a key, both
> the input field and the window seem to lose focus. And even if I click back
> into the input field, I see a blue focus on the input, but I don't see a
> blinking cursor and the window still seems to not be focused (telling from
> the window decoration color). 

The exact same thing happens on my computer.
Comment 21 Zamundaaa 2023-12-10 19:27:35 UTC
You could try the most likely culprits, which would probably be ~/.config/xkbrc and ~/.config/kwinrc
Comment 22 Riccardo Robecchi 2023-12-10 23:15:06 UTC
Created attachment 164081 [details]
kwinrc

Here is my kwinrc file. Do you see anything in here which might cause the issue? (I removed the section about Night Light to hide the coordinates, but everything else is left untouched)
There is no xkbrc file in my ~/.config directory.
Comment 23 Nate Graham 2023-12-11 20:20:55 UTC
If a clean config fixes the issue, it's clearly not a bug in KWin but rather a local misconfiguration of some sort, so I'm going to close this bug report now since it's not a bug. But feel free to keep chatting here for the purpose of figuring out what exact setting is causing the problem.
Comment 24 Stefan Burnicki 2023-12-11 20:49:39 UTC
Mhm, defining this as a "local misconfiguration" seems a bit odd to me.
For me it's just a matter of having a previously updated system that is causing the issue when I want to use a Wayland session now. It's not that I manually modified any KDE or input related config files.

I tried to copy my whole ".config" folder to a new user - keyboard input still works with the new user but not with the old one. Any ideas which other files I could try to copy to narrow down the issue?
Comment 25 Nate Graham 2023-12-11 20:52:23 UTC
Without knowing which exact setting in which file is causing the issue, it's impossible to know more. There are so many ways that the system can be configured--by either you or your distro--that there are unfortunately many ways to do it that break stuff. It's just a fact of life with a flexible not-locked-down system.

So let's first figure out what exact setting is causing the issue.
Comment 26 Teemu Rytilahti 2024-03-09 23:58:14 UTC
Just upgraded to Plasma 6.0.1 (Qt 6.6.2) on archlinux, and this issue is does not exist anymore 🎉
Comment 27 Stefan Burnicki 2024-03-13 10:43:43 UTC
Just updated to Plasma 6.0.2 on KDE neon and the issue is also resolved for me - even with my old home folder.