Skip to content

Dim endpoints with nothing plugged in - #82

Closed
jaehho wants to merge 2 commits into
tsowell:mainfrom
jaehho:dim-unavailable-endpoints
Closed

jaehho wants to merge 2 commits into
tsowell:mainfrom
jaehho:dim-unavailable-endpoints

Conversation

@jaehho

@jaehho jaehho commented Sep 13, 2026

Copy link
Copy Markdown

On laptops with a UCM card, each HDMI/DisplayPort output and the headset jack's microphone is its own endpoint, and wiremix lists them exactly like the ones that can play, labeled "No route selected". On mine the Output Devices tab shows four sof-hda-dsp rows, and only one of them has anything connected.

WirePlumber never selects an unavailable route, so these endpoints have routes, all available: no, and no active route. That availability is already in State, so this uses it:

  • An endpoint is unavailable when it has at least one route under the current profile and all of them are unavailable. Endpoints without routes, like Pro Audio nodes, never are.
  • Unavailable endpoints are listed after the rest, and their title, target and volume are patched with a new node_unavailable theme style: DarkGray in default, DIM in nocolor, nothing in plain. They return to normal as soon as something is plugged in, since the view is rebuilt when the route changes.
  • With no active route and a single route, the target shows that route, e.g. "HDMI / DisplayPort 1 Output (unavailable)", instead of "No route selected". This also tells otherwise identically named rows apart.

The second commit is independent and can be dropped: sinks and sources with node.virtual set (filter-chain, loopback and null sinks) show "Virtual" instead of "No route selected", a label they shared with unplugged devices.

Output Devices on 0.11.0, with headphones plugged in and a filter-chain sink:

  Speaker EQ                                   No route selected
  sof-hda-dsp                                  No route selected
  sof-hda-dsp                                  No route selected
  sof-hda-dsp                                  No route selected
◇ sof-hda-dsp                                         Headphones

With this branch (the last three rows are dimmed):

  Speaker EQ                                             Virtual
◇ sof-hda-dsp                                         Headphones
  sof-hda-dsp          HDMI / DisplayPort 3 Output (unavailable)
  sof-hda-dsp          HDMI / DisplayPort 2 Output (unavailable)
  sof-hda-dsp          HDMI / DisplayPort 1 Output (unavailable)

#58 covers endpoints with no routes at all, so the two don't overlap in behavior, though they touch neighboring lines in Node::from. If you'd rather keep serial order, the sorting is one line and easy to make optional.

Tested with new view tests (availability, ordering, target titles), the CI steps (fmt, clippy with -D warnings, rustdoc with -D warnings), and against a live PipeWire 1.6.8 / WirePlumber 0.5.17 graph.

An endpoint whose routes are all unavailable, like an HDMI output with no
display connected or a headset jack with nothing in it, looked the same
as one that can play, labeled "No route selected". WirePlumber never
selects an unavailable route, so these have no active route at all.

Mark such endpoints unavailable in the view, list them after the rest,
and patch their title, target and volume with a new node_unavailable
theme style (dark gray by default, dim for nocolor). When the endpoint
has a single route, show it as "<route> (unavailable)" instead of "No
route selected". Endpoints without routes, such as Pro Audio nodes, are
never considered unavailable.
A sink or source with no device, such as a filter-chain or null sink,
has no routes, but it was labeled "No route selected" like a device
endpoint that has lost its route. Label nodes with node.virtual set
"Virtual" instead.
@jaehho jaehho closed this by deleting the head repository Sep 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant