#977696 pulseaudio: Pulseaudio 13.0.5 fails on Bullseye (permissions, cookie)

Package:
pulseaudio
Source:
pulseaudio
Description:
PulseAudio sound server
Submitter:
Andrew Savchenko
Date:
2021-06-17 17:51:03 UTC
Severity:
normal
Tags:
#977696#5
Date:
2020-12-19 03:12:08 UTC
From:
To:
Dear Maintainer,

1. What led up to the situation?

   `apt install pulseaudio` over the minimal installation of Bullseye
   alpha 3.

2. What exactly did you do (or not do) that was effective (or ineffective)?

   Updated all packages, no changes to the pulseaudio config.
   `*-firmware-*` packages are installed, including "non-free" ones.

3. What was the outcome of this action?

   `pactl` and others are unable to communicate with Pulseaudio.
   Please refer to the https://paste.debian.net/1177551/

4. What outcome did you expect instead?

   Pulseaudio works out of the box.

#977696#10
Date:
2021-06-17 17:49:10 UTC
From:
To:
From the log you posted I can see that you try to run pactl as root,
correct?  You can't do that because pulseaudio refuses to start as
root on grounds of security.

In general pulseaudio was designed to by default accept connections
from the user who started it.  If you wish to connect to an already
running pulseaudio process from the login session of a different user,
that second user needs read access to a pulseaudio socket (either the
default one under /run/user/<uid>/pulse/native or a new one created by
loading the module module-native-protocol-unix with appropriate
parameters, see [0]) and all intermediate directories plus the path to
its location.  It will also need a copy of the cookie file.  Usually
the invocation will look similar to this (this assumes pulseaudio is
already running as a non-root user):

PULSE_SERVER=unix:/run/user/$(ps --no-headers -C pulseaudio un|column -t|cut -d' ' -f1)/pulse/native \
    PULSE_COOKIE=$(getent passwd $(ps --no-headers -C pulseaudio un|column -t|cut -d' ' -f1)|cut -d: -f 6)/.config/pulse/cookie \
    pactl info

For a deeper understanding you will have to study the documentation.

Unless you provide more information/reasons for why this should be
considered a bug I will close this bugreport one week from now.

Regards,
Dennis.

0: https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Modules/#module-native-protocol-unixtcp