How to change volume of pulseaudio playback apps and streams that aren't currently in use?

Pulseaudio comes with a command line interface (man pulse-cli-syntax) to control many settings.

We can either load the command line parser pacmd or we call commands directly in a terminal or script:

pacmd set-sink-volume <index> <volume>
pacmd set-source-volume <index> <volume>

controls the volume of a given sink where <index> is the sink index (listed with pacmd list-sinks) and <volume> is any value from 0 (= Mute) to 65536 = 100%.

The configurations files in ~/.config/pulse (formerly ~/.pulse which may still be active in an upgraded installation) are not meant to be read or edited in a default setting. We can however create a custom default.pa there to override settings in /etc/pulse/default.pa.

For 12.04 earcandy may be used for audio control. Sadly this application is not further developed and not available in later releases.

See also notes for this answer.


I wrote a small tool that lets you set the volume of any client that pulseaudio remembers. Please see here:

https://github.com/rhaas80/pa_volume

for the repository. You will need the libpulse-dev package installed after which a simple "make" should build the tool. Please see its README.md file for usage.

dpkg -l | grep libpulse-dev # Check if installed
git clone [email protected]:rhaas80/pa_volume.git
cd pa_volume/
make
./pa_volume # list remembered PA clients
./pa_volume Program 30 # set to 30%

To find your pulseaudio source sinks use following command:

pactl list short sinks

From this command you got the running and idle sinks. With their sink number. Using that index number you can control the sinks volume.

index: 128
    driver: <module-ladspa-sink.c>
    state: RUNNING
    sink: 0
    # ^ This is the sink number you want to find

You can use the following command to control particular sinks volume:

pactl set-sink-volume <index number> <volume in %>

For example:

pactl set-sink-volume 0 100%