PipeWire's null-audio-sink should set monitor.channel-volumes=true by default
Description of Problem:
When creating a Null device (actually, a Null node) in PipeWire, the volume control of the null device doesn't work.
How Reproducible:
All the time.
Steps to Reproduce:
- Create a virtual audio sink and/or a virtual audio source. (See the configuration below.)
- Use
qpwgraph
orHelvum
to link the null nodes to another device. (e.g. route Null sink output to the headphones) - Set the Null device as the default audio sink or source.
- Start playing some sound, or start recording some audio.
- Use your preferred volume control widget (e.g. KDE's built-in volume control at the system tray) to change the volume of the Null device. Also use it to toggle the Mute state.
context.objects = [
{
factory = adapter
args = {
factory.name = support.null-audio-sink
node.name = "null-stereo-output"
node.description = "Null Stereo Output"
media.class = Audio/Sink
object.linger = true
audio.position = [ FL FR ]
}
}
{
factory = adapter
args = {
factory.name = support.null-audio-sink
node.name = "null-mono-input"
node.description = "Null Mono Input"
media.class = Audio/Source/Virtual
object.linger = true
audio.position = [ MONO ]
}
}
]
Actual Results:
Unless monitor.channel-volumes = true
is passed, the null devices will not respond to volume/mute changes.
Expected Results:
Since Null devices are not associated to any hardware device, the volume must be controlled by software.
Additional info:
This behavior was changed/fixed 2 years ago for the PulseAudio module. Please see the discussion at #674 (closed) and #710 (closed), and the commit 648c9b43. In fact, it just works when loading the PulseAudio module on PipeWire:
pactl load-module module-null-sink media.class=Audio/Sink sink_name=my-sink channel_map=stereo
While the PulseAudio Null module just works, the PipeWire Null module doesn't. It requires passing an additional monitor.channel-volumes=true
parameter. (Which is not needed in PulseAudio because it's the default.)
Also note how the monitor.channel-volumes
setting is never mentioned at the Virtual Devices wiki page, and only briefly mentioned but not explained at module-null-sink at Migrate PulseAudio.
For yet another comparison, the volume control works fine using the PipeWire Combine Stream module, as the Dual-monitor as stereo speakers example. The volume also works with the PipeWire Loopback module and the pw-loopback
tool.
Thus, it seems only the Null module has this surprising behavior.
My system:
- PipeWire version (
pipewire --version
): 1.0.0 - Distribution and distribution version (
PRETTY_NAME
from/etc/os-release
): Manjaro Linux - Desktop Environment: KDE Plasma
- Kernel version (
uname -r
): 6.6.8-2-MANJARO