Skip to content

Enable Voxtype GPU backend through sudo - #12901

Open
chessing234 wants to merge 2 commits into
omacom:quattrofrom
chessing234:fix/11110-voxtype-gpu-sudo
Open

chessing234 wants to merge 2 commits into
omacom:quattrofrom
chessing234:fix/11110-voxtype-gpu-sudo

Conversation

@chessing234

@chessing234 chessing234 commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Voxtype’s GPU setup rewrites /usr/bin/voxtype. Running it without sudo failed and silently left the CPU backend selected. Run that step through sudo and warn when it fails.

GPU setup now runs outside the config-copy guard as well: an earlier failed attempt may already have created config.toml, and rerunning the installer must repair the backend while preserving custom settings. The Vulkan-runtime and executable-backend checks still gate the GPU step, including packages that do not ship a usable Vulkan binary.

Closes #11110.

Validation:

  • The new existing-config regression fails before moving GPU setup outside the guard.
  • All seven cases in voxtype-install-test.sh pass: elevated GPU setup, missing/unusable backends, no Vulkan runtime, existing config retry, and visible failure for both fresh and existing configs while model/service setup completes.
  • Consolidated sudo/warning coverage into the existing installer suite and removed the redundant voxtype-gpu-sudo-test.sh file.
  • Bash syntax and git diff --check pass.

These tests exercise the real installer with command-boundary stubs. They do not attest physical GPU acceleration.

Prepared with AI assistance (Cursor/Codex).

Latest Linux validation after merging quattro (6194f46): all seven Voxtype installer cases pass in the VM. CI run and downloadable logs. Review and i18n checks pass. The full VM check is not green: its only failing file is the unchanged background-intro-lifecycle-test.sh (app retints also wait through the opening crossfade), also observed on the config-only PR. No background/animation code is changed here.

Fixes #7099

@llstrk

llstrk commented Sep 22, 2026

Copy link
Copy Markdown

Verified: No production defect found in the tested scope at 9bc8d56f. With synthetic dependencies, the installer elevates only the GPU switch, skips it without Vulkan, and warns on GPU setup or sudo failure while continuing user-level service setup.

Installer branch Baseline This PR
Vulkan available Unelevated voxtype setup gpu --enable sudo voxtype setup gpu --enable
GPU step fails Failure status ignored Explicit installer warning on stderr; setup continues
Vulkan unavailable GPU step skipped Unchanged

The new regression test passes on this head and fails against the baseline installer at the expected sudo assertion.

Optional test improvement: In test/shell.d/voxtype-gpu-sudo-test.sh, assert that the successful Vulkan case's captured output contains no GPU-failure warning. A diagnostic mutation that prints the warning even after success still passes all three checks. This is test-only coverage; the current installer does not emit that spurious warning.


Review information

Test scope: Source inspection and isolated baseline/head tests with mocked dependencies. Actual privilege escalation, GPU switching and Vulkan dictation were not tested; recovery from a partially completed real switch is unverified.

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, followed by verification of the reported claims against targeted evidence.

@chessing234

Copy link
Copy Markdown
Contributor Author

thanks — nothing further on my side

@omarchybot omarchybot added the bug Something isn't working label Sep 27, 2026
@omarchybot omarchybot added the verified Omarchy Triage has verified that this issue is ready for final review label Oct 2, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Thanks, @chessing234. This fix works as described. I tested it at 9bc8d56f on a disposable Omarchy VM with the real voxtype-bin 1.1.0 and a Vulkan driver installed, stubbing only the confirmation prompt and the desktop reload:

  • On quattro, voxtype setup gpu --enable fails with Permission denied (os error 13), /usr/bin/voxtype stays on voxtype-avx512, and the install still reports success.
  • On this branch, the same install switches it to voxtype-vulkan, and a second run leaves it there.
  • When the GPU step fails (the voxtype-vulkan binary removed, as on aarch64), voxtype exits 1. The installer prints the new warning, finishes setting up the service on CPU, and still sends the ready notification.
  • test/shell.d/voxtype-gpu-sudo-test.sh passes here and fails against the quattro installer. ./test/cli is green.

I've linked #7099 as well as #11110, since both report this bug.

There's one consequence for the maintainer to weigh. Because the GPU step can now succeed, it also succeeds on Intel Haswell GPUs. #11370 reports that voxtype-vulkan aborts on every model load there, so voxtype.service restarts into a crash loop every five seconds. omarchy-hw-vulkan only checks that an ICD file exists, and vulkan-intel installs one for Haswell too. Today those machines are protected only by this bug. I traced this from the source and the report; a VM can't reproduce it. I don't think this branch should take on the Haswell check, because #11481 already adds it. But it would be safest to merge after #11481 or together with it.

#13508 is a competing fix for the same bug. It also runs the switch under sudo, and it adds its own Haswell check, skips machines with no voxtype-vulkan, and only switches away from a CPU build. Unlike this one, a failed sudo voxtype setup gpu --enable there stops the install under set -e before voxtype setup systemd. Choosing between them is the maintainer's decision, so this isn't marked ready.

Reviewed by Claude Opus 5.5. The second opinion, Codex Medium, did not run: today's review quota was spent. So nobody else has checked this yet.

This is waiting on the maintainer to choose between this and #13508, and to decide whether #11481 lands first.

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

Copy link
Copy Markdown
Collaborator

#14552 replaced bin/omarchy-voxtype-install with bin/omarchy-install-dictation-voxtype, so this branch stopped merging. The new installer still runs voxtype setup gpu --enable || true as the user, so the bug is still there on quattro. I merged quattro into this branch as 1c65793 and moved your change into the new installer unchanged. The test now runs that script, with a fresh config directory each time, because the new installer only runs the GPU step when no Voxtype config exists yet. Nothing else in the change differs.

I tested 1c65793 on a disposable Omarchy VM with the real voxtype-bin package and a Vulkan driver:

  • On quattro, voxtype setup gpu --enable fails with Permission denied (os error 13), /usr/bin/voxtype stays on voxtype-avx512, and the install finishes as if it had worked.
  • On this branch, the same install switches it to voxtype-vulkan, and a second run leaves it there.
  • With only the installer reverted to quattro's, it stays on voxtype-avx512 again.
  • When the GPU step fails (with the voxtype-vulkan binary removed), the installer prints the warning, enables the service on CPU and finishes.
  • test/shell.d/voxtype-gpu-sudo-test.sh passes here and fails against quattro's installer. ./test/cli and test/shell.d/dictation-test.sh pass.

Codex Medium reviewed the ported change as a second opinion. It found the merge faithful and the change proportionate. It raised one point I had already raised on the previous head, so its agreement there is not fully independent: once the switch can succeed, Intel Haswell machines get voxtype-vulkan too. #11370 reports that it aborts on every model load there, so voxtype.service would crash-loop. #11481 adds the Haswell check, so this should land after it or together with it, and #11481 needs the same port to the new installer. Codex also found that #12901 should win over the competing #13508. Both elevate the switch, but if sudo voxtype setup gpu --enable fails in #13508, set -e stops the install before the service is set up. Here it warns and carries on.

One thing for the maintainer: the GPU step now runs only on a first install. Anyone who installed dictation while this bug was live keeps the CPU build when they rerun the installer, because their config already exists. Fixing those machines would need a migration, which is beyond this pull request.

This is waiting on the maintainer to decide the order with #11481.

@greptile-apps

greptile-apps Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5RetriggerView in Greptile

[Critical impact] The PR appears safe to merge; no new blocking issues were found.

Summary

Enables Voxtype GPU setup through sudo and warns when it fails.

  • Model and service setup still continue after GPU setup fails.
  • Extends dictation-test.sh to cover elevation, failure warnings, and preserved backend choices on reruns.
  • Contrary to the PR description, GPU setup remains inside the first-config guard. omarchybot accepted leaving older failed installs unrepaired on rerun to preserve deliberate CPU choices; Greptile conceded that tradeoff.
  • No new actionable issues found since the previous review.

Reviews (10) · Last reviewed commit: "Report Voxtype GPU setup failure accurat..." · Reviewed by Greptile

Comment thread bin/omarchy-install-dictation-voxtype Resolved
Comment thread test/shell.d/voxtype-gpu-sudo-test.sh Resolved
@omarchybot

Copy link
Copy Markdown
Collaborator

Greptile left two review comments on 1c65793. Here is what I found for each.

The success test didn't check that the switch worked (test/shell.d/voxtype-gpu-sudo-test.sh:105). This is correct. An installer that printed the warning even after a successful switch would still have passed. I pushed 46d3441, which asserts that the successful Vulkan run prints no warning. That is the only change. The installer is the same as in 1c65793. On a disposable Omarchy VM, the test passes at 46d3441 and fails against an installer altered to always warn. test/shell.d/dictation-test.sh and ./test/cli pass.

