Skip to content

Keep a non-Latin vconsole.conf out of the initramfs again - #14885

Merged
emirb merged 3 commits into
omacom:quattrofrom
kevincardwell:plymouth-vconsole-guard
Oct 18, 2026
Merged

emirb merged 3 commits into
omacom:quattrofrom
kevincardwell:plymouth-vconsole-guard

Conversation

@kevincardwell

@kevincardwell kevincardwell commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Closes #14246.

Since 26.134.222-3 (packaging commit 159d7694), Arch's plymouth mkinitcpio hook copies the keyboard config itself:

if [[ -s /etc/vconsole.conf ]]; then
  add_file /etc/vconsole.conf
fi

The issue blames mkinitcpio 42.2, but the block comes from the plymouth package, as jandrusk pointed out there.

The guard added for #6229 keeps a non-Latin layout out of the initramfs by leaving /etc/vconsole.conf out of FILES. A hook calling add_file directly goes around it. With a first XKB layout that types no Latin letters (ru,us, ua,us, il, ...), Plymouth then asks for the LUKS passphrase in that layout, and the Latin passphrase can't be typed.

The -3 upgrade rebuilds the boot image itself, because the hook lives under usr/lib/initcpio/, so the first boot after that update is the lockout. As of 10 October, the x86 edge mirror and the aarch64 mirror serve -3. The x86 stable and rc mirrors still serve -2, so promoting -3 there before this lands would lock out non-Latin LUKS users on those channels.

