Skip to content

Stop the dictation indicator from making voxtype run nvidia-smi - #13813

Closed
alexvlis wants to merge 2 commits into
omacom:quattrofrom
alexvlis:fix/voxtype-status-no-extended
Closed

alexvlis wants to merge 2 commits into
omacom:quattrofrom
alexvlis:fix/voxtype-status-no-extended

Conversation

@alexvlis

@alexvlis alexvlis commented Sep 29, 2026 •

Copy link
Copy Markdown

Problem

On hybrid laptops with the dGPU off, the bar's dictation indicator wakes the NVIDIA GPU and loads the NVIDIA driver every time the bar is built: at login, on shell restart, and on every resume. It runs twice each time, because Indicators.qml creates Dictation for both the horizontal and the vertical bar.

On an ASUS G14 (GA403WR) with supergfxd in Integrated mode, the NVIDIA driver deadlocked during supergfxd's post-resume teardown. The next suspend then hung and froze the laptop.

Root cause

bin/omarchy-voxtype-status runs voxtype status --follow --extended --format json. With --extended, voxtype 1.1.0 runs nvidia-smi --query-gpu=name --format=csv,noheader once at process start (detect_nvidia_gpu, reached via ExtendedStatusInfo::from_config -> inventory()).

The real nvidia-smi goes through libnvidia-ml, which runs the setuid nvidia-modprobe. That loads nvidia.ko by name, so supergfxd's blacklist nvidia doesn't stop it. The load wakes the dGPU.

Nothing uses the extended fields. Dictation.qml only reads data.alt || data.class and builds its own tooltip. omarchy-voxtype-status is only called from Dictation.qml, so there are no other consumers.

The flag came in with the original voxtype commit (0d42f1b). Its message doesn't say why. My assumption, not confirmed by the history, is that it was for the Waybar tooltip: --extended adds Model:, Device: and Backend: lines to the tooltip field, and Waybar displayed that field. Waybar has since been removed, and the shell's Dictation.qml doesn't read tooltip, so nothing visible is lost.

Fix

Drop --extended from the voxtype status call, with a comment saying why. alt and class are still emitted. No migration is needed: this is a shipped bin/ script that the bar re-executes on its next start, and there is no user state to repair.

Testing

Ran with a logging fake nvidia-smi first on PATH, so the real binary was never touched:

  • New omarchy-voxtype-status (4s): 0 nvidia-smi calls. Output was {"text": "", "alt": "idle", "class": "idle", "tooltip": "Voxtype ready - hold hotkey to record"}.
  • Old voxtype status --follow --extended --format json (4s): 1 call, nvidia-smi --query-gpu=name --format=csv,noheader.

The full test suites are left to CI. In a local run of ./test/cli before that decision, the only failure was vscode generated theme references current theme file, which is unrelated to this change.

🤖 Generated with Claude Code

`voxtype status --extended` runs nvidia-smi at startup, which loads the NVIDIA driver and wakes the dGPU on hybrid laptops. The bar only reads alt/class.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@alexvlis
alexvlis marked this pull request as ready for review September 29, 2026 23:57
@alexvlis
alexvlis marked this pull request as draft September 29, 2026 23:59
@alexvlis
alexvlis marked this pull request as ready for review September 30, 2026 00:00
@sanjyay

sanjyay commented Sep 30, 2026

Copy link
Copy Markdown
Contributor

Independent community review

This is an independent community review and unaffiliated with the Omarchy team, intended to help prepare PRs for their review.

Tested: omarchy-voxtype-status execution, GPU probing behavior with mock telemetry harness, JSON output compatibility with Dictation.qml, and fallback behavior when voxtype is missing in an isolated Omarchy test VM environment.

Result: The fix operates as intended without regressions:

  • Base comparison on origin/quattro: Running omarchy-voxtype-status with --extended triggers nvidia-smi --query-gpu=name --format=csv,noheader during voxtype process initialization. On hybrid GPU hardware (e.g. ASUS ROG/Zephyrus), this invokes libnvidia-ml/nvidia-modprobe, loading the NVIDIA kernel driver and waking the discrete GPU.
  • On PR branch pr-13813 (9a54c8f): Dropping --extended prevents any invocation of nvidia-smi at status startup.
  • JSON output compatibility: voxtype status --follow --format json produces standard JSON containing {"text": "", "alt": "idle", "class": "idle", "tooltip": "Voxtype ready - hold hotkey to record"}. The sole consumer in the codebase, shell/plugins/bar/indicators/Dictation.qml, only inspects data.alt and data.class (state = String(data.alt || data.class || "idle")) and defines its own tooltip texts, so no bar indicator functionality or state transitions are lost.
  • Command-missing fallback ({"alt": "", "class": "idle", "tooltip": ""}) and setpriv --pdeathsig TERM process lifecycle management remain unaffected.
Testing details
  • Tested PR commit: 9a54c8fc16a8b0ea713e2aac2af0e8bb4792ca92
  • Test validation in VM:
    • Base origin/quattro:
      • omarchy-voxtype-status executed voxtype status --follow --extended --format json
      • Logged subprocess call: nvidia-smi --query-gpu=name --format=csv,noheader
    • PR branch (pr-13813):
      • omarchy-voxtype-status executed voxtype status --follow --format json
      • Subprocess log confirmed 0 nvidia-smi invocations
      • JSON payload parsed cleanly by Dictation.qml logic
  • Test suites & checks:
    • bash test/shell.d/bin-style-test.sh: passed
    • bin/omarchy commands --check: passed (467 commands)
    • git diff --check origin/quattro: clean

If you'd prefer not to receive these independent reviews on your PRs, reply to this comment, and I won't review your future PRs.

@jandrusk

jandrusk commented Oct 1, 2026

Copy link
Copy Markdown

Triage (not posted): LGTM.

Dictation.qml only reads alt / class, so dropping --extended (and thus nvidia-smi) is the right fix for hybrid-GPU wakeups. Small, clear, no API break for the bar indicator.

@omarchybot omarchybot added bug Something isn't working verified Omarchy Triage has verified that this issue is ready for final review labels Oct 1, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Reviewed at 9a54c8f, nothing found to change.

Reproduced on a worker (Omarchy ISO VM, the packaged voxtype-bin 1.0.1, a logging fake nvidia-smi first on PATH): the quattro version of omarchy-voxtype-status makes voxtype run nvidia-smi --query-gpu=name --format=csv,noheader once at start; this head runs it zero times; putting --extended back on this head brings the call back. The JSON still carries alt and class, and Dictation.qml reads nothing else — the extra model/device/backend fields and tooltip lines have no reader anywhere in the repository. The dGPU wake and the resume hang themselves need NVIDIA hybrid hardware a worker does not have, so those rest on the description; what was proved here is that the bar stops invoking nvidia-smi.

Tests on the worker: bin-style, indicator-contract and voxtype-invitation shell tests pass. ./test/cli has one failure, vscode generated theme references current theme file, which fails the same way on current quattro (a85e29a) and is unrelated to this change.

Second opinion: Codex Medium reviewed the diff and the repository for other consumers of the extended fields and other voxtype status --extended calls, found none, and judged the change proportionate; it agreed with this review, and its independence is not guaranteed. Its only remark was wording — the comment could say --extended can load the driver rather than that it does — which is not worth a push.

Related: #8734 rewrites the same comment block in this file (and keeps --extended), so whichever lands second needs a small conflict resolved and should not reintroduce the flag.

Waiting on the maintainer. This is labelled verified; it is not marked ready only because of the pre-existing ./test/cli failure on quattro.

@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

Re-checked because this no longer merges into quattro, and the reason is that the code it fixes is gone there.

c248890 (#14552, "Add selectable Voxtype and Superwhisper dictation") deleted bin/omarchy-voxtype-status and the bar's shell/plugins/bar/indicators/Dictation.qml, which was its only caller, and dropped Dictation from the bar's indicators (shell/plugins/bar/widgets/Indicators.qml:11 on quattro 50d687a). Nothing on quattro runs voxtype status --follow --extended any more: the only remaining voxtype status call is the plain one in bin/omarchy-dictation-voxtype:9, without --extended, and dropping that flag is exactly what this PR showed stops the nvidia-smi probe. So there is nothing to port, and the bug this PR fixed does not exist on quattro.

Checked by reading quattro at 50d687a; nothing was run this time, since the earlier worker reproduction already established which flag triggers the probe. Codex Medium checked the same question separately — bin/, shell/, default/, install/ and migrations/ for any remaining --extended use or status follower — and reached the same conclusion; it agreed with this review, and its independence is not guaranteed. It also noted that bin/omarchy-install-dictation-voxtype:21 runs voxtype setup gpu --enable when Vulkan is present, which is an install-time step and unrelated to the probe this PR was about.

Waiting on the maintainer, with the recommendation that this be closed as fixed by #14552. Thanks for the careful diagnosis, Alex — the root-cause write-up here was precise.

Keep the status helper deleted by omacom#14552. Upstream removed its bar
consumer and the GPU-probing path, so the original fix is superseded.
@alexvlis alexvlis closed this Oct 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants