Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there some configuration option to specify that X device should always grab sink index Y? Much like you can force a specific sound card driver to have a specific card index in alsa?

Failing that, is there some command to change the index of a sink at runtime?

share|improve this question
up vote 3 down vote accepted

I don't think indexes were designed to be relied upon. If you need a reliable name for a source/sink, use a predetermined, unique name.

Oh, one other thing. Indexes seem to be autoincrementing, and are automatically adjusted if you remove a sink or source at runtime. So you would have to modify the PA sources to change indexes from their current behavior of just assigning a tracking number to sinks/sources, to being a meaningful datum. But doing that is redundant, since we already have a uniquely-identifying, meaningful field for sinks and sources: name.

share|improve this answer
Thanks. I use a library for my window manager (awesome) that relies on indices. I will propose this change to the maintainer. – Panayiotis Karabassis Dec 14 '12 at 20:24
I needed this to make my volume adjust script, which uses pactl, reliable when switching between HDMI and analog outputs. The sink ID increments every time. – enigmaticPhysicist Dec 24 '15 at 5:37

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.