Skip to content

Reject Voxtype on CPUs without AVX2 - #7890

Open
kx0101 wants to merge 2 commits into
omacom:quattrofrom
kx0101:fix/7883-voxtype-avx2-guard
Open

kx0101 wants to merge 2 commits into
omacom:quattrofrom
kx0101:fix/7883-voxtype-avx2-guard

Conversation

@kx0101

@kx0101 kx0101 commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

Closes #7883

Checks for AVX2 before showing the confirmation or downloading Voxtype and its model. CPUs that cannot execute the packaged voxtype-avx2 binary now receive a clear error instead of reaching voxtype setup and failing with SIGILL.

The regression test runs the real installer with simulated CPU capabilities and verifies both paths:

  • non-AVX2 CPUs stop before prompting or installing
  • AVX2 CPUs retain the existing setup flow

Tests:

  • bash test/shell.d/voxtype-install-test.sh
  • bash -n bin/omarchy-voxtype-install test/shell.d/voxtype-install-test.sh

Copilot AI balanced review requested due to automatic review settings August 23, 2026 13:46

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an AVX2 compatibility gate to prevent installing an unusable Voxtype binary.

Changes:

  • Rejects unsupported CPUs before prompting or downloading.
  • Tests both incompatible and AVX2-capable flows.

Tip

If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.

Reviewed changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated no comments.

File Description
bin/omarchy-voxtype-install Adds the AVX2 capability check and error.
test/shell.d/voxtype-install-test.sh Covers rejection and successful setup paths.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

voxtype-bin 1.1.0 ships a baseline CPU build and selects it when /proc/cpuinfo has no avx2, so refusing the whole install now blocks machines Voxtype runs on. The one step that still lands them on an AVX2-only binary is `voxtype setup gpu --enable`, which switches to the Vulkan build without checking the CPU; only take it when the CPU has AVX2.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@omarchybot omarchybot added the verified Omarchy Triage has verified that this issue is ready for final review label Sep 28, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Thanks @kx0101. Since this was opened, the ground under it moved, so I pushed a change on top (c91a6f1) that narrows the guard rather than refusing the install.

What changed underneath. voxtype-bin 1.1.0-2, now on every Omarchy package channel including stable, ships a voxtype-baseline build and its install hook points /usr/bin/voxtype at it whenever /proc/cpuinfo has no avx2 (and repoints a saved AVX2 choice on upgrade). On a worker, the packaged binaries were run under qemu CPU models transcribing a WAV with the tiny Whisper model: voxtype-baseline completed on Penryn (the Core 2 Duo generation in #7883) and Ivy Bridge, while voxtype-avx2 and voxtype-vulkan died with SIGILL on both and ran on Haswell. So the whole-install check here would now refuse machines Voxtype runs on.

What is still broken on quattro. bin/omarchy-voxtype-install runs voxtype setup gpu --enable whenever omarchy-hw-vulkan succeeds, which is any machine with a Vulkan ICD — every Intel or AMD GPU gets vulkan-intel/vulkan-radeon. Voxtype's setup gpu --enable switches to the Vulkan build without checking the CPU, so a Sandy/Ivy Bridge laptop is moved off the working baseline build onto one that crashes.

The change. The early exit is gone; the Vulkan step is taken only when the CPU has AVX2 (bin/omarchy-voxtype-install:18-21). Your test is kept and turned around: with Vulkan present, a CPU without AVX2 installs, downloads the model and enables the service but never calls setup gpu, and an AVX2 CPU still enables Vulkan. On a worker that test fails against quattro's installer, fails against this branch's previous head, and passes at c91a6f1 merged with current quattro; voxtype-install-test.sh and voxtype-invitation-test.sh pass through the shell-test wrapper. ./test/cli has one failure, vscode generated theme references current theme file, which fails the same way on unmodified quattro and is unrelated.

Reviewed by Claude Opus 5.5, with a second opinion from Codex Medium on c91a6f1: it found no defect in the installer or the test and agreed the Vulkan step is the one to guard. That agreement is with conclusions already written down, so its independence is not guaranteed. It could not fetch the package itself; the package contents above were checked separately on the worker.

The title and description still describe rejecting the install, so they are worth updating to match. This now waits on the maintainer.

@omarchybot omarchybot removed the verified Omarchy Triage has verified that this issue is ready for final review label Oct 8, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

This branch no longer merges into quattro: #14552 replaced bin/omarchy-voxtype-install with bin/omarchy-install-dictation-voxtype. Before porting the guard there, I checked again whether the bug it guards against can actually happen on quattro. It can't, and my earlier comment was wrong about that.

What I got wrong. I said the installer's voxtype setup gpu --enable moves a CPU without AVX2 off the baseline build. But the installer runs that command as the ordinary user, and it has to rewrite /usr/bin/voxtype, a root-owned symlink. On a worker with voxtype-bin 1.1.0-2 from the stable channel, running it as the user prints Failed to remove existing /usr/bin/voxtype (need sudo?): Permission denied, exits 1 and leaves the link where the package put it. The installer ignores that failure (|| true, bin/omarchy-install-dictation-voxtype:21). This is the failure #11110 reports. Nothing on quattro runs the step elevated: omarchy:requires-sudo is metadata the router records but never acts on, and the Defaults menu launches the installer through a plain terminal. So a machine without AVX2 keeps voxtype-baseline, which the package selects on install. The earlier verification was a test that mocks voxtype completely, so it showed the guard was there but not that the crash could happen.

Where the guard matters. It matters once something elevates that step. #12901 changes it to sudo voxtype setup gpu --enable with Vulkan as the only check, which would move a Vulkan machine without AVX2 onto the AVX2-only Vulkan build. #13508 also elevates it, but only switches when /usr/bin/voxtype already points at voxtype-avx2 or voxtype-avx512, so a baseline machine is left alone. Both still edit the old installer and need porting too. Whichever approach lands should carry this CPU check, and #13508's version of it already does.

Reviewed by Claude Opus 5.5, with a second opinion from Codex Medium. Codex read quattro and found no path that runs the installer or its GPU step as root. It agreed the bug isn't reachable today, which matches what I had already written, so its independence isn't guaranteed. It also noted that #12901 would make the bug reachable and that #13508 already guards against it. Nothing was pushed. This now waits on the maintainer: close it as not reachable on quattro, or keep the check for when the GPU step is elevated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working compatibility Make Omarchy work better on everything!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dictation installer offers AVX2-only Voxtype on CPUs without AVX2

3 participants