Repository navigation
Persist XKBLAYOUT for LUKS so non-US layouts stay typeable - #12896
chessing234 wants to merge 8 commits into
Conversation
|
Two issues remain at Elevate the migration's config write
With
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 gapsAgainst systemd 261's actual
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 informationTest 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 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. |
e97fe6d to
c37fb5e
Compare
|
migration writes vconsole.conf with sudo |
Automated AI review
Follow-up to the earlier review of
Three new issues follow: the new XKB mappings differ from the enrolled console keymap for some layouts, Verified:
Verified: the drop-in now bundles Correction (
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 keymapFor KEYMAP-only files, the helper now writes an XKB layout whenever it finds a mapping. Once
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.
|
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.
|
pending-rebuild flag under state/omarchy so a failed limine run is retried instead of marked complete. |
Automated AI review
Follow-up to the earlier review of
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 rebuildVerified: the real A refused Caveats:
The no-Limine branch fails the migration on every runThe new
Impact: Suggested change: when neither command is present, remove the flag and exit 0, the way Unchanged earlier findingsXKB mappings vs the enrolled console keymap:
Optional test improvement: Verified: Review informationTest scope: Source comparison of 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. |
|
Thanks for taking this on. I reviewed head The French case already has Without Adding Tests. Overlap. #11418 fills the missing XKB values for the same keymaps, for the login screen. Its gap table maps 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. |
[Critical impact] The changes since the last review appear safe to merge. SummaryThe 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.
Reviews (4) · Last reviewed commit: "point the provision keyboard test at the..." · Reviewed by Greptile |
|
I reviewed the new head The PR's own test now fails. The installer path no longer needs this helper. Upstream's The Czech lockout from my last review is still there, through the migration and install config. On the worker I ran A failed rebuild can still be marked done. 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 Tests. 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. |
|
I reviewed the new head One new finding: the login screen no longer matches the desktop for Serbian Latin. The merged Still open from my last review, rechecked at this head:
Tests on the worker: 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.
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.
|
I read the changes at Verification stopped at that point: no tests ran and nothing was pushed. The temporary worker was destroyed. GitHub also reports conflicts with |
|
Superseded by omarchy-iso's pre-built UKI vconsole embedding together with #20187 and omacom/omarchy-iso#528. Thanks for the PR! |
Summary
KEYMAPandXKBLAYOUT(from systemd's kbd-model-map, with colemak/dvorak variants) so Plymouth's LUKS prompt matches the layout used at passphrase enrollment.KEYMAP.Fixes #8196.
Test plan
bash test/shell.d/luks-keyboard-layout-test.shMade with Cursor