Pulse server timeout
In the newer versions of pipewire I am running into an issue where the pulse audio native tcp protocol stops responding. This breaks network streaming.
This can be easily reproduced with the following configuration /etc/pipewire/pipewire-pulse.conf.d/network.conf
:
pulse.properties = {
# the addresses this server listens on
server.address = [
"unix:native"
#"unix:/tmp/something" # absolute paths may be used
#"tcp:4713" # IPv4 and IPv6 on all addresses
#"tcp:[::]:9999" # IPv6 on all addresses
#"tcp:127.0.0.1:8888" # IPv4 on a single address
#
{ address = "tcp:127.0.0.1:4713" # address
max-clients = 64 # maximum number of clients
listen-backlog = 32 # backlog in the server listen queue
client.access = "allowed" # permissions for clients
}
]
#server.dbus-name = "org.pulseaudio.Server"
#pulse.min.req = 128/48000 # 2.7ms
#pulse.default.req = 960/48000 # 20 milliseconds
#pulse.min.frag = 128/48000 # 2.7ms
#pulse.default.frag = 96000/48000 # 2 seconds
#pulse.default.tlength = 96000/48000 # 2 seconds
#pulse.min.quantum = 128/48000 # 2.7ms
#pulse.idle.timeout = 0 # don't pause after underruns
#pulse.default.format = F32
#pulse.default.position = [ FL FR ]
# These overrides are only applied when running in a vm.
vm.overrides = {
pulse.min.quantum = 1024/48000 # 22ms
}
}
Trying to run pactl via the network port results in a timeout.
$ PULSE_SERVER=tcp:127.0.0.1:4713 pactl list
Connection failure: Timeout
Doing just pactl list
gives the expected response.
With this test i did a bisection of the pipewire source code and found the following commit to have caused the issue:
$ git bisect bad
f89757e1f6f17bfd9e5b00868676af596b0bc300 is the first bad commit
commit f89757e1f6f17bfd9e5b00868676af596b0bc300
Author: Pauli Virtanen <pav@iki.fi>
Date: Sun Oct 8 19:34:23 2023 +0300
module-access: add access.socket option + legacy mode, remove other options
Add access.socket option, which sets PW_KEY_ACCESS based only on which
socket the client connected from.
Remove the executable-based permissions and all old options. Add
access.legacy=true option that enables the old default behavior. The
legacy mode cannot be used together with the socket-based access.
Emit warnings if any of the removed old options have been set.
Set pipewire.sec.flatpak=true for Flatpak applications.
The socket-based access ignores PW_KEY_CLIENT_ACCESS and the Flatpak
status when setting PW_KEY_ACCESS. Dealing with them becomes
responsibility of the session manager (or equivalent) which processes
the permission rules.
Make the default access.socket value compatible with the
module-protocol-native default two-socket configuration.
However, if neither access.socket or access.legacy is specified, we will
for now use the legacy mode for backward compatibility.
src/daemon/pipewire.conf.in | 19 +--
src/modules/module-access.c | 407 +++++++++++++++++++++++---------------------
2 files changed, 216 insertions(+), 210 deletions(-)
This issue may also be causing #3221 (closed)