pipewire-zeroconf: Indistinguishable duplicate entries if a network audio device is discovered on both IPv4 and IPv6
- PipeWire version (
pipewire --version
): 0.3.43 - Distribution and distribution version (
PRETTY_NAME
from/etc/os-release
): Arch Linux - Desktop Environment: sway 1.8-dev (git hash d6f8820a, compiled 13.01.2022)
- Kernel version (
uname -r
): 5.16.0
Description of Problem:
When a pipewire or pulseaudio audio source or sink is published on the local network on both IPv4 and IPv6, pipewire-zeroconf will discover the device twice, and both devices will list the exact same metadata in pavucontrol
, pactl list
, or pw-dump
(except for client/device/node id), rendering them indistinguishable.
How Reproducible:
Publish an audio device to the network using pulseaudio or pipewire on a device supporting zeroconf Use pipewire-zeroconf on a client in the same network, both devices should appear, with the same name, indistinguishable.
(more detailed isolated reproduction steps to be added later)
Actual Results:
Two devices with the same name appear, indistinguishable, neither by name nor by device metadata.
Expected Results:
There should be a way to be able to distinguish devices with the same name, either by adding a suffix to the name, such as " (IPv6)" or additional device metadata that lists the device address.
The second option is most likely the more robust solution, since multiple devices with the same name can appear on the network in other ways too (two different IPv4 devices with the same or very similar config), however there should be a way (maybe an option to module-zeroconf-discover?) to make at least some of the info user-visible.
Additional Info (as attachments):
-
pw-dump > pw-dump.log
: duplicate-device-dump.json,
the duplicate devices are id 42 and 51, node name"tunnel.realMusic.local.alsa_output.usb-Apple__Inc._USB-C_to_3.5mm_Headphone_Jack_Adapter_DWH015708VHL1MQA9-00.analog-stereo"
-
avahi-discover
screenshot:
Additional Notes:
As a proof-of-concept fix, I implemented a simple patch for this in Ferdi265/pipewire branch zeroconf-ipv6-suffix.
This simple "fix" has some caveats:
- It only fixes the case of IPv4/IPv6 device duplication
- It lacks configurability
- None of the new strings have translations