[pulseaudio-discuss] padevchooser replacement

Victor Mataré matare at lih.rwth-aachen.de
Thu Dec 15 13:41:09 PST 2011



On 15.12.2011 14:39, Colin Guthrie wrote:
> 'Twas brillig, and Victor Mataré at 14/12/11 23:12 did gyre and gimble:
>> On Wednesday, 14.12.2011 21:24:45 Colin Guthrie wrote:
>>> 'Twas brillig, and Victor Mataré at 14/12/11 19:59 did gyre and gimble:
>>>> Hey,
>>>>
>>>> Am I right in that there's currently (after padevchooser deprecation) no
>>>> GUI way of choosing the server to use? That's a real problem for me
>>>> since I frequently switch between local and networked servers, as do
>>>> other users on my network who can't be expected to use the console for
>>>> that task.
>>>> Any idea how to switch servers conveniently without padevchooser?
>>> We generally recommend always using your local PA daemon and using Avahi
>>> and similar auto discover to automatically add tunnel sinks to remote
>>> machines you want to use. This way you can move streams from local to
>>> remote and back again as needed rather than restarting applications
>>> every time you switch servers.
>>>
>> OK that's nice, but it's not
>> working:
>>
>> $ avahi-browse -l -t _pulse-server._tcp
>> +   eth0 IPv6 jana at wiese    _pulse-server._tcp   local
>> +   eth0 IPv6 ich at horst     _pulse-server._tcp   local
>> +   eth0 IPv4 jana at wiese    _pulse-server._tcp   local
>> +   eth0 IPv4 ich at horst     _pulse-server._tcp   local
>>
>> $ pacmd list-sinks
>> Welcome to PulseAudio! Use "help" for usage information.
>>>>> 1 sink(s) available.
>>   * index: 0
>>         name: <alsa_output.pci-0000_00_1b.0.analog-stereo>
>>         driver: <module-alsa-card.c>
>>         flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY FLAT_VOLUME DYNAMIC_LATENCY
>>         state: SUSPENDED
>>         suspend cause: IDLE 
>> [...]
>>
>> So it lists only the local sinks, although module-zeroconf-discover is loaded:
>>
>> $ pacmd list-modules | grep -B1 -A7 zeroconf-discover
>>     index: 19
>>         name: <module-zeroconf-discover>
>>         argument: <>
>>         used: -1
>>         load once: yes
>>         properties:
>>                 module.author =Lennart Poettering"
>>                 module.de
>> cription =mDNS/DNS-SD Service Discovery"
>>                 module.version =0.9.23"
>>
>> Am I supposed to do anything else to make it work?
> The only other bit that I can think off of the top of my head is the
> name resolving bits.
>
> Check your /etc/nsswitch.conf file and make sure your hosts line
> contains the mdns stuff for "hosts":
>
> hosts:           mdns4_minimal files nis dns mdns4  wins myhostname
>
> (yours may not look exactly like this)
>
>
> Assuming that is working it should "Just Work(tm)"
>
> If it doesn't work, try loading the tunnel module manually and see if it
> works. Perhaps module-tunnel-sink is actually in a different package on
> your distro and it's just that whoever packaged it up didn't appreciate
> that the zeroconf-discover module needs the tunnel module?
>
> Col
Okay, did some more debugging and it looks like I'm being bitten by bug
#694:
http://pulseaudio.org/ticket/694

I do have both IPv4 and IPv6 addressing enabled (see avahi-browse above)
and pulseaudio tries to register two sinks with the same name which
apparently causes the entire tunnel module to fail && unload:

