Skip to content

Persist XKBLAYOUT for LUKS so non-US layouts stay typeable - #12896

Closed
chessing234 wants to merge 8 commits into
omacom:quattrofrom
chessing234:fix/8196-luks-keyboard-layout
Closed

chessing234 wants to merge 8 commits into
omacom:quattrofrom
chessing234:fix/8196-luks-keyboard-layout

Conversation

@chessing234

Copy link
Copy Markdown
Contributor

Summary

  • After install/first-boot keyboard selection, write both KEYMAP and XKBLAYOUT (from systemd's kbd-model-map, with colemak/dvorak variants) so Plymouth's LUKS prompt matches the layout used at passphrase enrollment.
  • Rebuild the UKI after applying a keyboard layout, and migrate existing Latin installs that only have KEYMAP.

Fixes #8196.

Test plan

  • bash test/shell.d/luks-keyboard-layout-test.sh
  • Full-disk install with French (AZERTY), passphrase containing digits, confirm LUKS unlock accepts the same typing
  • OEM deferred setup: pick Belgian layout, set password, confirm next boot unlock matches

Made with Cursor

@llstrk

llstrk commented Sep 22, 2026

Copy link
Copy Markdown

Two issues remain at e97fe6d2: the migration cannot write the protected system config, and some offered Latin keymaps still lack a usable persistence path.

Elevate the migration's config write

1790044019.sh calls omarchy_ensure_vconsole_xkb as the current user. Its setter uses unprivileged touch, sed and redirection on /etc/vconsole.conf; only the later rebuild uses sudo. The normal migration runner does not elevate scripts.

With KEYMAP=fr and no XKBLAYOUT, the unchanged migration produced this contrast in private-file tests:

Config permissions Result Rebuild requested Later migration ran
Writable control Exit 0; XKBLAYOUT=fr added Yes, recorded stub Yes
Non-writable model Exit 1; config unchanged No No
user-run migration
  config write -> permission denied
  rebuild      -> not reached
  marker       -> not written
  later work   -> stopped

Impact: Existing installations needing the repair cannot apply it through normal updates, and later pending migrations stop until the failure is resolved. This leaves the previous keyboard mismatch unfixed, rather than demonstrating a new lockout.

Suggested change: Explicitly elevate the config update and preserve successful-write/change detection before rebuilding, for example by keeping those operations together in a privileged shell. Running every migration as root would not preserve the existing per-user migration contract.

Cover the remaining Latin-layout persistence gaps

Against systemd 261's actual kbd-model-map, the new helper and the existing initramfs exclusion leave these gaps:

Offered keymap Observed helper result Remaining gap
Norwegian no-latin1 No XKBLAYOUT written No map row; hyphenated name misses fallback
Swiss German de_CH-latin1 No XKBLAYOUT written No map row; hyphenated name misses fallback
Serbian sr-latin XKBLAYOUT=rs, XKBVARIANT=latin Hook excludes rs without considering its Latin variant

The helper results were executed; the hook exclusion was inspected in source, not validated by booting.

Impact: These KEYMAP-only configurations do not gain the intended Latin-layout path into Plymouth. These are remaining coverage gaps, not regressions introduced by the PR.

Suggested change: Add verified mappings for the offered aliases and make the exclusion distinguish Latin variants from non-Latin layouts, retaining Latin passphrase entry for non-Latin configurations. Otherwise explicitly narrow the supported-layout scope.

Verified: French, Belgian, Colemak and Dvorak configurations gained the expected XKB coordinates. Ordinary administrator overrides and repeated calls were preserved, and the supplied eight-check suite passed.


Review information

Test scope: Pinned-source inspection and isolated config/migration tests with recorded boot-tool stubs. The permission model used a private user-owned non-writable file, not root-owned /etc; its append failed where a real root-owned file may fail at touch first. No actual UKI build, encrypted installation, physical keyboard or Plymouth unlock was tested.

Community review: Independent automated community review, unaffiliated with the Omarchy team, intended to help prepare PRs for their review.

Automated AI review: Astra initial inspection, independent Opus 5 and Astra technical reviews, then Astra synthesis and verification against saved targeted evidence.

@chessing234
chessing234 force-pushed the fix/8196-luks-keyboard-layout branch from e97fe6d to c37fb5e Compare September 26, 2026 00:57
@chessing234

Copy link
Copy Markdown
Contributor Author

migration writes vconsole.conf with sudo

@llstrk

llstrk commented Sep 27, 2026

Copy link
Copy Markdown

Automated AI review

Community review: Independent automated community review, unaffiliated with the Omarchy team, intended to help prepare PRs for their review.

Follow-up to the earlier review of e97fe6d2, checked at c37fb5eb, after the author's reply.

Earlier finding Outcome at c37fb5eb
Migration config write was unprivileged Resolved
Serbian sr-latin excluded from the initramfs Resolved, for the next initramfs rebuild
Norwegian no-latin1 and Swiss German de_CH-latin1 lacked a Plymouth path Withdrawn: the earlier impact claim was wrong (see below)

Three new issues follow: the new XKB mappings differ from the enrolled console keymap for some layouts, XKBLAYOUT=ua becomes a risk with Arch's newest Plymouth package, and a failed rebuild is not retried.

Verified: omarchy_vconsole_set now uses sudo sed -i or sudo tee -a when the config is not writable. The migration runner uses bash -euo pipefail, so a failed elevation stops the migration before any rebuild.

Protected config, KEYMAP=fr e97fe6d2 c37fb5eb
sudo succeeds exit 1, Permission denied exit 0, XKBLAYOUT=fr written, one rebuild
sudo fails exit 1 exit 1, config unchanged, no rebuild
XKBLAYOUT already set exit 0 exit 0, no sudo call, no rebuild

Verified: the drop-in now bundles XKBLAYOUT=rs with a latin* variant, while rs without a variant, ru,us and ua stay excluded. omarchy_layout_is_non_latin rs latin returns Latin, and Hyprland no longer prepends us for rs/latin. systemd-firstboot already writes rs/latin for sr-latin, so on existing installs the migration writes nothing and does not rebuild. The new drop-in applies at the next initramfs rebuild, for example after a kernel update.

Correction (no-latin1, de_CH-latin1): the earlier review said these KEYMAP-only configurations did not gain the intended Latin-layout path into Plymouth. That was wrong for the Plymouth builds Arch ships:

  • The base drop-in already bundles a KEYMAP-only vconsole.conf.
  • mkinitcpio's keymap hook loads that console keymap before encrypt asks for the passphrase.
  • With KEYMAP set and no XKBLAYOUT, Plymouth reads keys from the VT through that keymap. This holds for Arch's 24.004.60 builds and for 26.134.222-2 and later, which cherry-pick upstream cea90be. Only 26.134.222-1, current for about a week in May 2026, fell back to US XKB.

The missing map rows were real, but the passphrase prompt already used the same console keymap the passphrase was enrolled under.

New XKB mappings differ from the enrolled console keymap

For KEYMAP-only files, the helper now writes an XKB layout whenever it finds a mapping. Once XKBLAYOUT is set, Plymouth uses the XKB layout instead of the console keymap the passphrase was typed under. Of the 48 layouts in the setup form, the helper changes six: colemak, cz, de_CH-latin1, no-latin1, pl and ua. colemak and pl matched on the plain and Shift levels of every key compared, though some AltGr positions differ. Three differ on plain or Shift keys (key tables from kbd 2.10.0 loadkeys --mktable against xkbcli compile-keymap with the test host's xkeyboard-config data):

Console keymap (enrollment) Helper writes Mismatch at the prompt
cz: Arch renames qwertz/cz.map to cz-qwertz, so cz is QWERTY cz (QWERTZ, two-letter fallback) Y and Z swapped; some shifted number-row keys also differ
no-latin1 no Shift+4 gives ¤ instead of $. The key right of Å gives dead keys instead of ~ and ^. Shift on the key right of + gives dead grave instead of `
de_CH-latin1 ch(de_nodeadkeys) The console's dead ^, `, ~, ¨ and ´ become literal characters
existing install, KEYMAP=cz only
  before: Plymouth reads keys through console cz (QWERTY)     -> same keymap as enrollment
  after:  migration writes XKBLAYOUT=cz and rebuilds
          Plymouth uses XKB cz (QWERTZ)                        -> Y/Z typed differently

Impact: after this migration, a passphrase containing an affected character no longer matches as typed at the LUKS prompt for these users. Not boot-tested.

Suggested change: only write XKB coordinates checked key by key against the console keymap. cz with variant qwerty fixes Y/Z for Arch's cz, and plain ch keeps the dead keys of de_CH-latin1, but neither is an exact match, and no-latin1 has no exact XKB equivalent. Alternatively, leave KEYMAP-only files to Plymouth's console-keymap path and fix the desktop layout separately. Open PRs #11056, #11418 and #8685 change the same keymap inputs.

XKBLAYOUT=ua with Arch's plymouth 26.134.222-3

Arch's plymouth packaging commit 159d7694 (26.134.222-3, 2026-09-24) makes the plymouth initcpio hook add /etc/vconsole.conf whenever it is non-empty. Omarchy's drop-in can only append to FILES, so from that build on its non-Latin exclusion no longer keeps a file out of the initramfs.

The PR's two-letter fallback writes XKBLAYOUT=ua for KEYMAP=ua, which has no kbd-model-map row. It does this during install, in apply_keyboard and in the migration.

KEYMAP=ua install plymouth -2 plymouth -3
Without the PR (KEYMAP only) Bundled; console ua keymap, Latin by default Same
With the PR (XKBLAYOUT=ua) Excluded by drop-in; US prompt Bundled; XKB ua, Cyrillic letter keys

Impact: with plymouth -3, a Latin passphrase enrolled on the console becomes untypeable for ua users, the lockout the drop-in's exclusion was meant to prevent. Which plymouth build Omarchy's stable and edge channels currently serve was not checked.

Suggested change: do not derive XKBLAYOUT from the two-letter fallback for non-Latin keymaps, at minimum ua. Separately, the same packaging change bypasses the exclusion for base installs whose firstboot-written XKBLAYOUT is non-Latin (for example il), which the PR's comments rely on. That may warrant its own issue.

A failed rebuild is marked complete on retry

The migration decides to rebuild from OMARCHY_VCONSOLE_XKB_CHANGED, which only records whether the current run wrote the file.

run 1: write XKBLAYOUT=fr -> sudo limine-mkinitcpio fails -> exit 1, no marker
run 2: XKBLAYOUT already set -> CHANGED=0 -> exit 0 -> marker written, no rebuild

The real bin/omarchy-migrate ran twice with a rebuild stub that failed once, and the result matched the sketch. Run 2 marked the migration complete with no successful rebuild.

Impact: a transient rebuild failure, for example a Limine or mkinitcpio error, leaves the old initramfs in place until some unrelated rebuild such as a kernel update, with no retry and no message.

Suggested change: keep the need to rebuild across runs, for example by recording a pending-rebuild flag that is cleared only after a successful rebuild, or by rebuilding for any Latin layout whenever the migration runs (one extra rebuild on installs that were already complete).

Optional (set -u safety): the new ${XKBVARIANT%%,*} in omarchy_hooks.conf is not set -u safe. test/shell.d/nvidia-kms-hook-test.sh still passes but prints XKBVARIANT: unbound variable when the sourced vconsole.conf has no XKBVARIANT. Reading it as ${XKBVARIANT:-} into a variable before stripping %%,* avoids this. mkinitcpio itself does not use -u.

Verified: luks-keyboard-layout-test.sh (12/12), hyprland-keyboard-layout-test.sh (7/7) and nvidia-kms-hook-test.sh (9/9) pass at c37fb5eb, and bash -n is clean on the changed shell files.


Review information

Test scope: Source comparison of e97fe6d2 and c37fb5eb. Isolated tests used private config files and recorded stubs for sudo and the Limine rebuild, and ran the real migration runner for the retry case. Keymaps were compared with kbd and xkeyboard-config data. The Plymouth, mkinitcpio, systemd and Arch packaging behaviour described comes from their source. No system was booted, and no real Plymouth prompt, encrypted install, sudo or UKI build was tested. The Plymouth build on Omarchy's package channels was not checked.

AI process: Opus 5.5 Medium coordination and synthesis, Opus 5.5 Xhigh technical review and final fact check, GPT 6 Sol Xhigh search for related issues, Opus 5.5 Medium editorial check.

Opt out: To stop receiving these reviews, reply to this comment saying so.

@chessing234

Copy link
Copy Markdown
Contributor Author

pending-rebuild flag under state/omarchy so a failed limine run is retried instead of marked complete.

@omarchybot omarchybot added the bug Something isn't working label Sep 27, 2026
@llstrk

llstrk commented Sep 28, 2026

Copy link
Copy Markdown

Automated AI review

Community review: Independent automated community review, unaffiliated with the Omarchy team, intended to help prepare PRs for their review.

Follow-up to the earlier review of c37fb5eb, checked at 9a9c2342 after the author's reply. The only change is in migrations/1790044019.sh: a pending-rebuild flag, plus a new branch for systems without a Limine command.

Earlier point Outcome at 9a9c2342
A failed rebuild was marked complete on retry Resolved for rebuild failures reported with a non-zero exit (two caveats below)
New XKB mappings differ from the enrolled console keymap (cz, no-latin1, de_CH-latin1) Still present: the helper is unchanged
XKBLAYOUT=ua with Arch plymouth 26.134.222-3 Still present, with narrower timing: that build is only in Arch extra-testing
Optional: ${XKBVARIANT%%,*} is not set -u safe Still present

One new issue: when no Limine rebuild command exists and the migration fills in a Latin KEYMAP-only config, it now fails on every run.

Retry after a failed rebuild

Verified: the real bin/omarchy-migrate runner was run twice, with a rebuild stub that fails on the first run.

c37fb5eb  run 1: rebuild fails -> exit 1, no marker
          run 2: CHANGED=0     -> marker written, no rebuild
9a9c2342  run 1: rebuild fails -> exit 1, flag kept, no marker
          run 2: flag present  -> rebuild, flag removed, marker written

A refused sudo for the rebuild is retried the same way, and systems with only limine-update rebuild through it. The elevated config write and the rs/sr-latin handling resolved in the earlier round still behave as before.

Caveats:

  • The flag lives under ${XDG_STATE_HOME:-$HOME/.local/state}/omarchy, while the runner's markers (bin/omarchy-migrate) and bin/omarchy-state use $HOME/.local/state/omarchy. In a test where the failed run had XDG_STATE_HOME set and the retry did not, the retry found no flag and marked the migration complete without rebuilding. Omarchy does not set XDG_STATE_HOME itself, so this needs a user-set value that differs between runs. bin/omarchy-toggle-input-device already uses ~/.local/state for this reason. Using $HOME/.local/state/omarchy, or a root-owned flag under /var/lib/omarchy like other rebuild migrations use for their markers, avoids the mismatch.
  • limine-mkinitcpio exits 0 after mkinitcpio fails for a kernel (limine-entry-tool 1.38.0 and 1.40.0 source; migrations/1789325478.sh notes the same). A failed initramfs build therefore still clears the flag. Only failures the command reports with a non-zero exit, such as a refused sudo or Limine setup and hook errors, are retried.

The no-Limine branch fails the migration on every run

The new else branch exits 1 and keeps the flag when a rebuild is pending and neither limine-mkinitcpio nor limine-update is present. A rebuild is pending when the run fills in XKBLAYOUT for a Latin KEYMAP-only config, or when a flag is left from an earlier run. c37fb5eb skipped the rebuild in that case.

Neither Limine command, Latin KEYMAP-only config the helper maps c37fb5eb 9a9c2342
Migration exit 0 1 on every run
Marker written yes no
Later pending migration ran never ran

Impact: bin/omarchy-migrate stops at the first failing migration, and omarchy-update aborts when migrations fail. Affected users stay stuck until they install a Limine command or intervene by hand, for example by deleting the flag, and the error message does not say how. On x86_64 the omarchy package depends on the Limine packages, so this mainly affects aarch64 installs: the edge aarch64 omarchy package has no Limine dependency. The population with a mappable KEYMAP-only config on such a machine was not measured.

Suggested change: when neither command is present, remove the flag and exit 0, the way migrations/1786605598.sh and migrations/1786482992.sh exit 0 with omarchy-cmd-present limine-mkinitcpio || exit 0. Keep the non-zero exit for real rebuild failures.

Unchanged earlier findings

XKB mappings vs the enrolled console keymap: install/helpers/keyboard-vconsole.sh is identical to c37fb5eb. For KEYMAP-only cz, no-latin1 and de_CH-latin1 configs, the helper still writes the XKB layouts the earlier review compared (cz, no, ch(de_nodeadkeys)). The key tables were not recomputed in this round.

XKBLAYOUT=ua and plymouth -3: the migration still writes XKBLAYOUT=ua for KEYMAP=ua, and Arch packaging commit 159d7694 still bundles any non-empty /etc/vconsole.conf. The earlier review did not check Omarchy's channels. Arch extra and Omarchy's stable and edge mirrors all serve plymouth 26.134.222-2 today, and -3 is in extra-testing. The risk applies once that hook change reaches extra and then Omarchy's mirrors. It is not a current lockout on those channels.

Optional test improvement: luks-keyboard-layout-test.sh is unchanged since c37fb5eb and passes 12/12 on both revisions, so nothing covers the new fail-then-retry path or the no-Limine branch. Its migration cases also run without a private HOME or XDG_STATE_HOME, so they create and delete the flag in the caller's real state directory: a pre-existing flag was deleted in a private-home run while the test still passed 12/12. Setting a temporary HOME (as agents/skills/migrations.md suggests) and XDG_STATE_HOME in those cases, and adding a fail-once-then-retry case (plus a no-Limine case if that branch stays), would cover them.

Verified: luks-keyboard-layout-test.sh (12/12) and hyprland-keyboard-layout-test.sh (7/7) pass at 9a9c2342, and bash -n is clean on the changed shell files.


Review information

Test scope: Source comparison of c37fb5eb and 9a9c2342. Isolated runs through the real migration runner with private config and state directories and recording stubs for sudo, limine-mkinitcpio, limine-update and omarchy-cmd-present. Package dependencies and Plymouth builds were read from the Arch and Omarchy package databases, and the limine-mkinitcpio exit status comes from its source, not from running it. No system was booted, and no real Plymouth prompt, encrypted install, sudo or UKI build was tested.

AI process: Opus 5.5 Medium coordination and synthesis, Opus 5.5 Xhigh technical review and final fact check, GPT 6 Sol Xhigh search for related issues, Opus 5.5 Medium editorial check.

Opt out: To stop receiving these reviews, reply to this comment saying so.

@omarchybot

Copy link
Copy Markdown
Collaborator

Thanks for taking this on. I reviewed head 9a9c2342cdba9864e2867fe770c727b3edd78dae against quattro and ran it on a disposable worker built from the Omarchy ISO. I found that it doesn't change the French case in #8196, and that its migration can lock Czech users out at the LUKS prompt. No second opinion was available: the configured reviewer (Codex Medium) had used up its daily review budget, so this is one model's review.

The French case already has XKBLAYOUT. On a stock worker, systemd-firstboot --keymap=fr writes KEYMAP=fr and XKBLAYOUT=fr, because fr has a row in systemd's kbd-model-map. The ISO's configure_keyboard uses that same command before it builds the UKI, and omarchy_ensure_vconsole_xkb only fills an empty XKBLAYOUT. So for fr this branch writes nothing new and rebuilds nothing new, and whatever rejected the passphrase in #8196 is still unexplained.

Without XKBLAYOUT, the prompt is not on US QWERTY. The PR rests on that claim, but Plymouth only reads keys through XKB when XKBLAYOUT is set. When it isn't, Plymouth logs "Not creating devices for subsystem input because there is no configure XKB layout" (that string is in libply-splash-core) and reads the terminal instead. The keymap hook runs before encrypt and loads the console keymap into the kernel. I built initramfs images on the worker: a KEYMAP=cz-only vconsole.conf bundles keymap.bin for cz. So today, a keymap with no kbd-model-map row is typed at the LUKS prompt under the same console keymap the passphrase was set with. I worked that out from Plymouth's code path and the image contents; I didn't watch a live LUKS prompt.

Adding XKBLAYOUT is what changes the prompt, and for Czech it changes it to the wrong layout. The console keymap cz (/usr/share/kbd/keymaps/i386/qwerty/cz.map.gz) is QWERTY: keycode 21 is y. It has no kbd-model-map row, so omarchy_keymap_to_xkb reaches the two-letter fallback at install/helpers/keyboard-vconsole.sh:126 and returns cz with no variant. XKB cz with no variant is QWERTZ (<AD06> is z). I ran the helper on the worker: KEYMAP=cz gets XKBLAYOUT=cz and no XKBVARIANT. migrations/1790044019.sh then rebuilds the UKI straight away. After that, an existing Czech install whose passphrase contains y or z has those keys swapped at the unlock prompt. The matching XKB variant is cz qwerty, which is what systemd's own cz-lat2 row uses. Other gap keymaps get the same blank-variant fallback; pl and no-latin1 look fine. azerty, bg-cp1251 and kyrgyz get nothing.

Tests. test/shell.d/luks-keyboard-layout-test.sh passed 12 of 12 and hyprland-keyboard-layout-test.sh passed 7 of 7. ./test/cli failed one test, vscode generated theme references current theme file, which fails the same way on the base commit 7b336b1b0.

Overlap. #11418 fills the missing XKB values for the same keymaps, for the login screen. Its gap table maps cz to qwerty and bg-cp1251 to phonetic, and it doesn't rebuild the UKI for Latin layouts. #11056 points six of the installer's keymaps at ones systemd can map. These touch the same lines as this PR (apply_keyboard and a fill migration) and would conflict.

I haven't pushed anything: what the LUKS prompt should do for these keymaps, and which of the overlapping PRs to take, is the maintainer's call. This is waiting on the maintainer.

@greptile-apps

greptile-apps Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Critical impact] The changes since the last review appear safe to merge.

Summary

The PR saves keyboard settings for disk unlock and rebuilds boot files when needed. This follow-up fixes the keyboard tests and reports skipped checks correctly.

  • Selected keyboard layouts carry into the boot-time disk prompt.
  • Serbian Latin stays available at the disk prompt and sign-in screens.

Reviews (4) · Last reviewed commit: "point the provision keyboard test at the..." · Reviewed by Greptile

Comment thread install/helpers/keyboard-vconsole.sh Resolved
Comment thread migrations/1790044019.sh Resolved
@omarchybot

Copy link
Copy Markdown
Collaborator

I reviewed the new head d345b1c4d332b7c08e14acace98b19908763b465. The one new commit merges quattro, which since my last review gained its own XKB fill in bin/omarchy-provision-owner (#14433) and omarchy_vconsole.conf, which keeps a non-Latin vconsole.conf out of the initramfs under plymouth 26.134.222-3 (#14885). I ran it on a disposable worker built from the Omarchy ISO, which has plymouth 26.134.222-3 and systemd 262.1. The second opinion this time came from Codex Medium. It agreed with the findings below, and its agreement is not guaranteed independent, since it can read this session's work.

The PR's own test now fails. test/shell.d/luks-keyboard-layout-test.sh stops after 5 checks, at the apply_keyboard fr case. Since the merge, the apply_keyboard it extracts reads and appends to the real /etc/vconsole.conf at bin/omarchy-provision-owner:686-693, so OMARCHY_VCONSOLE_CONF no longer redirects it. On the worker's stock KEYMAP=us file, the readback gives us rather than fr and the function returns 1. The test also leaves out keyboard_xkb_settings, which that function now calls. On a host without XKBLAYOUT, it would try to write to the host's file.

The installer path no longer needs this helper. Upstream's keyboard_xkb_settings (bin/omarchy-provision-owner:634) fills and checks the XKB layout before omarchy_ensure_vconsole_xkb runs at line 702. So in apply_keyboard the PR's call never finds an empty layout. That leaves two keymap-to-XKB tables that disagree: upstream maps cz to cz,us/qwerty,, bg-cp1251 to bg,us/phonetic, and kyrgyz to kg,us. The PR's omarchy_keymap_to_xkb gives cz with no variant, and nothing at all for the other two.

The Czech lockout from my last review is still there, through the migration and install config. On the worker I ran migrations/1790044019.sh against a KEYMAP=cz-only file. It appended XKBLAYOUT=cz with no variant and called limine-mkinitcpio. The console keymap cz has y on keycode 21. XKB cz puts z on that key (<AD06>), and cz(qwerty) puts y there. So after the rebuild, an existing Czech install whose passphrase contains y or z has those keys swapped at the LUKS prompt. ua now gets XKBLAYOUT=ua but no rebuild, and #14885's guard keeps it out of the image, so the ua risk raised earlier is gone.

A failed rebuild can still be marked done. limine-mkinitcpio exits 0 after a kernel's mkinitcpio fails, and the migration then removes its pending flag at line 45. #14885's migration (migrations/1791621765.sh:42) checks for mkinitcpio failed for kernel in the output for exactly this reason.

The premise is still unshown. Neither model found a supported install path at this head where a Latin keymap reaches the LUKS prompt in a layout other than the one the passphrase was typed under. With only KEYMAP set, the keymap hook loads that console keymap and Plymouth reads keys through it. Without that reproduction there is no bug for the migration to fix, and the migration is what causes the Czech regression.

Tests. hyprland-keyboard-layout-test.sh (21), provision-owner-keyboard-test.sh (15), mkinitcpio-vconsole-test.sh (12), mkinitcpio-hooks-test.sh (31), plymouth-vconsole-migration-test.sh (14), nvidia-kms-hook-test.sh (11), keyboard-layout-test.sh (64) and ./test/cli (125) all passed. luks-keyboard-layout-test.sh failed as described.

I haven't pushed anything. Fixing the table and the test would polish a migration whose need hasn't been shown, so whether this should land beside #14433 and #14885, and against #11418 and #11056, is the maintainer's call. This is waiting on the maintainer.

Comment thread default/hypr/input.lua Resolved
Comment thread install/helpers/keyboard-vconsole.sh Resolved
Comment thread install/helpers/keyboard-vconsole.sh Resolved
@omarchybot

Copy link
Copy Markdown
Collaborator

I reviewed the new head 05e9a5fe61b591bdcc3de60d64f0d52bbab9f773. The one new commit merges quattro and resolves the default/hypr/input.lua conflict by keeping the Serbian Latin exception beside #14076's reordering of an existing us entry. I ran it on a disposable worker built from the Omarchy ISO. The second opinion came from two models, Codex Medium and muse-spark-1.3-contributor (via pi, thinking high). Both confirmed the findings below, but they could read this session's work, so their agreement isn't guaranteed to be independent.

One new finding: the login screen no longer matches the desktop for Serbian Latin. The merged default/hypr/input.lua:23-28 now leads with rs/latin when vconsole.conf has XKBLAYOUT=rs and XKBVARIANT=latin. default/sddm/hyprland.lua:42 has the same non_latin_layouts check without that exception, so the greeter still puts us in front. The header of that file asks for the two to be kept in sync. A password set on the desktop under rs/latin can type differently at the greeter, for example on y/z and on punctuation. Greptile raised this too. I read it in the source and didn't log in on the worker to confirm it.

Still open from my last review, rechecked at this head:

  • The migration can lock Czech users out at LUKS. On the worker I ran migrations/1790044019.sh against a vconsole.conf that only had KEYMAP=cz. It appended XKBLAYOUT=cz with no variant and called limine-mkinitcpio. In the console keymap cz, keycode 21 types y. In XKB cz, <AD06> types z, and in cz(qwerty) it types y. The cause is the two-letter fallback at install/helpers/keyboard-vconsole.sh:124-127.
  • The PR's own test fails. test/shell.d/luks-keyboard-layout-test.sh stops after 5 checks, at the apply_keyboard fr case. That function reads the real /etc/vconsole.conf at bin/omarchy-provision-owner:686-696, so the OMARCHY_VCONSOLE_CONF fixture doesn't redirect it.
  • The installer call doesn't do anything. Codex added this one. apply_keyboard returns at its XKB readback check (lines 691-696) before it reaches omarchy_ensure_vconsole_xkb at line 702. So the helper never runs in the one case it exists for.
  • A failed rebuild is still marked done. limine-mkinitcpio exits 0 when a kernel's mkinitcpio fails, and the migration then removes its pending flag (line 45). migrations/1791621765.sh checks the output for mkinitcpio failed for kernel for this reason.
  • The premise is still unshown. Codex and I found no supported install path where a Latin keymap reaches the LUKS prompt in a different layout from the one the passphrase was set under. With only KEYMAP set, the keymap hook loads that console keymap and Plymouth reads keys through it. muse-spark said Plymouth falls back to US XKB in that case. That contradicts the code path Codex read in the installed plymouth 26.134.222-3 and the initramfs I built on a worker last time, so I set it aside.

Tests on the worker: hyprland-keyboard-layout-test.sh (28), provision-owner-keyboard-test.sh (15), mkinitcpio-hooks-test.sh (31), mkinitcpio-vconsole-test.sh (12), nvidia-kms-hook-test.sh (11), keyboard-layout-test.sh (64) and ./test/cli (125) all passed. luks-keyboard-layout-test.sh failed as described above.

I haven't pushed anything. Whether this should land at all, beside #14433 and #14885 and against #11418 and #11056, is the maintainer's call, so this is waiting on the maintainer.

console cz is not xkb's default cz, the pending rebuild is recorded before the file changes, and the login screen keeps a latin variant.
the systemd map lists cz with no variant, so the qwerty exception has to win before that lookup. a failed pending-flag write now stops before the layout changes.
Comment thread bin/omarchy-provision-owner Resolved
readback was still using the host file after the path moved into omarchy_vconsole_conf. the root-only sudo case is reported as a skip.
@omarchybot

Copy link
Copy Markdown
Collaborator

I read the changes at 034942275ded433f9c26625cc467dc3ea64c88eb, the earlier discussion, linked issue #8196, and the current quattro rules. This was GPT-6 in Codex’s review only (effort setting not exposed). My classification is bug, but the configured second classifier, deepseek-v4p1-flash, returned no usable class, so the classification remains unsettled.

Verification stopped at that point: no tests ran and nothing was pushed. The temporary worker was destroyed. GitHub also reports conflicts with quattro. This is waiting for the classification review to be completed before verification can continue.

@omarchybot omarchybot removed the bug Something isn't working label Nov 20, 2026
@dhh

dhh commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

Superseded by omarchy-iso's pre-built UKI vconsole embedding together with #20187 and omacom/omarchy-iso#528. Thanks for the PR!

@dhh dhh closed this Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Full-disk install: password set under a non-US keyboard layout can be untypeable at the LUKS boot prompt

4 participants