Existing users miss the fix (bin/omarchy-install-dictation-voxtype:23). The problem is real. I raised it in my previous comment. Moving the GPU step outside the config guard is not the right fix for this pull request, though. quattro (#14552) deliberately skips choosing a backend when a Voxtype config already exists. Moving the step would switch to Vulkan on every rerun, which would override anyone who chose the CPU build on purpose. It would also put rerunning Haswell machines into the #11370 crash loop. Fixing machines installed while this bug was live means deciding which ones to touch, so it belongs in a migration. That decision is the maintainer's.

Codex Medium reviewed the new commit and both points as a second opinion. It agreed on both, and since my reasoning was already written down, that agreement is not fully independent. It found nothing new beyond the Haswell point that is already open.

This is still waiting on the maintainer to decide the order with #11481, which adds the Haswell check and, like #13508, no longer merges cleanly.

@omarchybot omarchybot added verified Omarchy Triage has verified that this issue is ready for final review and removed verified Omarchy Triage has verified that this issue is ready for final review labels Oct 10, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

This stopped merging again because quattro changed the same lines in bin/omarchy-install-dictation-voxtype. #14431 now runs the GPU switch only when /usr/lib/voxtype/voxtype-vulkan is installed, because aarch64 voxtype-bin doesn't ship it. It still runs the switch as the user with || true. I merged quattro into this branch as 04a7836 and kept both changes: the new check decides whether to switch, and the switch runs under sudo with your warning if it fails. I also made two test changes. test/shell.d/voxtype-gpu-sudo-test.sh now provides a stub voxtype-vulkan so its Vulkan case reaches the switch. quattro's new test/shell.d/voxtype-install-test.sh gets a sudo stub so the elevated call reaches its fake voxtype and not the real sudo.

I tested 04a7836 on a disposable Omarchy VM with the real voxtype-bin 1.0.1 and the lavapipe Vulkan driver, stubbing only the confirmation prompt and hyprctl:

  • With quattro's installer, voxtype setup gpu --enable fails with Permission denied (os error 13), /usr/bin/voxtype stays on voxtype-avx512, and the install exits 0.
  • On this branch, the install switches it to voxtype-vulkan, and a second run leaves it there.
  • With voxtype-vulkan moved away, the step is skipped and nothing is printed, as quattro intends.
  • When the elevated switch fails, the installer prints the warning, enables voxtype.service on CPU and finishes.
  • voxtype-gpu-sudo-test.sh passes here and fails with quattro's installer. voxtype-install-test.sh, dictation-test.sh and ./test/cli pass.

Claude Opus 5.5 did the merge and the testing. Codex Medium reviewed the merge as a second opinion. It found no problems: both sides survive, the test changes keep every assertion, and the change is proportionate. It was agreeing with reasoning I had already written down, so that agreement isn't fully independent.

The open points from before still stand. Once the switch can succeed, Intel Haswell machines get voxtype-vulkan too, and #11370 reports it crash-loops there. #11481 adds the Haswell check, but it doesn't merge cleanly either. Existing installs also keep the CPU build when they rerun the installer.

This is waiting on the maintainer to decide the order with #11481 and to choose between this and #13508.

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

Copy link
Copy Markdown
Collaborator

I reviewed 298af23, which adds the retry for existing configs and moves the sudo coverage into voxtype-install-test.sh. I tested it on a disposable Omarchy VM with the real voxtype-bin 1.2.2 and the lavapipe Vulkan driver.

The fix works.

  • With quattro's installer, voxtype setup gpu --enable fails with Permission denied (os error 13) and /usr/bin/voxtype stays on voxtype-avx512.
  • With this branch, a fresh install switches to voxtype-vulkan. A rerun with an existing config.toml switches too, where quattro doesn't try.
  • Running it under sudo left nothing behind in /root.
  • voxtype-install-test.sh passes all seven cases. It fails with quattro's installer, with sudo removed, and with the GPU step moved back inside the config check.
  • ./test/cli and dictation-test.sh pass.
  • CI's test job fails in one file, i18n-startup-test.sh. This branch doesn't touch it, and I didn't check whether it also fails on quattro.

I've linked #7099, which reports the same Permission denied and is fixed by this too.

Moving the switch out of the config check has side effects. The switch now runs on every run of the installer, and omarchy default dictation voxtype runs the installer whenever someone picks Voxtype again. I reproduced each of these on the VM:

  • It undoes a deliberate CPU choice. After sudo voxtype setup gpu --disable, a rerun switches back to Vulkan. On Intel Haswell, Voxtype install enables Vulkan on Haswell (hasvk) GPUs, causing an endless SIGABRT crash loop #11370 reports that Vulkan crash-loops and that disabling GPU is the workaround, so a rerun would bring the crash loop back. Keep Voxtype on CPU for Intel Haswell GPUs #11481, which keeps Haswell on CPU, is still open.
  • It changes the backend for ONNX users. With the ONNX build active, a rerun ran voxtype's GPU detection for ONNX. That selected the MIGraphX backend, which voxtype itself reported could not load because the ROCm libraries were missing. ONNX Runtime falls back to CPU, so dictation still worked, but the user's choice was replaced.
  • The switch doesn't take effect on a rerun. systemctl --user enable --now doesn't restart a service that's already running. After the rerun, the same daemon process was still running voxtype-avx512 while voxtype-vulkan waited on disk. That leaves the people the retry is meant for on CPU until they restart the service or log in again.
  • The warning can be wrong. It says "dictation will use the CPU build", but if GPU was already enabled and the password prompt is cancelled, nothing switches back to CPU. It's also hard-coded English, while the installer's other messages go through omarchy-i18n.

Repairing installs that ran into this bug can't currently be told apart from overriding someone's own choice. #13508 switches only when the active binary is an AVX2 or AVX-512 build. That would leave ONNX users alone, but not someone who ran gpu --disable, since that also goes back to an AVX build. Without the retry, only fresh installs change, which fixes #11110 and #7099 going forward but leaves earlier installs on CPU.

Claude Opus 5.5 did the review and testing. Codex Medium and muse-wonder (via pi, thinking high) gave second opinions. Both agreed the sudo switch and the warning are right. Both raised the rerun side effects above, and muse-wonder first spotted the missing service restart, which I then confirmed on the VM. They also noted that the test's sudo check relies on its own stub: the fake voxtype fails unless the fake sudo sets VOXTYPE_AS_ROOT. They also noted that the bare voxtype setup gpu --enable assertion repeats the sudo one. They read the code without running it, and they may have seen my earlier notes on this pull request, so their agreement isn't fully independent.

I didn't push anything, because what should happen on a rerun is a decision about behaviour. Earlier I raised that existing installs stay on CPU, and the retry answers that point. This is waiting on the maintainer to decide whether rerunning the installer should switch to GPU again, and in which order to land this and #11481. I compared this with #13508, which makes the same sudo fix and was opened later. This one came first and fixes the same cause, so it is the one to take.

@peteonrails

Copy link
Copy Markdown
Contributor

One update from voxtype that should make the ordering simpler. voxtype 1.3.2-rc1 (pre-release) makes voxtype setup gpu --enable refuse the Vulkan build when the CPU lacks AVX2 or the GPU lacks 16-bit storage, and say why. That covers the Haswell crash loop in #11370 and the pre-AVX2 machines in #7883 inside voxtype, so once Omarchy's repo has 1.3.2, I don't think this needs to wait on #11481.

On the rerun question omarchybot raised: I lean toward keeping the switch to first installs. A rerun that undoes voxtype setup gpu --disable would bring a crash loop back for anyone who turned Vulkan off to escape one. It's a tradeoff, though, since earlier installs stay on CPU. What do you think?

@omarchybot

Copy link
Copy Markdown
Collaborator

I checked the 1.3.2-rc1 source and the current package. The release candidate checks AVX2 and GPU 16-bit storage before switching the Whisper backend to Vulkan, with a PCI fallback for a machine whose only graphics device is Haswell. Unknown GPU capabilities still allow the switch. This was checked by reading the source; I have not tested the new guards on Haswell or pre-AVX2 hardware. A fresh worker with refreshed package databases still receives voxtype-bin 1.3.0-1, so the upstream guards cannot replace #11481 yet.

With that packaged version and lavapipe on a disposable Omarchy worker, the base installer fails with Permission denied, this head selects Vulkan, and restoring the base installer reproduces the failure. Rerunning this head after sudo voxtype setup gpu --disable selects Vulkan again while preserving the existing config. These checks used real sudo and GPU setup; model downloads, service management and UI commands were stubbed. ./test/cli, all seven installer cases and all 16 dictation tests pass. Head CI still fails in i18n-startup-test.sh; I have not established whether that failure also occurs on the base.

GPT-6 in Codex (effort unspecified) checked the code and ran these worker checks. Opus 5.5 High and muse-wonder via pi, thinking high reviewed the source and results. Both agreed that the upstream guards leave the rerun decision unresolved; they received the earlier reasoning, so their agreement is not an independent confirmation.

This remains with the maintainer: whether GPU selection should run only for a new config, and whether to wait for #11481 or a package carrying the upstream guards. No commits were pushed.

@omarchybot omarchybot removed the verified Omarchy Triage has verified that this issue is ready for final review label Nov 23, 2026
@chessing234

Copy link
Copy Markdown
Contributor Author

@peteonrails agreed, moved the gpu switch back inside the first-install config check so reruns don't override voxtype setup gpu --disable or custom backends. updated the test to match.

@omarchybot omarchybot added the verified Omarchy Triage has verified that this issue is ready for final review label Nov 24, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

The rerun regression is resolved: GPU setup is back inside the fresh-config check, so rerunning the installer preserves an explicit CPU backend choice and custom configuration. I pushed e5e8ff1 to resolve the conflict with current quattro. The resolution keeps #19904’s deletion of voxtype-install-test.sh; the remaining diff is only the installer’s sudo call and failure warning.

On a disposable Omarchy worker with real voxtype-bin 1.3.1-1 and lavapipe, the base installer fails with Permission denied and keeps the CPU link, this head selects voxtype-vulkan, and restoring the base installer reproduces the failure. The existing-config rerun preserves the chosen CPU backend. A simulated sudo refusal prints the warning while setup continues. ./test/cli and all 17 dictation tests pass. GPU setup and sudo were real except the explicit refusal case; model, service and UI calls were stubbed. This does not establish physical GPU acceleration or Haswell safety. All current-head CI checks pass, including the VM test job; Greptile reviewed this head at 5/5, and both historical findings have answers in their threads.

GPT-6 in Codex (effort unspecified) checked the code and ran the worker checks. Opus 5.5 High and muse-wonder via pi, thinking high reviewed e5e8ff1 and found no new code defect, including in the conflict resolution. Their agreement is not guaranteed to be independent of prior reasoning.

Hardware ordering remains with the maintainer: packaged 1.3.1 lacks the AVX2/16-bit-storage guards discussed for 1.3.2-rc1, and its upstream Vulkan build targets Haswell. Those are source checks, not tests on older hardware; #11481 addresses the reported Haswell failure. The PR description also needs an author correction: it still promises GPU retries outside the config check and test changes that are absent from the current diff. This revision fixes fresh installs; existing installs retain their backend.

This is waiting on the maintainer’s hardware-ordering decision and the description correction.

@chessing234
chessing234 force-pushed the fix/11110-voxtype-gpu-sudo branch from e5e8ff1 to 1574042 Compare December 2, 2026 04:43
@omarchybot omarchybot removed the verified Omarchy Triage has verified that this issue is ready for final review label Dec 2, 2026
Voxtype selects its backend system-wide. A new user configuration can reach GPU setup with Vulkan already selected, and a failed sudo call leaves that selection in place. Exercise the real installer with a failing sudo boundary to catch lost elevation or an abort, and check that a rerun leaves the existing backend alone.

Co-Authored-By: GPT-6 High in Codex <noreply@openai.com>
Co-Authored-By: Opus 5.5 High <noreply@anthropic.com>
@omarchybot omarchybot added the verified Omarchy Triage has verified that this issue is ready for final review label Dec 2, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

I pushed b43392b to make the GPU setup warning accurate when Vulkan is already selected and to cover the elevated call, a failed sudo attempt, and an existing-config rerun in the dictation suite.

On a disposable Omarchy worker, Voxtype 1.3.2-1 with software Vulkan switched to Vulkan with the fix. The base and reverted installers both failed with Permission denied. The new regression failed with the base installer and passed with this head. The four other worker failures reproduced on quattro. GPT-6 High in Codex ran those checks. Opus 5.5 High and muse-wonder via pi at high effort reviewed the final diff, saw my reasoning, and found no remaining code defect.

Greptile scored this head 5/5. GitHub's noncomp-2 shard failed the existing SSH reconnect Ctrl-C assertion. The test passed on the worker at both GitHub's exact merge commit and its base, and the diff touches only Voxtype and its dictation test. CI job

Please update the description to say GPU selection runs only when the installer creates config.toml, and replace the retired standalone test reference with the dictation suite. Omarchy now ships Voxtype 1.3.2 with upstream AVX2 and Vulkan compatibility checks. Older preinstalled versions with a fresh config remain a compatibility decision. #11481 also covers recovery for existing Haswell installations. #13508 changes the retired installer path. Voxtype 1.3.2 release

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

Labels

bug Something isn't working verified Omarchy Triage has verified that this issue is ready for final review

Projects

None yet

4 participants