Fix

  • New drop-in etc/mkinitcpio.conf.d/omarchy_vconsole.conf. It refuses /etc/vconsole.conf in add_file unless FILES lists it, which restores how things worked before -3. The layout decision stays in omarchy_hooks.conf, which this PR doesn't touch, so a FILES=(/etc/vconsole.conf) someone set on purpose is still honoured.

    • Why a separate file: pacman keeps omarchy_hooks.conf as configuration (backup=()). On a machine whose copy was edited, or predates the package (Omarchy 3 upgrades, see Snapper rollbacks silently un-apply Omarchy migrations (surfaced as: LUKS prompt still QWERTY after e891e5c) #9828), a change to it would only ever arrive as a .pacnew. A new file outside backup=() reaches every machine.
    • Why it only installs once: mkinitcpio sources the config again after the hooks run, and the systemd hook sources it again before calling add_file. A second wrap would make add_file call itself.
  • Migration 1791621765.sh. Nothing rebuilds the image when a drop-in changes, so an image built since -3 still holds the file. The migration rebuilds once per machine, with limine-mkinitcpio, like the other rebuild migrations. It only does so where both of these hold:

    • the installed drop-ins now refuse the file, evaluated the way mkinitcpio would, as 1786605598 does;
    • the plymouth hook copies it.

    limine-mkinitcpio exits 0 after skipping a kernel it couldn't build, so the migration also watches for that message and stays pending.

I didn't ship an /etc/initcpio/install/plymouth override (suggested in the issue). It would stand in for Arch's hook on every machine, and put the same decision in a second place.

Tested

Real images built with mkinitcpio 41.1 and 42.2 in an unprivileged namespace, with the plymouth -3 hook. etc/vconsole.conf in the image:

Setup quattro this branch
x86, ru,us (the reporter's file), ua,us, il bundled absent
x86, de bundled bundled
x86, ru,us, Omarchy 3 omarchy_hooks.conf (no vconsole lines) bundled absent
Apple systemd line (base systemd plymouth), ru,us bundled absent
Apple systemd line, de bundled bundled
FILES=(/etc/vconsole.conf) in mkinitcpio.conf, ru,us bundled bundled

Where the result changes, the images differ only by etc/vconsole.conf.

  • test/shell.d/mkinitcpio-vconsole-test.sh builds the image the way mkinitcpio does: drop-ins sourced with add_file defined, the plymouth -3 call, FILES, then the second sourcing and another add_file.
    • It runs with a stub and, where mkinitcpio is installed, with its real add_file.
    • It fails without the drop-in. With FUNCNEST, it also fails if the once-only check is removed.
  • test/shell.d/plymouth-vconsole-migration-test.sh covers:
    • the rebuild, and that it runs once per machine;
    • a rebuild that fails, and one that skips a kernel but exits 0;
    • Latin layouts, the -2 hook, a hook that copies the file from its map list, an Omarchy 3 omarchy_hooks.conf, and a drop-in that bundles the file on purpose;
    • a missing vconsole.conf, an exported XKBLAYOUT, and no Limine.
  • Existing tests: hyprland-keyboard-layout-test.sh (which reads the layout list from omarchy_hooks.conf), mkinitcpio-hooks-test.sh, mkinitcpio-apple-drop-ins-test.sh, nvidia-kms-hook-test.sh, settings-runtime-profile-test.sh and config-test.sh (against an omarchy-pkgs checkout) pass.

#12896 rewrites the same case in omarchy_hooks.conf. This PR doesn't touch that file, so the two don't conflict, and its Latin-variant rule carries through FILES.

Fixes #15802

Since 26.134.222-3, Arch's plymouth hook copies /etc/vconsole.conf into
the initramfs itself. The guard added for omacom#6229 only leaves the file out
of FILES, so it no longer stops it: with a first XKB layout that types no
Latin letters, Plymouth asks for the LUKS passphrase in that layout and
the passphrase cannot be typed (omacom#14246).

omarchy_vconsole.conf refuses the file in add_file unless FILES lists
it, which is how it worked before. It is a drop-in of its own because
pacman keeps omarchy_hooks.conf as configuration, so a machine whose copy
was edited or predates the package never receives a change to it.

Nothing rebuilds the boot image when a drop-in changes, so a migration
rebuilds it once where the installed drop-ins now leave the file out and
the plymouth hook copies it.
@greptile-apps

greptile-apps Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no blocking issues remain.

Summary

Keeps non-Latin keyboard settings out of boot images while preserving Latin layouts and explicit FILES entries.

  • Plymouth keeps non-Latin layouts out of new unlock images.
  • Existing boot images are rebuilt to match the keyboard-layout rule.

Reviews (4) · Last reviewed commit: "Keep a Latin layout at the prompt when o..." · Reviewed by Greptile

Comment thread migrations/1791621765.sh Resolved
The guard checked FILES once, when its drop-in was sourced, so a drop-in
sorting after it that lists /etc/vconsole.conf was refused as well. It
now checks FILES inside add_file: a hook runs with FILES local and empty,
so its copy is still refused, and parse_config adds the configuration's
own FILES once the hooks have run.

The migration read only Omarchy's two drop-ins, so a mkinitcpio.conf or
later drop-in listing the file got a rebuild that changed nothing. It now
sources the main file and every drop-in as one, as mkinitcpio does.
@omarchybot

Copy link
Copy Markdown
Collaborator

Thanks for this. omabot read the pull request and its description, and Claude Opus 5.5 classifies it as a bug fix (keeping a non-Latin vconsole.conf out of the initramfs now that the plymouth hook adds it itself, #14246). The second, independent classification by Codex Medium did not run, because omabot's reviewer had reached its daily limit, and a class only counts here when both models agree on it.

So nothing beyond that reading has happened yet: no label, no tests on a worker, no line-by-line review, and no finding either way. The pull request stays in omabot's queue and will be classified and verified on a later pass; until then it is waiting on that pass, not on you.

…e package

An omarchy_hooks.conf written before the package (3.0 to 3.8.2) never lists vconsole.conf in FILES, so on such a machine Plymouth's own copy is what brings a Latin layout like German to the LUKS prompt since 26.134.222-3. Refusing it there switched the prompt to US and rejected a passphrase typed in German. Refuse the file only when the first layout is in the non-Latin list omarchy_hooks.conf already keeps out of FILES.
@emirb

emirb commented Oct 18, 2026

Copy link
Copy Markdown
Contributor

I pushed one commit (16d4e05) on top of yours, because of a lockout we found while testing this for 4.0.6.

On a machine that kept the omarchy_hooks.conf written by 3.0–3.8.2, the file is a single HOOKS= line with no FILES, so the guard refused vconsole.conf for every layout. With a Latin layout like German, Plymouth -3's copy is what carries the layout to the prompt, so the prompt switched to US and a passphrase typed in German was rejected. The commit refuses the file only when the first layout is in the same non-Latin list omarchy_hooks.conf already keeps out of FILES. It adds a test for the stale-config German case, which fails without the change.

Tested at boot level in QEMU/KVM, with the passphrase typed as keystrokes on the graphical Plymouth prompt:

Config Layout Before the commit After
3.x one-line hooks file de German passphrase zy#ü- rejected (prompt is US) prompt stays German, unlocks
4.0.5 packaged hooks file ru,us — rebuilt once, vconsole.conf gone, unlocks
3.x one-line hooks file ru,us — rebuilt once, vconsole.conf gone, unlocks

mkinitcpio-vconsole-test.sh passes 12/12 and plymouth-vconsole-migration-test.sh 14/14.

@emirb
emirb merged commit 1d134a5 into omacom:quattro Oct 18, 2026
1 check passed
ryanrhughes pushed a commit that referenced this pull request Oct 19, 2026
* Keep a non-Latin vconsole.conf out of the initramfs again

Since 26.134.222-3, Arch's plymouth hook copies /etc/vconsole.conf into
the initramfs itself. The guard added for #6229 only leaves the file out
of FILES, so it no longer stops it: with a first XKB layout that types no
Latin letters, Plymouth asks for the LUKS passphrase in that layout and
the passphrase cannot be typed (#14246).

omarchy_vconsole.conf refuses the file in add_file unless FILES lists
it, which is how it worked before. It is a drop-in of its own because
pacman keeps omarchy_hooks.conf as configuration, so a machine whose copy
was edited or predates the package never receives a change to it.

Nothing rebuilds the boot image when a drop-in changes, so a migration
rebuilds it once where the installed drop-ins now leave the file out and
the plymouth hook copies it.

* Read FILES when vconsole.conf is added, not when the guard loads

The guard checked FILES once, when its drop-in was sourced, so a drop-in
sorting after it that lists /etc/vconsole.conf was refused as well. It
now checks FILES inside add_file: a hook runs with FILES local and empty,
so its copy is still refused, and parse_config adds the configuration's
own FILES once the hooks have run.

The migration read only Omarchy's two drop-ins, so a mkinitcpio.conf or
later drop-in listing the file got a rebuild that changed nothing. It now
sources the main file and every drop-in as one, as mkinitcpio does.

* Keep a Latin layout at the prompt when omarchy_hooks.conf predates the package

An omarchy_hooks.conf written before the package (3.0 to 3.8.2) never lists vconsole.conf in FILES, so on such a machine Plymouth's own copy is what brings a Latin layout like German to the LUKS prompt since 26.134.222-3. Refusing it there switched the prompt to US and rejected a passphrase typed in German. Refuse the file only when the first layout is in the non-Latin list omarchy_hooks.conf already keeps out of FILES.

---------

Co-authored-by: Emir Beganovic <[email protected]>
(cherry picked from commit 1d134a5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants