omarchy icon indicating copy to clipboard operation
omarchy copied to clipboard

Dictation bar indicator leaks duplicated voxtype status --follow processes

Open inyman opened this issue 3 months ago • 4 comments

Summary The bar's Dictation indicator spawns a long-running voxtype status --follow --extended --format json process per bar surface and never reaps it, so processes accumulate per monitor and across hotplugs/reloads.

System

  • Omarchy 4.0.1-1
  • NVIDIA RTX 3070
  • 4 monitors

What happened On a fresh omarchy restart shell, ps shows multiple voxtype status --follow … processes (I saw 8 on a 4-monitor desk — one per bar-surface copy of the indicator). They're never terminated on rebuild; the count climbed over the session and grew further after disabling/re-enabling a monitor and config reloads.

Expected One shared status process for the session (the vram-monitor service pattern), or a process terminated when its widget copy is destroyed.

Steps to reproduce

  1. With multiple monitors, run omarchy restart shell.
  2. ps -ef | grep voxtype | grep status — observe multiple copies.
  3. Disable/re-enable a monitor or trigger a shell reload; the count increases.

Root cause (tentative) shell/plugins/bar/indicators/Dictation.qml declares a bare per-instance Process { running: true } instead of a shared service.

inyman avatar Aug 27 '26 21:08 inyman

Same here on 4.0.1-1 (quattro @ 158e8cf, Indicators.qml identical to installed): 6 followers on 3 monitors, and your 8 on 4 fits the same pattern. I can pin down where the ×2 comes from and what does/doesn't leak.

The ×2 is Indicators.qml, not Dictation.qml. The widget builds both orientation trees unconditionally:

  • Row (visible: !root.vertical, line 190) → inactiveHorizontalBlock (IndicatorBlock, line 206)
  • Column (visible: root.vertical, line 233) → inactiveVerticalBlock (IndicatorBlock, line 249)

Both IndicatorBlocks get the full root.indicatorEntries, and IndicatorLoader's Loader (line ~430) sets source: with no active: guard. visible: false doesn't stop a Loader from instantiating, so every bar carries two live copies of every indicator — the visible orientation's and the hidden one's. Each Dictation.qml copy has its own Process { running: true }, hence 2 × monitors. The ActiveIndicatorBlocks only hold currently-active ids, so they don't add to the idle count.

Reload leak: not reproducible here. omarchy-voxtype-status execs the follower under setpriv --pdeathsig TERM, and on omarchy-restart-shell all six old PIDs died and exactly six new ones appeared (all with the new shell PID as parent, same age). So on 4.0.1 the count is steady-state, not cumulative — if yours climbs it's likely monitor hotplug: Variants { model: Quickshell.screens } destroying/recreating BarPanels while the followers (children of the shell process, not of the widget) survive until the shell itself exits. Worth checking ps -o ppid,etimes on the extras.

Cost per follower here: ~10 MB RSS, 14 threads, 0% CPU — ~60 MB idle on 3 monitors.

Suggested fix (two independent halves):

  1. Only instantiate the orientation in use — e.g. in Indicators.qml give the hidden block no entries:
    IndicatorBlock { id: inactiveHorizontalBlock; indicatorEntries: root.vertical ? [] : root.indicatorEntries; … }
    IndicatorBlock { id: inactiveVerticalBlock;   indicatorEntries: root.vertical ? root.indicatorEntries : []; … }
    
    (or active: parent.visible on the IndicatorLoader's Loader). This halves every indicator's instance count, not just Dictation's.
  2. As you say, one shared status process for the session (a singleton service like vram-monitor) so the count is 1 regardless of monitors — with (1) alone it's still 1 × monitors.

nocstah avatar Aug 30 '26 05:08 nocstah

Both halves of this are already fixed on quattro, though neither has shipped in a release yet (v4.0.4 is the latest, and it contains neither).

  • The per-orientation doubling that @nocstah traced was fixed in 454b67d95 (#11015). shell/plugins/bar/widgets/Indicators.qml now loads only the tree for the bar's current orientation through a Loader, instead of building both and hiding one with visible. That halves the instance count of every indicator, not just Dictation.
  • The follower itself is gone. c24889096 (#14552) deleted shell/plugins/bar/indicators/Dictation.qml and bin/omarchy-voxtype-status, and took Dictation out of the default indicator list. Nothing at the current quattro head starts voxtype status --follow. The only voxtype status call left is a one-shot check in bin/omarchy-dictation-voxtype when dictation stops. None of the remaining bar indicators keeps a process running per instance; they only run short status checks.

This was established by reading the source at quattro c352b62d6 and its history. Nothing was run on a worker, since the code that spawned the process no longer exists to reproduce against. Codex Medium reviewed the same questions as a second opinion and reached the same commits and the same conclusion, though its independence from this review is not guaranteed. It also noted that a bar config which still lists Dictation explicitly will log an "Indicator loader error" for the missing file, without starting any process.

This is waiting on the maintainer, who can close it once the fix ships or now.

omarchybot avatar Oct 09 '26 05:10 omarchybot

Both halves are fixed in Omarchy 4.5.0. #11015 (454b67d95) loads only the indicator tree for the bar's current orientation, and #14552 (c24889096) removed the Dictation indicator and omarchy-voxtype-status, so nothing starts voxtype status --follow anymore. I think this can be closed.

peteonrails avatar Nov 21 '26 23:11 peteonrails

Confirmed the release update: both fixes are in v4.5.0, published November 5. The single-orientation loader from 454b67d95 (#11015) is present, and c24889096 (#14552) removed the Dictation indicator and its status-follower helper. No voxtype status --follow launcher remains in that release; the remaining status call is a one-shot check when dictation stops.

Codex (effort setting not exposed) checked the release ancestry and source. Opus 5.5 High and muse-wonder via pi, thinking high reviewed the evidence and agreed that no further fix is needed; reviewer independence is not guaranteed. No worker or runtime reproduction was run. This is waiting on the maintainer to close now that the fixes have shipped.

omarchybot avatar Nov 21 '26 23:11 omarchybot