Bug 2187858 - sddm-wayland-plasma does not respect keyboard layout variant
Summary: sddm-wayland-plasma does not respect keyboard layout variant
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Fedora
Classification: Fedora
Component: sddm
Version: 38
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Neal Gompa
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: F39FinalBlocker
TreeView+ depends on / blocked
 
Reported: 2023-04-19 00:14 UTC by idiot
Modified: 2023-09-18 10:33 UTC (History)
22 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-09-15 11:54:44 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
print fron the login with be-oss keyboard layout working fine (80.95 KB, image/jpeg)
2023-09-12 11:36 UTC, Geraldo Simião
no flags Details
another print (78.78 KB, image/jpeg)
2023-09-12 11:42 UTC, Geraldo Simião
no flags Details
working fine at login with de-dvorak layout (121.80 KB, image/jpeg)
2023-09-12 13:44 UTC, Geraldo Simião
no flags Details
another layout with variant, working (152.84 KB, image/jpeg)
2023-09-12 14:49 UTC, Geraldo Simião
no flags Details

Description idiot 2023-04-19 00:14:08 UTC
User-Agent:       Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/112.0
Build Identifier: 

% localectl
   System Locale: LANG=en_US.UTF-8
       VC Keymap: us-colemak
      X11 Layout: us
       X11 Model: pc104
     X11 Variant: colemak

I can type with colemak layout when using sddm-x11 but after swapping to sddm-wayland-plasma, it uses US layout and there is no way to choose variants.

Reproducible: Always

Steps to Reproduce:
Configure a layout variant with localectl.
% localectl set-x11-keymap us pc104 colemak

Switch to sddm-x11.
# dnf swap sddm-wayland-plasma sddm-x11
Reboot back to sddm. Type something in the username field to confirm that the layout variant works. 

Switch to sddm-wayland-plasma
# dnf swap sddm-x11 sddm-wayland-plasma
Reboot back to sddm. The layout variant no longer works.
Actual Results:  
asdfghjkl;

Expected Results:  
arstdhneio

Comment 1 Kamil Páral 2023-04-19 06:43:22 UTC
With ssdm-wayland-plasma-5.27.4.1-2.fc38, when I switch to the cz layout

I can switch to the cz layout:
$ localectl set-x11-keymap cz

and even the qwerty variant to cz layout:
$ localectl set-x11-keymap cz '' qwerty

and it works fine in sdm-wayland-plasma.

So this might be specific to colemak, or some set of variants?

However, even when the new default layout is honored (typed letters reflect it), sddm shows "Keyboard Layout: English US" in the bottom left corner, which is clearly wrong. The widget allows you to switch to a different layout (if you want US, you have to select something else and then back to US), but it also overwrites your default system layout, which feels a bit unexpected.

Comment 2 Nate Graham 2023-04-19 16:09:27 UTC
Most likely a KWin issue.

Comment 3 Monkey Bizness 2023-04-24 07:45:36 UTC
Hello, 
I am facing the same issue. My keyboard layout is set to "be" but when I login in with sddm-wayland it is set to "us". The breeze sddm theme allows to switch the layout prior to login so it is not blocking but annoying

$ sudo localectl
System Locale: LANG=en_US.UTF-8
    VC Keymap: be
   X11 Layout: be

My system:
Operating System: Fedora Linux 38
KDE Plasma Version: 5.27.4
KDE Frameworks Version: 5.105.0
Qt Version: 5.15.8
Kernel Version: 6.2.11-300.fc38.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 12 × AMD Ryzen 5 5600X 6-Core Processor
Memory: 31.3 GiB of RAM
Graphics Processor: AMD Radeon RX 5700 XT
Manufacturer: Micro-Star International Co., Ltd.
Product Name: MS-7C91
System Version: 2.0

Note: I was previously on sddm-x11 but the upgrade to fc38 enabled sddm-wayland by default.
Any logs I can pull out?

Comment 4 Etienne URBAH 2023-04-26 18:59:55 UTC
$ sudo localectl
System Locale: LANG=en_US.UTF-8
    VC Keymap: fr-oss
   X11 Layout: fr

