Bug 2234516 - The new on-live-boot mode of g-i-s does not configure layouts/input sources correctly for languages which need more than one
Summary: The new on-live-boot mode of g-i-s does not configure layouts/input sources c...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: gnome-initial-setup
Version: 39
Hardware: Unspecified
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Kalev Lember
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: AcceptedBlocker
Depends On:
Blocks: AnacondaWebUITracker F39BetaBlocker
TreeView+ depends on / blocked
 
Reported: 2023-08-24 17:24 UTC by Adam Williamson
Modified: 2023-08-31 03:50 UTC (History)
6 users (show)

Fixed In Version: gnome-initial-setup-45~beta-7.fc39
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-08-31 02:57:53 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
GNOME Gitlab GNOME gnome-desktop merge_requests 159 0 None opened Draft: Add new functions for fetching input sources 2023-08-28 21:12:13 UTC
GNOME Gitlab GNOME gnome-initial-setup issues 194 0 None opened Does not correctly configure multiple layouts/input sources for languages where this is required or normal 2023-08-24 17:25:34 UTC
GNOME Gitlab GNOME gnome-initial-setup merge_requests 213 0 None opened Draft: keyboard: Get default input sources from gnome-desktop 2023-08-28 21:12:13 UTC

Description Adam Williamson 2023-08-24 17:24:53 UTC
This is a downstream report of https://gitlab.gnome.org/GNOME/gnome-initial-setup/-/issues/194 for blocker/FE tracking purposes.

Full details there, but briefly, it is well known that for some languages, more than one keyboard layout/input source should be configured in xkb for the system to be usable. The classic test is Russian: if you choose the Russian language, we should configure both Russian and US English keyboard layouts, because the Russian xkb layout cannot input Latin characters. This is the configuration Russian speakers expect.

With the new anaconda webUI workflow on Workstation lives in F39+, where g-i-s appears on boot before anaconda and handles language/layout configuration, this does not work correctly. Selecting Russian in g-i-s configures *only* a Russian layout, no US layout, meaning you cannot type Latin characters. This causes problems with entering mount points and encryption passphrases in the installer.

I'm proposing this as a Beta blocker (conditional on installing in Russian or another affected language), because the inability to type Latin characters effectively violates the "Assign mount points to existing storage volumes" and "Encrypt newly-created storage volumes" parts of https://fedoraproject.org/wiki/Fedora_39_Beta_Release_Criteria#Custom_partitioning - you cannot type usual mount point names (Russian speakers still expect to mount things at locations like /home or /opt ) or enter a working encryption passphrase (these need to be in the extended ASCII character range - 0-255 - or else Blivet crashes, which I'm filing another bug on).

Reproducible: Always

Steps to Reproduce:
1. Boot a current F39 or Rawhide Workstation live image
2. In g-i-s, select Russian as the language, and accept the default keyboard layout on the next screen (it is the correct one)
3. Proceed to the installer or live desktop, and try to switch to a US English layout
Actual Results:  
You cannot, because none is configured. Usually there would be a clickable switcher at top-right, and a keyboard shortcut to switch. If you proceed to the live desktop, you can also open Control Center and verify that only the Russian keyboard layout is configured there.

Expected Results:  
A US English layout should be configured and switchable alongside the Russian layout.

Comment 1 Jiri Konecny 2023-08-25 11:17:08 UTC
Right now Anaconda behaves as this: 