Dec 15 22:14:15 wald pulseaudio[3583]: [pulseaudio]
module-zeroconf-discover.c: Loading module-tunnel-sink with arguments
'server=[fe80::219:99ff:fe7e:d60e]:4713
sink=alsa_output.pci-0000_00_14.2.analog-stereo format=s16le channels=2
rate=96000
sink_name=tunnel.horst.local.alsa_output.pci-0000_00_14.2.analog-stereo
channel_map=front-left,front-right'
Dec 15 22:14:15 wald pulseaudio[3583]: [pulseaudio]
module-device-restore.c: Restoring volume for sink
tunnel.horst.local.alsa_output.pci-0000_00_14.2.analog-stereo.
Dec 15 22:14:15 wald pulseaudio[3583]: [pulseaudio] sink.c: Created sink
2 "tunnel.horst.local.alsa_output.pci-0000_00_14.2.analog-stereo" with
sample spec s16le 2ch 96000Hz and channel map front-left,front-right
Dec 15 22:14:15 wald pulseaudio[3583]: [pulseaudio] sink.c:    
device.description = "alsa_output.pci-0000_00_14.2.analog-stereo on
[fe80::219:99ff:fe7e:d60e]:4713"
Dec 15 22:14:15 wald pulseaudio[3583]: [pulseaudio] sink.c:    
tunnel.remote.server = "[fe80::219:99ff:fe7e:d60e]:4713"
Dec 15 22:14:15 wald pulseaudio[3583]: [pulseaudio] sink.c:    
tunnel.remote.sink = "alsa_output.pci-0000_00_14.2.analog-stereo"
Dec 15 22:14:15 wald pulseaudio[3583]: [pulseaudio] sink.c:    
device.icon_name = "audio-card"
Dec 15 22:14:15 wald pulseaudio[3583]: [pulseaudio] source.c: Created
source 3
"tunnel.horst.local.alsa_output.pci-0000_00_14.2.analog-stereo.monitor"
with sample spec s16le 2ch 96000Hz and channel map front-left,front-right
Dec 15 22:14:15 wald pulseaudio[3583]: [pulseaudio] source.c:    
device.description = "Monitor of
alsa_output.pci-0000_00_14.2.analog-stereo on
[fe80::219:99ff:fe7e:d60e]:4713"
Dec 15 22:14:15 wald pulseaudio[3583]: [pulseaudio] source.c:    
device.class = "monitor"
Dec 15 22:14:15 wald pulseaudio[3583]: [pulseaudio] source.c:    
device.icon_name = "audio-input-microphone"
Dec 15 22:14:15 wald pulseaudio[3583]: [module-tunnel] module-tunnel.c:
Thread starting up
Dec 15 22:14:15 wald pulseaudio[3583]: [pulseaudio] protocol-dbus.c:
Interface org.PulseAudio.Core1.Device added for object
/org/pulseaudio/core1/source3
Dec 15 22:14:15 wald pulseaudio[3583]: [pulseaudio] protocol-dbus.c:
Interface org.PulseAudio.Core1.Source added for object
/org/pulseaudio/core1/source3
Dec 15 22:14:15 wald pulseaudio[3583]: [pulseaudio]
module-device-restore.c: Could not set format on sink
tunnel.horst.local.alsa_output.pci-0000_00_14.2.analog-stereo
Dec 15 22:14:15 wald pulseaudio[3583]: [pulseaudio]
module-suspend-on-idle.c: Sink
tunnel.horst.local.alsa_output.pci-0000_00_14.2.analog-stereo becomes
idle, timeout in 5 seconds.
Dec 15 22:14:15 wald pulseaudio[3583]: [pulseaudio] protocol-dbus.c:
Interface org.PulseAudio.Core1.Device added for object
/org/pulseaudio/core1/sink2
Dec 15 22:14:15 wald pulseaudio[3583]: [pulseaudio] protocol-dbus.c:
Interface org.PulseAudio.Core1.Sink added for object
/org/pulseaudio/core1/sink2
Dec 15 22:14:15 wald pulseaudio[3583]: [pulseaudio] module.c: Loaded
"module-tunnel-sink" (index: #25; argument:
"server=[fe80::219:99ff:fe7e:d60e]:4713
sink=alsa_output.pci-0000_00_14.2.analog-stereo format=s16le channels=2
rate=96000
sink_name=tunnel.horst.local.alsa_output.pci-0000_00_14.2.analog-stereo
channel_map=front-left,front-right").
Dec 15 22:14:15 wald pulseaudio[3583]: [pulseaudio] socket-client.c:
connect(): Invalid argument (22)
Dec 15 22:14:15 wald pulseaudio[3583]: [pulseaudio] module-tunnel.c:
Connection established, authenticating ...
Dec 15 22:14:15 wald pulseaudio[3583]: [pulseaudio] protocol-dbus.c:
Interface org.PulseAudio.Core1.Module added for object
/org/pulseaudio/core1/module25
Dec 15 22:14:15 wald pulseaudio[3583]: [pulseaudio]
module-zeroconf-discover.c: Loading module-tunnel-sink with arguments
'server=[192.168.10.155]:4713
sink=alsa_output.pci-0000_00_1f.5.analog-stereo format=s16le channels=2
rate=44100
sink_name=tunnel.wiese.local.alsa_output.pci-0000_00_1f.5.analog-stereo
channel_map=front-left,front-right'
Dec 15 22:14:15 wald pulseaudio[3583]: [pulseaudio] sink.c: Failed to
register name tunnel.wiese.local.alsa_output.pci-0000_00_1f.5.analog-stereo.
Dec 15 22:14:15 wald pulseaudio[3583]: [pulseaudio] module-tunnel.c:
Failed to create sink.
Dec 15 22:14:15 wald pulseaudio[3583]: [pulseaudio] module.c: Failed to
load module "module-tunnel-sink" (argument:
"server=[192.168.10.155]:4713
sink=alsa_output.pci-0000_00_1f.5.analog-stereo format=s16le channels=2
rate=44100
sink_name=tunnel.wiese.local.alsa_output.pci-0000_00_1f.5.analog-stereo
channel_map=front-left,front-right"): initialization failed.
Dec 15 22:14:15 wald pulseaudio[3583]: [pulseaudio] module-tunnel.c:
Stream died.
Dec 15 22:14:15 wald pulseaudio[3583]: [pulseaudio] socket-client.c:
connect(): Invalid argument (22)
Dec 15 22:14:15 wald pulseaudio[3583]: [pulseaudio] module-tunnel.c:
Connection established, authenticating ...
Dec 15 22:14:15 wald pulseaudio[3583]: [pulseaudio] module.c: Unloading
"module-tunnel-sink" (index: #24).
Dec 15 22:14:15 wald pulseaudio[3583]: [pulseaudio] protocol-dbus.c:
Interface org.PulseAudio.Core1.Device removed from object
/org/pulseaudio/core1/sink1
Dec 15 22:14:15 wald pulseaudio[3583]: [pulseaudio] protocol-dbus.c:
Interface org.PulseAudio.Core1.Sink removed from object
/org/pulseaudio/core1/sink1
Dec 15 22:14:15 wald pulseaudio[3583]: [pulseaudio]
module-rescue-streams.c: No sink inputs to move away.
Dec 15 22:14:15 wald pulseaudio[3583]: [pulseaudio] protocol-dbus.c:
Interface org.PulseAudio.Core1.Device removed from object
/org/pulseaudio/core1/source2
Dec 15 22:14:15 wald pulseaudio[3583]: [pulseaudio] protocol-dbus.c:
Interface org.PulseAudio.Core1.Source removed from object
/org/pulseaudio/core1/source2
Dec 15 22:14:15 wald pulseaudio[3583]: [pulseaudio]
module-rescue-streams.c: No source outputs to move away.
Dec 15 22:14:15 wald pulseaudio[3583]: [module-tunnel] module-tunnel.c:
Thread shutting down
Dec 15 22:14:15 wald pulseaudio[3583]: [pulseaudio] sink.c: Freeing sink
1 "tunnel.wiese.local.alsa_output.pci-0000_00_1f.5.analog-stereo"
Dec 15 22:14:15 wald pulseaudio[3583]: [pulseaudio] source.c: Freeing
source 2
"tunnel.wiese.local.alsa_output.pci-0000_00_1f.5.analog-stereo.monitor"
Dec 15 22:14:15 wald pulseaudio[3583]: [pulseaudio] module.c: Unloaded
"module-tunnel-sink" (index: #24).

Considering this bug is over two years old and pulseaudio probably runs
on 99% of all Linux desktops on the planet I'm a bit confused as to how
this can be such a non-issue. Anyways, I can disable IPv6 on avahi as a
workaround, although to me it looks like that bug should be trivially
fixable by simply adding a v4/v6 suffix to the sink name. Also the
tunnel module shouldn't fail entirely just because a duplicate sink name
is requested. Instead I should be notified of the conflict by a log
message on the ERROR level.


More information about the pulseaudio-discuss mailing list