Bug 2236343

Summary: When adding a US layout for a non-ASCII-capable layout, put US first in the list
Product: [Fedora] Fedora Reporter: Adam Williamson <awilliam>
Component: gnome-initial-setupAssignee: Kalev Lember <klember>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: rawhideCC: gmarr, gnome-sig, i18n-bugs, klember, petersen, robatino, tiagomatos
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard: AcceptedFreezeException
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-09-13 20:15:51 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2187793, 2187794    

Description Adam Williamson 2023-08-31 01:17:39 UTC
As discussed at https://bugzilla.redhat.com/show_bug.cgi?id=2234516 , and referring back to https://bugzilla.redhat.com/show_bug.cgi?id=1039185 , when we add the US English layout alongside a layout that cannot input ASCII characters, US English should be *first* in the list (and hence the default layout on boot). You can see in 1039185 that many users requested this and it seems to be the normal expectation. Things you might do on boot - entering usernames and passwords - are usually going to need Latin characters.

Ideally, the UI should indicate this in some way that isn't...confusing. Right now the UI is kinda designed around the idea that you pick *one* input method/layout, but...that's not really how things actually work. So it might need some tweaking to what is shown in the UI, somehow.

However, we must also ensure that the *native* layout is set as KEYMAP in /etc/vconsole.conf , not "us". This is because kbd layouts are "internally switched": the kbd layout called 'ru' inputs Latin characters by default, but there is a switcher combo you can press to switch it to inputting Cyrillic characters. The kbd layout called 'us' can *only* input Latin characters, that's just the regular US console layout that Americans are familiar with.

I realize the expectations here are tricky and complex, sorry :( It's a difficult area.

I'm proposing this as a Beta FE rather than a Beta blocker as I think the current state is just about OK for a Beta release, if you accept all defaults. See https://bugzilla.redhat.com/show_bug.cgi?id=2234516#c8 for a description of how things currently behave and how I believe they *ought* to behave.

Reproducible: Always

Steps to Reproduce:
1. Get a current Rawhide Workstation live image (or F39, once we push https://bodhi.fedoraproject.org/updates/FEDORA-2023-45122b156d and a compose happens), run an install in Russian, and observe what happens at all points in the process
Actual Results:  
See https://bugzilla.redhat.com/show_bug.cgi?id=2234516#c8

Expected Results:  
See https://bugzilla.redhat.com/show_bug.cgi?id=2234516#c8

Comment 1 Adam Williamson 2023-09-02 14:33:01 UTC
+3 in https://pagure.io/fedora-qa/blocker-review/issue/1240 , marking accepted.

Comment 2 Adam Williamson 2023-09-08 00:38:22 UTC
I think this actually has a knock-on effect. With the new anaconda build, when I install in Russian, anaconda sets the console layout to US.

I *believe* this is because of the code in anaconda which sets the console layout to match the *second* xkb layout; this is based on the assumption that the first xkb layout will be US and the second will be the native layout. Since g-i-s sets them the other way around, things go wrong.

I wanted to test a quick patch to g-i-s to fix this problem and confirm or deny my theory, but it actually turns out to be weirdly hard to fix this in g-i-s (at least with my limited C skills), because of details about how exactly it works (the use of a GVariantBuilder, combined with how the code flows). So I'll have to leave it to halfline.

If I'm right, I believe that makes this a Final blocker, per Final criterion "If a particular keyboard layout has been configured for the system, that keyboard layout must be used: ... When unlocking encrypted storage volumes during boot (but see footnotes) ... When logging in at a console". So proposing as that also.

Comment 3 Fedora Update System 2023-09-09 23:30:01 UTC
FEDORA-2023-cace02f5f0 has been submitted as an update to Fedora 39. https://bodhi.fedoraproject.org/updates/FEDORA-2023-cace02f5f0

Comment 4 Fedora Update System 2023-09-10 01:51:44 UTC
FEDORA-2023-cace02f5f0 has been pushed to the Fedora 39 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-cace02f5f0`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-cace02f5f0

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 5 Geoffrey Marr 2023-09-11 18:22:33 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 we need to confirm adamw's theory about this affecting the console layout of the installed system before we can confirm whether it's a blocker, adamw will test that today.

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

Comment 6 Fedora Update System 2023-09-12 01:22:44 UTC
FEDORA-2023-cace02f5f0 has been pushed to the Fedora 39 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-cace02f5f0`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-cace02f5f0

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 7 Adam Williamson 2023-09-12 22:00:18 UTC
As webUI has been deferred to F40 and this bug is webUI-specific, deferring blocker/FE status for this bug.

Comment 8 Adam Williamson 2023-09-13 20:15:51 UTC
So, I tested this with today's Rawhide, which has gnome-initial-setup-45~beta-13.fc40. Good news: the g-i-s behaviour now seems correct, when installing in Russian, we get 'us,ru' as the xkb layout order. Great.

Bad news, the console layout *still* somehow comes out as US :( I've no idea why, now.

Let's close this one, and file a new bug for the console layout issue, we'll have to work that out separately.

Comment 9 Adam Williamson 2023-09-13 22:13:43 UTC
Follow up: https://bugzilla.redhat.com/show_bug.cgi?id=2238854