- taking the currently used layout as vconsole keymap (skipping ibus because we can't use them)
- if none could be used (it's ibus) we will take next one
- if the list is empty we are fallbacking to US English layout


As you describe the issue it seems that this is correct behavior from the Anaconda PoV but users can type passwords in Russian because only that layout is available for them because only one layout could be selected. Am I correct?

Comment 2 Adam Williamson 2023-08-25 18:38:45 UTC
Uh....yeees? probably.

This bug report is specific to g-i-s, anyway. The question of who exactly sets the console keymap and how on the new flow is an interesting one that I haven't looked into yet, but if there are any problems there, I will file them as a separate report.

As a quick reminder: for a typical Russian installation, what we expect is for the xkb configuration to be us,ru (both US and Russian layouts configured, US first), and the kbd configuration to be ru (which will load the "legacy" internally-switchable layout with support for entering both Cyrillic and Latin characters).

There is a whole bunch of subtlety to how this actually works, which I'm initiating Ray on over at https://gitlab.gnome.org/GNOME/gnome-desktop/-/merge_requests/159 . :P

Comment 3 Adam Williamson 2023-08-27 16:11:30 UTC
+5 in https://pagure.io/fedora-qa/blocker-review/issue/1191 , marking accepted blocker.

Comment 4 Jiri Konecny 2023-08-28 12:58:59 UTC
yes, good point about it's xkb. I had wrong assumption about this.

The vconsole keymap is now set by Anaconda during the installation in the background and I think that is correct solution but yes, it depends also on GIS how they want to solve this.

Comment 5 Jens Petersen 2023-08-30 09:33:59 UTC
(Thanks Adam I had been meaning to report this too - though in fact I don't think ibus IMEs are particularly useful during installation anyway.)

Comment 6 Adam Williamson 2023-08-30 19:20:35 UTC
Well, input methods no, switched layouts probably yes. But also, the intended workflow for Workstation from now on is that whatever you select in the g-i-s you see on live boot carries *through* the install all the way into the installed system. So it is important.

Comment 7 Fedora Update System 2023-08-31 00:11:35 UTC
FEDORA-2023-45122b156d has been submitted as an update to Fedora 39. https://bodhi.fedoraproject.org/updates/FEDORA-2023-45122b156d

Comment 8 Adam Williamson 2023-08-31 01:02:54 UTC
I believe https://bodhi.fedoraproject.org/updates/FEDORA-2023-45122b156d should *mostly* cover this. There are still a few wrinkles. Testing an install in Rawhide, this is how it goes:

* Boot to live g-i-s flow, select Russian on first page
* On second page (keyboard), Russian is pre-selected (good)
* On hitting Next, the input switcher is now visible (good) with 'ru' and 'en' options (good); 'ru' is selected (probably bad, see later)
* anaconda runs in Russian (well, with a lot of missing translations) (good)
* On booting the installed system, g-i-s shows language and keyboard pages again (bad - https://bugzilla.redhat.com/show_bug.cgi?id=2234522 ), the input switcher is visible (good), with 'ru' and 'en' options (good), 'en' is selected (good, but possibly unexpected; this may be because of something anaconda did); /etc/vconsole.conf at this point contains `KEYMAP="us"` (bad, not sure why that happens) and no `XKBLAYOUT` setting (not sure if this is bad)
* Russian is pre-selected on the language page (good)
* On proceeding to the keyboard page, English (US) (translated to Russian, obvs) is the default selection (bad)
* If I continue with English (US) selected, when I reach the desktop, both layouts are still available with en as the default (good) and /etc/vconsole.conf contains `KEYMAP="us"` (bad) and `XKBLAYOUT=us,ru` (good); on a reboot, again, both layouts are configured, en is the default (good)
* If I instead select Russian - which is kinda the natural thing to do, I guess - then vconsole.conf contains `KEYMAP=ru` (good) and `XKBLAYOUT=ru,us` (bad); when I reach the desktop, both layouts are present but ru is the default (bad), and the same on a reboot (bad)

So neither path *quite* does the right thing, and there's an awkward UI question involved. Not running g-i-s a second time will make things simpler, when we can fix that.

On the topic of which layout should be default: see https://bugzilla.redhat.com/show_bug.cgi?id=1039185 . There is a *lot* of feedback from actual Russian users (and one person in Lebanon) that the user expectation is that the US layout should be the default and you should have to switch to the 'native' layout. This is because stuff you do immediately after boot tends to be with Latin characters: entering usernames, passwords and encryption passphrases. Since that bug, this is what anaconda has always attempted to do.

The "ideal" behaviour here, I believe, would be:

* Boot to live g-i-s flow, select Russian on first page
* Second page should default to an option which configures both US and Russian layouts, with US first, but the list entry selected should not be confusing...somehow
* anaconda should run in Russian
* On boot after install, both layouts should be available, US should be selected, and g-i-s should *not* ask for location and keyboard layout again
* vconsole.conf should specify `KEYMAP="ru"` or `KEYMAP=ru`, *not* us, and consoles should actually use the 'ru' kbd layout, which is an internally-switched layout that inputs Latin characters in a US-like layout by default, Cyrillic characters when switched
* vconsole.conf should specify `XKBLAYOUT=us,ru`

By comparison, this is how it works in Fedora 38 Workstation live:

* Boot to a live desktop with only 'us' layout
* Run anaconda, pick Russia as your location; the GNOME input switcher is not available at this point, but anaconda shows both layouts are configured, with US before Russian
* The live installer uses 'us' layout and you cannot switch within the installer (you would have to go to Control Center and set up the layouts you want there manually)
* On booting the installed system, both layouts are configured and available in the switcher, with en as the default, as you go through g-i-s, which does not show any keyboard config screen; before g-i-s completes, vconsole.conf says `KEYMAP="ru"`, nothing about `XKBLAYOUT`
* On completing g-i-s, again both layouts are available and US is default; vconsole.conf hasn't changed
* On reboot, at gdm and after logging in, both layouts are available and US is default

On traditional installer images, it's much the same except once you select Russian in the installer, both layouts are available inside the installer and you can switch between them. I don't know how we actually get the right config in GNOME since anaconda never sets XKBLAYOUT, but somehow we do, it must set it some other way.

Comment 9 Adam Williamson 2023-08-31 01:19:50 UTC
Filed https://bugzilla.redhat.com/show_bug.cgi?id=2236343 for the outstanding issues here.

Comment 10 Fedora Update System 2023-08-31 02:57:53 UTC
FEDORA-2023-45122b156d has been pushed to the Fedora 39 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 11 Jens Petersen 2023-08-31 03:50:02 UTC
Looking forward to test this too 🙏

Thank you, Ray and Adam - great work!


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