Bug 455462 - Wayland: Wrong keyboard layout for XWayland programs at login
Summary: Wayland: Wrong keyboard layout for XWayland programs at login
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Keyboard Layout widget (other bugs)
Version First Reported In: 5.24.5
Platform: Other Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: wayland-only
Depends on:
Blocks:
 
Reported: 2022-06-17 08:18 UTC by Oliver Sander
Modified: 2022-08-08 05:07 UTC (History)
2 users (show)

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


Attachments
Screenshot of the relevant part of the 'settings' dialog. (206.67 KB, image/png)
2022-06-17 08:18 UTC, Oliver Sander
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Sander 2022-06-17 08:18:05 UTC
Created attachment 149841 [details]
Screenshot of the relevant part of the 'settings' dialog.

My laptop computer has a German keyboard.  When I log into a Wayland session, however, the layout is English for all (many?) non-KDE programs.  This includes in particular Thunderbird, Firefox, and the 'Element' Matrix chat client.

I can get a German layout with the following steps:
1. Open the 'keyboard' part of the system settings program
2. Switch to the second tab ('Belegungen' / Layout(?))
3. Tick the checkbox 'setup layouts' (my translation.  In German: 'Belegungen einrichten').
4. Press apply.

Curiously, it doesn't seem to matter whether the checkbox is ticked or unticked, as long as I can press 'apply' once.

I'll upload a screenshot of the settings dialong, because I am not sure about the English names.

https://bugs.kde.org/show_bug.cgi?id=412101 seems closely related, but it is marked as 'fixed'.

SOFTWARE/OS VERSIONS
Operating System: Debian GNU/Linux
KDE Plasma Version: 5.24.5
KDE Frameworks Version: 5.94.0
Qt Version: 5.15.4
Kernel Version: 5.18.0-1-amd64 (64-bit)
Graphics Platform: Wayland
Processors: 8 × Intel® Core™ i7-8565U CPU @ 1.80GHz
Memory: 15.3 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics 620
Comment 1 Andrey 2022-06-20 18:46:03 UTC
Are these apps Wayland or XWayland clients? You can check with "xwininfo" and point to the window
Comment 2 Oliver Sander 2022-06-20 19:53:07 UTC
Does xwininfo needs some special options to display?  I don't see anything related to window managers in its output (see below).

In any case, as far as I know these windows are XWayland.

~> xwininfo 

xwininfo: Please select the window about which you
          would like information by clicking the
          mouse in that window.

xwininfo: Window id: 0x180006a "Inbox - oliver.sander@tu-dresden.de - Mozilla Thunderbird"

  Absolute upper-left X:  1191
  Absolute upper-left Y:  41
  Relative upper-left X:  0
  Relative upper-left Y:  0
  Width: 1978
  Height: 1111
  Depth: 32
  Visual: 0x351
  Visual Class: TrueColor
  Border width: 0
  Class: InputOutput
  Colormap: 0x1800010 (not installed)
  Bit Gravity State: NorthWestGravity
  Window Gravity State: NorthWestGravity
  Backing Store State: NotUseful
  Save Under State: no
  Map State: IsViewable
  Override Redirect State: no
  Corners:  +1191+41  --1121+41  --1121-0  +1191-0
  -geometry 1978x1111+1191+0
Comment 3 Andrey 2022-06-21 09:58:03 UTC
The clue is if xwininfo doesn't show you any information when you click on a window, this is a Wayland window then. You can test on other clients.
Considering your output, you dealt with XWayland apps instead.

So you could try to run FF natively on Wayland and you shouldn't get the issue there.
Comment 4 Oliver Sander 2022-06-24 19:52:24 UTC
When running firefox and thunderbird with MOZ_ENABLE_WAYLAND=1 I indeed do not have the problem.

However, neither program then respects the KDE screen scaling setting, and they become very strenous to use on my hidpi screen.
Comment 5 Bug Janitor Service 2022-07-09 04:36:49 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 6 Oliver Sander 2022-08-08 05:07:33 UTC
A recent update seems to have fixed this.  Thanks to everyone involved!