Bug 477251 - Unable to enter password in sddm wayland
Summary: Unable to enter password in sddm wayland
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: 5.27.80
Platform: Arch Linux Linux
: NOR grave
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: qt6
Depends on:
Blocks:
 
Reported: 2023-11-19 21:31 UTC by daron439
Modified: 2023-11-30 10:10 UTC (History)
3 users (show)

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


Attachments
systemd logs (354.61 KB, text/plain)
2023-11-20 22:49 UTC, fanzhuyifan
Details
journal log without GreeterEnvironment=QT_WAYLAND_SHELL_INTEGRATION=layer-shell (24.81 KB, text/plain)
2023-11-27 08:04 UTC, fanzhuyifan
Details
journal log on neon without GreeterEnvironment=QT_WAYLAND_SHELL_INTEGRATION=layer-shell (270.35 KB, text/plain)
2023-11-27 08:36 UTC, fanzhuyifan
Details
backtrace of sddm (13.03 KB, text/plain)
2023-11-27 08:58 UTC, fanzhuyifan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description daron439 2023-11-19 21:31:16 UTC
SUMMARY
Since version 5.27.80 it's not possible to type password in sddm(Qt6 build) wayland. When using as the Wayland compositor for sddm everything works fine.


STEPS TO REPRODUCE
1.  Install 5.27.80
2. /etc/sddm.conf.d/10-wayland.conf:
[General]
DisplayServer=wayland
GreeterEnvironment=QT_WAYLAND_SHELL_INTEGRATION=layer-shell

[Wayland]
CompositorCommand=kwin_wayland --drm --no-global-shortcuts --no-lockscreen --locale1

OBSERVED RESULT
I can't type any symbol in the password field.

EXPECTED RESULT
Typing works as before.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 5.27.80
KDE Frameworks Version: 5.245.0
Qt Version: 6.6.0

ADDITIONAL INFORMATION
journalctl: http://ix.io/4LVK
Comment 1 daron439 2023-11-19 21:33:05 UTC
*When using weston as the Wayland compositor for sddm everything works fine.
Comment 2 fanzhuyifan 2023-11-20 22:49:14 UTC
Created attachment 163330 [details]
systemd logs

Can confirm with the exact same setup, when using kwin_wayland as the wayland compositor, I cannot enter the password. The mouse still works. This problem does not occur when using the default weston compositor.

The logs are generated by setting QT_LOGGING_RULES=*.debug=true.
Comment 3 Vlad Zahorodnii 2023-11-27 07:19:43 UTC
Can you try removing "GreeterEnvironment=QT_WAYLAND_SHELL_INTEGRATION=layer-shell"?
Comment 4 fanzhuyifan 2023-11-27 08:04:51 UTC
Created attachment 163530 [details]
journal log without GreeterEnvironment=QT_WAYLAND_SHELL_INTEGRATION=layer-shell

(In reply to Vlad Zahorodnii from comment #3)
> Can you try removing
> "GreeterEnvironment=QT_WAYLAND_SHELL_INTEGRATION=layer-shell"?

See black screen with cursor. The cursor can be moved.

Complete sddm configuration:

[General]
DisplayServer=wayland

[Wayland]
CompositorCommand=kwin_wayland --drm --no-lockscreen --no-global-shortcuts --locale1

sddm commit: 132f105
kwin commit: 99ff31d3a
Comment 5 fanzhuyifan 2023-11-27 08:36:44 UTC
Created attachment 163532 [details]
journal log on neon without GreeterEnvironment=QT_WAYLAND_SHELL_INTEGRATION=layer-shell

Tried the same config as in previous comment on neon unstable.
Could only see a blinking cursor on a black screen. Does not see mouse.

Previous comment was on arch linux with source builds of kde software.
Comment 6 Vlad Zahorodnii 2023-11-27 08:41:25 UTC
Huh sddm-greeter crashes...
Comment 7 fanzhuyifan 2023-11-27 08:58:01 UTC
Created attachment 163533 [details]
backtrace of sddm

(In reply to Vlad Zahorodnii from comment #6)
> Huh sddm-greeter crashes...

Backtrace of sddm-greeter, if that helps...

Obtained using `coredumpctl gdb pid`, and then running `thread apply all backtrace full` and plain `bt`
Comment 8 fanzhuyifan 2023-11-27 09:00:00 UTC
(In reply to fanzhuyifan from comment #7)
> Created attachment 163533 [details]
> backtrace of sddm
> 
> (In reply to Vlad Zahorodnii from comment #6)
> > Huh sddm-greeter crashes...
> 
> Backtrace of sddm-greeter, if that helps...
> 
> Obtained using `coredumpctl gdb pid`, and then running `thread apply all
> backtrace full` and plain `bt`

Humm it seems I need to obtain debug symbols for sddm-greeter separately. Let me check how to do that
Comment 9 fanzhuyifan 2023-11-27 17:01:53 UTC
(In reply to Vlad Zahorodnii from comment #6)
> Huh sddm-greeter crashes...

So should I report this over at the sddm github?
Comment 10 Bug Janitor Service 2023-11-28 07:03:34 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/layer-shell-qt/-/merge_requests/48
Comment 11 Vlad Zahorodnii 2023-11-28 07:06:25 UTC
(In reply to fanzhuyifan from comment #9)
> (In reply to Vlad Zahorodnii from comment #6)
> > Huh sddm-greeter crashes...
> 
> So should I report this over at the sddm github?

Not yet.. We would need to figure out why qtwayland fails to initialize when using xdg-shell. However, in meanwhile, I created a MR to revert a layer-shell-qt change so layer shell windows get keyboard input by default.
Comment 12 fanzhuyifan 2023-11-28 07:35:04 UTC
(In reply to Vlad Zahorodnii from comment #11)
> However, in meanwhile, I created a MR to revert a
> layer-shell-qt change so layer shell windows get keyboard input by default.

Can verify the MR fixes the issue for me. Thanks!
Comment 13 Vlad Zahorodnii 2023-11-30 10:10:22 UTC
Git commit 3c116e75508c717785f43831a3a9273a98ebdae7 by Vlad Zahorodnii.
Committed on 30/11/2023 at 11:06.
Pushed by vladz into branch 'master'.

Revert "Change default keyboard interactivity from exclusive to none"

This reverts commit be6378388894f2fa6bd01a2711a5b0c2053809ac.

It broke keyboard input in sddm greeter. While defaulting to a non-spec
value is not great, it's also not that critical. It might be worth
considering synchronizing Qt::WindowDoesNotAcceptFocus with the keyboard
interactivity flag, but the tricky part is that the keyboard interactivty
is not just a boolean.

M  +1    -1    src/interfaces/window.cpp

https://invent.kde.org/plasma/layer-shell-qt/-/commit/3c116e75508c717785f43831a3a9273a98ebdae7