omarchy icon indicating copy to clipboard operation
omarchy copied to clipboard

UKI Build Regression: Illegal Instruction (Exit Status 32) on x86-64-v2 Hardware

Open acraig78 opened this issue 9 months ago • 2 comments

System details

Intel Core m3-8100Y, Surface Go 2, Omarchy 3.3.3

What's wrong?

UKI Build Regression: Illegal Instruction (Exit Status 32) on x86-64-v2 Hardware

System Info:

CPU: Intel Core m3-8100Y (Surface Go 2)

Architecture Level: x86-64-v2 (AVX/AVX2 flags missing/disabled in firmware)

Kernel: Working on 6.18.3-arch1-1 | Fails on 6.18.7

While updating to kernel 6.18.7, the post-transaction hooks for building the Unified Kernel Image (UKI) fail with an "illegal instruction" error. This results in an exit status 32 during the systemd-remount-fs stage upon reboot, forcing the system into Emergency Mode.

Technical Details:

A manual trigger of mkinitcpio (e.g., via intel-ucode reinstall) works perfectly on kernel 6.18.3.

The failure occurs during the 6.18.7 update's Updating linux initcpios phase.

lscpu confirms the hardware is limited to x86-64-v2.

The crash is likely caused by a toolchain dependency (likely zstd, mkinitcpio, or ukify) in the latest update being compiled with x86-64-v3 (AVX2) instructions.

Steps to Reproduce:

Use an Intel m3-8100Y or similar v2-only CPU.

Attempt to upgrade to kernel 6.18.7-arch1-1.

Observe the trap invalid opcode or exit status 32 during the UKI build hooks.

acraig78 avatar Feb 14 '26 21:02 acraig78

Thanks for reporting this, @acraig78! This looks like a critical regression—SIGILL (exit code 32) on a modern x86-64-v2–compliant CPU like your Intel Core m3-8100Y suggests that some code in the UKI build is emitting instructions not supported by your processor (or by the CPU feature set we assumed during compilation). 🔍 Initial investigation points: - The m3-8100Y is based on Whiskey Lake-U, supports x86-64-v2 (per AMD/Intel CPU feature guidelines), including SSE4.2 and POPCNT—but not AVX2/AVX-512. - If the build toolchain (e.g., rustc, gcc, or linker) defaulted to -march=native or -xHost, and was run on a machine with AVX-512 support (or misdetected), it might emit incompatible instructions. - With UKI (Unified Kernel Image) builds, the kernel and initramfs may be compiled with overly aggressive CPU targets—especially if cross-building. 🛠️ Immediate workarounds (to confirm/resolve): 1. Verify compiled binary compatibility Run this on your Surface Go 2 to check the actual instruction set of the problematic binary (e.g., kernel, initramfs, or uki-stub): bash objdump -d /path/to/binary | grep -E 'v[xyz]mm' # check for AVX* 2. Rebuild with explicit CPU target If you’re building Omarchy from source (or have access to the UKI toolchain), enforce x86-64-v2: - For Rust: RUSTFLAGS="-C target-feature=-avx,-avx2,-avx512f" cargo build --release - For C/C++: -march=x86-64-v2 (GCC/Clang ≥8) or -march=haswell (fallback) - In kernel builds: ensure CONFIG_X86_64_V2=y and avoid CONFIG_X86_64_V3/V4. 3. Check Omarchy’s build config Does build.sh, Dockerfile, or CI (e.g., .github/workflows/) use TARGET_CPU=native or -xHost? That’s likely the culprit. 🚨 If this is prebuilt (e.g., .uki from release assets): Please share: - Exact UKI filename / commit hash - Output of lscpu | grep 'Model name\|Flags' - Kernel log (dmesg | grep -i 'illegal') if you can capture it We’ll prioritize this for 3.3.4—I’ll tag @basecamp/omarchy-eng so the team can investigate toolchain flags and CI hardware coverage. Let me know if you’d like help triaging the binary directly!

jamescraig17 avatar Feb 14 '26 21:02 jamescraig17

@acraig78 this sounds strangely related to #4554 In case you are about to reinstall anyway you might want to have a look at the workaround which worked for us™: remove limine-snapper-sync and limine-mkinitcpio-hook through pacman and replace with aur version Good luck =)

StefanFaltz avatar Feb 16 '26 22:02 StefanFaltz