With Fedora 37, sddm correctly used a french keyboard layout.

But with Fedora 38 :
At startup, sddm-wayland indicates that the keyboard layout is US English.
I can choose the French keyboard layout.
But systematically, this has NO effect :  The keyboard layout of sddm-wayland is still US English.

$ sudo dnf list installed plasma-workspace 'sddm*'
Paquets installés
plasma-workspace.x86_64      5.27.4.1-2.fc38                     @fedora
sddm.x86_64                  0.19.0^git20230404.e652433-1.fc38   @fedora
sddm-breeze.noarch           5.27.4.1-2.fc38                     @fedora
sddm-kcm.x86_64              5.27.4-1.fc38                       @fedora
sddm-wayland-plasma.noarch   5.27.4.1-2.fc38                     @fedora

Comment 5 idiot 2023-04-28 21:09:13 UTC
After updating my system today and trying sddm-wayland-plasma again I've noticed my layout variant now works as expected.

Comment 6 Valerio De Angelis 2023-05-03 20:17:31 UTC
Hello,
same problem here.
In my case I have the layout in "it":
[]$ localectl
System Locale: LANG=it_IT.UTF-8
VC Keymap: it
X11 Layout: it

But with F38 SDDM continue to set in in "us" no matter what. I tried to change from Wayland to X11, it remains US. Switch back to Wayland, it remains US. Apply again the Plasma setting from "Startup and shutdown"-> "Login screen (SDDM)", it remains US.

I notice it because in my password I use one special character which has a different position between IT and US layout, so I started to fail my password out of the blue. Actually I need to change the selection manually from US to IT every time in order to login (which starts to be a bit annoying to be honest).

I guess that if such a problem passed all the steps until the F38 release, it means that: 1) every power user use the US layout, or 2) their password does not include strange character. :-) 

Regards,
Valerio

Comment 7 Kamil Páral 2023-05-04 11:11:18 UTC
While it only seems to affect some people, proposing for a blocker discussion for Fedora 39.

Comment 8 Lukas Middendorf 2023-05-18 16:24:22 UTC
I can confirm this. There seems to be no way to switch to the "neo" variant of the German keyboard layout in the Wayland version of SDDM in Fedora 38. Instead by default the standard variant of the German keyboard layout is used (even though SDDM indicates that the US layout is in use).
There is some "custom keyboard layout" at the top of the keyboard layout selection list, but there seems to be no way to configure what this layout actually is and selecting it does not seem to change anything.

Even though the sddm-x11 package is still built and available in the repos, it is obsoleted by sddm-wayland-plasma. It therefore can not be installed easily and if you force dnf to do so, you always have to protect it from being replaced again. Also the X11 version of SDDM seems to have lost its keyboard layout selection in Fedore 38, which still was available in Fedora 37. So going back to the X11 version of SDDM is not only difficult, but also does not work around this problem.

Comment 9 Geraldo Simião 2023-06-13 23:16:56 UTC
I can confirm this, sddm-wayland layout is allways US, I can change for the present login, but for the next one it is back at US layout.

Comment 10 Håkon Løvdal 2023-06-14 20:26:22 UTC
The state of keyboard layout configuration in Fedora is really sub-par, especially during installation. Even Slackware solved this perfectly back in the 90s where it (as the very first input it asked for!) presented you a numbered list of possible layouts and you wrote in the number, and that was it. That approach is vastly superior to ever having to deal with missing/wrong keyboard layout configuration!

(And don't get me started on how utterly wrong the timing is to configure the keyboard layout for the installation session as late as inside the Anaconda program. This should be asked for and done even before you log in to the desktop GUI!)

So can you please change so the default keyboard layout is NOT "en" but rather something different (preferably very different, e.g. dvorak) so that *any* issue becomes super visible and *must* be fixed immediately? Instead of as today where all the en-keyboard developers will miss and ignore any keyboard layout configuration problems.

Comment 11 Monkey Bizness 2023-07-03 08:03:37 UTC
Looks like the latest sddm/plasma update fix this issue for me.
The default keyboard layout is correct now for me when loging in.
The breeze login theme still show US as the active layout in the dropdown menu, but the "be" one is actually used when typing.

1003 $ sudo dnf info sddm
Last metadata expiration check: 0:00:28 ago on Mon 03 Jul 2023 10:00:04 AM CEST.
Installed Packages
Name         : sddm
Version      : 0.20.0
Release      : 1.fc38
Architecture : x86_64
Size         : 3.2 M
Source       : sddm-0.20.0-1.fc38.src.rpm
Repository   : @System
From repo    : updates
Summary      : QML based desktop and login manager
URL          : https://github.com/sddm/sddm
License      : GPLv2+
Description  : SDDM is a modern graphical display manager aiming to be fast, simple and
             : beautiful. It uses modern technologies like QtQuick, which in turn gives the
             : designer the ability to create smooth, animated user interfaces.

1004 $ sudo dnf info sddm-wayland-plasma
Last metadata expiration check: 0:00:38 ago on Mon 03 Jul 2023 10:00:04 AM CEST.
Installed Packages
Name         : sddm-wayland-plasma
Version      : 5.27.6
Release      : 1.fc38
Architecture : noarch
Size         : 225  
Source       : plasma-workspace-5.27.6-1.fc38.src.rpm
Repository   : @System
From repo    : updates
Summary      : Plasma Wayland SDDM greeter configuration
URL          : https://invent.kde.org/plasma/plasma-workspace
License      : GPLv2+
Description  : This package contains configuration and dependencies for SDDM
             : to use KWin for the Wayland compositor for the greeter.

Comment 12 Adam Williamson 2023-08-28 17:56:10 UTC
For folks following along with this I want to emphasize that the word "variant" in the description is important. This is Xkb terminology, and they are two different concepts.

A "layout" can have multiple "variants", which in practice can produce very different results. For instance, the neo "variant" referred to by Lukas is https://en.wikipedia.org/wiki/Neo_(keyboard_layout) implemented as a "variant" in Xkb terms. If you look at the image there, you can see at a glance that "de(neo)" (the way the combination of layout "de", variant "neo" would typically be referred to in Xkb terms) is a very different experience from just "de".

If you're only testing whether sddm handles configuring the *layout* correctly, without testing a non-standard *variant*, you are not actually attempting to reproduce this bug as described.

Comment 13 Adam Williamson 2023-08-28 17:57:53 UTC
To test this you would want to e.g. run an install and select the "German (Neo 2)" option in the installer, which is the "de" layout with the "neo" variant.

Comment 14 Adam Williamson 2023-08-28 18:05:18 UTC
Håkon: I actually love the idea of making DVORAK the end of all the fallback paths, hah. at least for testing. It would actually be a bit tricky to implement fully, though - we'd have to patch quite a lot of paths.

I understand what you're saying, but the comparison isn't really a fair one. A slackware install in the 1990s would've been console-only and only had to care about the small range of kbd layouts available at that time. The situation now - with multiple desktops, the always-impossible-to-fully-reconcile difference between kbd and xkb designs, the popularity of live images, and Wayland vs. X.org - is exponentially more complicated and hard to keep track of. We do expend quite a lot of effort on this area, but it's just extremely difficult to make every path work optimally all of the time, while things keep changing (like Wayland showing up).

On a non-live install of Fedora (e.g. with a network install image, or the Server DVD) the first thing you see is location/language selection, after which an appropriate keyboard layout should be configured by default and the Keyboard spoke is immediately available to change it.

With Fedora 39, we are working on a new flow for the Workstation live image which boots directly to a special gnome-initial-setup mode which immediately offers locale and input method configuration. You can try that out with a Fedora 39 nightly, e.g. https://kojipkgs.fedoraproject.org/compose/branched/Fedora-39-20230828.n.0/compose/Workstation/x86_64/iso/Fedora-Workstation-Live-x86_64-39-20230828.n.0.iso .

Comment 15 František Zatloukal 2023-09-04 18:13:44 UTC
Discussed during the 2023-09-04 blocker review meeting: [1]

The decision to classify this bug was punted (delayed):

"We did not yet get around to the re-testing that we agreed last week is needed for this bug."

[1] https://meetbot-raw.fedoraproject.org/fedora-blocker-review/2023-09-04/f39-blocker-review.2023-09-04-16.00.log.txt

Comment 16 Adam Williamson 2023-09-11 16:06:32 UTC
So I did a simple test with a current F39 nightly: I did an install of the KDE nightly, setting English (Colemak) as the sole keyboard layout, and that seems to work, Colemak layout is used at SDDM and in the desktop after logging in.

Comment 17 Geoffrey Marr 2023-09-11 18:23:42 UTC
Discussed during the 2023-09-11 blocker review meeting: [0]

The decision to delay the classification of this as a blocker bug was made as Adam did a simple test here, but it would probably be good for more folks to test more slightly different setups to see if we can identify any remaining issues.

[0] https://meetbot.fedoraproject.org/fedora-blocker-review/2023-09-11/f39-blocker-review.2023-09-11-16.00.txt

Comment 18 Geraldo Simião 2023-09-12 01:05:19 UTC
I tested the last iso (Fedora-KDE-Live-x86_64-39-20230910.n.0.iso) and it worked fine, the brazilian layout (with ç) and the US colemak too.

sddm-wayland-plasma-5.27.7-1.fc39.noarch
sddm-0.20.0-3.fc39.x86_64

the only strange thing is: the language selector at the login screen allways shows US as keyboard language, even if it is not installed (when I tested only with the Brazilian layout)

Comment 19 Geraldo Simião 2023-09-12 11:36:32 UTC
Created attachment 1988348 [details]
print fron the login with be-oss keyboard layout working fine

Despite showing "US" on the left side, keyboard layout is correctly set as be-oss (belgian alternative), the same I choosed at installation.
System Locale: LANG=pt_BR.UTF-8
VC Keymap: be-oss
X11 Layout: be
X11 Variant: oss

Comment 20 Geraldo Simião 2023-09-12 11:42:37 UTC
Created attachment 1988349 [details]
another print

Comment 21 Geraldo Simião 2023-09-12 13:44:33 UTC
Created attachment 1988389 [details]
working fine at login with de-dvorak layout

System Locale: LANG=pt_BR.UTF-8
    VC Keymap: de-dvorak
   X11 Layout: de
  X11 Variant: dvorak

Comment 22 Geraldo Simião 2023-09-12 13:45:20 UTC
all my tests with Fedora-KDE-Live-x86_64-39-20230910.n.0.iso

Comment 23 Geraldo Simião 2023-09-12 14:49:03 UTC
Created attachment 1988406 [details]
another layout with variant, working

This time I tested Bosnian with guillemets, it worked like the others.

System Locale: LANG=fr_FR.UTF-8
    VC Keymap: ba-alternatequotes
   X11 Layout: ba
  X11 Variant: alternatequotes

Comment 24 Kamil Páral 2023-09-15 11:54:44 UTC
Since there have been numerous reports of this working correctly now, I'll close it. Yell, if you can still reproduce this in certain cases. I'm also removing the CommonBugs nomination at this moment.

It would be nice if somebody could file a bug regarding the language selector showing US even when it's not US (ideally upstream).

Comment 25 Neal Gompa 2023-09-15 13:29:06 UTC
(In reply to Kamil Páral from comment #24)
> Since there have been numerous reports of this working correctly now, I'll
> close it. Yell, if you can still reproduce this in certain cases. I'm also
> removing the CommonBugs nomination at this moment.
> 
> It would be nice if somebody could file a bug regarding the language
> selector showing US even when it's not US (ideally upstream).

I think that is this issue: https://github.com/sddm/sddm/issues/1767

Comment 26 Kamil Páral 2023-09-18 10:33:43 UTC
(In reply to Neal Gompa from comment #25)
> I think that is this issue: https://github.com/sddm/sddm/issues/1767

Thanks, I proposed it for a blocker discussion in bug 2239426.


Note You need to log in before you can comment on or make changes to this bug.