Bug#521675: Only root can play sound in pulseaudio
Felipe Sateler
fsateler at debian.org
Tue Apr 8 13:54:27 UTC 2014
Hi,
On Tue, Apr 8, 2014 at 10:23 AM, Dr. Robin Haunschild <H at unschild.de> wrote:
> on Tue, 08 04 14 14:50:06 Felipe Sateler wrote:
>> On Mon, Apr 7, 2014 at 6:52 PM, Dr. Robin Haunschild <H at unschild.de> wrote:
>> > yes, I still experience this in the pulseaudio version of Debian/stable.
>> > I didn't test newer versions. My workaround is to kill all pulseaudio
>> > processes as root and restart audio play back.
>>
>> If you could test the version from testing it would be great to
>> confirm, but lets try to debug the problem.
>
> Aren't there too many dependencies that I have to make some kind of a half or
> even full upgrade to testing? E.g.: I have libc6 in version 2.13-38+deb7u1 but
> pulseaudio from testing requires a libc6 version >= 2.15.
Yes, possibly, if it is too much of a hassle nevermind.
>
>> Could you please post the output of the following commands?
>
> Sure.
>
>> pulseaudio -v -v -v
>
> $ pulseaudio -v -v -v
> I: [pulseaudio] main.c: setrlimit(RLIMIT_NICE, (31, 31)) failed: Operation not
> permitted
> D: [pulseaudio] core-rtclock.c: Timer slack is set to 50 us.
> I: [pulseaudio] core-util.c: Failed to acquire high-priority scheduling:
> Permission denied
> I: [pulseaudio] main.c: This is PulseAudio 2.0
> D: [pulseaudio] main.c: Compilation host: x86_64-pc-linux-gnu
> D: [pulseaudio] main.c: Compilation CFLAGS: -g -O2 -fstack-protector --
> param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wall -W -Wextra -pipe
> -Wno-long-long -Wvla -Wno-overlength-strings -Wunsafe-loop-optimizations -
> Wundef -Wformat=2 -Wlogical-op -Wsign-compare -Wformat-security -Wmissing-
> include-dirs -Wformat-nonliteral -Wpointer-arith -Winit-self -Wdeclaration-
> after-statement -Wfloat-equal -Wmissing-prototypes -Wredundant-decls -Wmissing-
> declarations -Wmissing-noreturn -Wshadow -Wendif-labels -Wcast-align -Wstrict-
> aliasing -Wwrite-strings -Wno-unused-parameter -ffast-math -Wp,-
> D_FORTIFY_SOURCE=2 -fno-common -fdiagnostics-show-option
> D: [pulseaudio] main.c: Running on host: Linux x86_64 3.2.0-4-amd64 #1 SMP
> Debian 3.2.54-2
> D: [pulseaudio] main.c: Found 2 CPUs.
> I: [pulseaudio] main.c: Page size is 4096 bytes
> D: [pulseaudio] main.c: Compiled with Valgrind support: no
> D: [pulseaudio] main.c: Running in valgrind mode: no
> D: [pulseaudio] main.c: Running in VM: no
> D: [pulseaudio] main.c: Optimized build: yes
> D: [pulseaudio] main.c: FASTPATH defined, only fast path asserts disabled.
> I: [pulseaudio] main.c: Machine ID is 1255fd68d056555ca29812ab4b119d93.
> I: [pulseaudio] main.c: Session ID is
> 1255fd68d056555ca29812ab4b119d93-1396941267.271260-609221226.
> I: [pulseaudio] main.c: Using runtime directory
> /home/robin/.pulse/1255fd68d056555ca29812ab4b119d93-runtime.
> I: [pulseaudio] main.c: Using state directory /home/robin/.pulse.
> I: [pulseaudio] main.c: Using modules directory /usr/lib/pulse-2.0/modules.
> I: [pulseaudio] main.c: Running in system mode: no
> E: [pulseaudio] pid.c: Daemon already running.
> E: [pulseaudio] main.c: pa_pid_file_create() failed.
Pulseaudio was already running so we can't say what is the problem,
however there are hints below:
>
> $ ps aux | grep pulseaudio
> 119 4253 0.6 0.0 237188 5864 ? Sl 09:13 2:13
> /usr/bin/pulseaudio --start --log-target=syslog
> 119 4481 0.0 0.0 116492 3188 ? S 09:14 0:00
> /usr/lib/pulseaudio/pulse/gconf-helper
> robin 5622 0.0 0.0 323700 7484 ? Sl 09:15 0:01
> /usr/bin/pulseaudio --start --log-target=syslog
> robin 5623 0.0 0.0 116464 3196 ? S 09:15 0:00
> /usr/lib/pulseaudio/pulse/gconf-helper
> robin 12021 0.0 0.0 7836 872 pts/7 S+ 15:01 0:00 grep
> pulseaudio
>
> $ grep 119 /etc/passwd
> speech-dispatcher:x:119:29:Speech Dispatcher,,,:/var/run/speech-
> dispatcher:/bin/sh
> $ grep 119 /etc/group
> pulse-access:x:119:robin
>
> I'm not aware that I am using speech-dispatcher. Maybe I just uninstall the
> package speech-dispatcher and hope the problem will be gone. Or is speech-
> dispatcher some system package needed by other applications?
This may be the problem. Does /etc/default/speech-dispatcher enable
the speech dispatcher? I have RUN=no in that file. Please try
disabling the speech dispatcher. Uninstalling might be more difficult
given gnome metapackage Depends on gnome-orca which in turn depends on
speech-dispatcher.
As noted earlier in this bug, the previous time you posted the
pulseaudio output there was this message:
D: module-udev-detect.c: /devices/pci0000:00/0000:00:1b.0/sound/card0
is busy: yes
This may mean that the real bug is that pulseaudio cannot negotiate
the card with itself (the pulseaudio started by speech-dispatcher vs
the pulseaudio by your own user).
>
>> groups (this is to see if you are in the audio group)
>
> $ groups
> robin dialout cdrom floppy sudo audio dip src video plugdev scanner netdev
> bluetooth pulse pulse-access vboxusers fuse
>
>> ls -l /dev/snd
>
> $ ls -l /dev/snd
> total 0
> drwxr-xr-x 2 root root 60 Apr 8 09:13 by-path
> crw-rw---T 1 root audio 116, 9 Apr 8 09:13 controlC0
> crw-rw---T 1 root audio 116, 8 Apr 8 09:13 hwC0D0
> crw-rw---T 1 root audio 116, 7 Apr 8 09:13 hwC0D1
> crw-rw---T 1 root audio 116, 6 Apr 8 09:13 hwC0D3
> crw-rw---T 1 root audio 116, 5 Apr 8 15:01 pcmC0D0c
> crw-rw---T 1 root audio 116, 4 Apr 8 15:01 pcmC0D0p
> crw-rw---T 1 root audio 116, 3 Apr 8 15:01 pcmC0D1p
> crw-rw---T 1 root audio 116, 2 Apr 8 15:01 pcmC0D3p
> crw------T 1 root root 116, 1 Apr 8 11:13 seq
> crw-rw---T 1 root audio 116, 33 Apr 8 11:13 timer
>
>> cat /etc/default/pulseaudio
>
> $ cat /etc/default/pulseaudio
> # Start the PulseAudio sound server in system mode.
> # (enables the pulseaudio init script - requires that users be in the
> # pulse-access group)
> # System mode is not the recommended way to run PulseAudio as it has some
> # limitations (such as no shared memory access) and could potentially allow
> # users to disconnect or redirect each others' audio streams. The
> # recommended way to run PulseAudio is as a per-session daemon. For GNOME/KDE/
> # Xfce sessions in Ubuntu Lucid/10.04, /etc/xdg/autostart/pulseaudio.desktop
> # handles this function of automatically starting PulseAudio on login, and for
> # it to work correctly your user must *not* have "autospawn = no" set in
> # ~/.pulse/client.conf (or in /etc/pulse/client.conf). By default, autospawn
> # is enabled. For other sessions, you can simply start PulseAudio with
> # "pulseaudio --daemonize".
> # 0 = don't start in system mode, 1 = start in system mode
> PULSEAUDIO_SYSTEM_START=0
>
> # Prevent users from dynamically loading modules into the PulseAudio sound
> # server. Dynamic module loading enhances the flexibility of the PulseAudio
> # system, but may pose a security risk.
> # 0 = no, 1 = yes
> DISALLOW_MODULE_LOADING=1
Looks good.
>
>> Also, does that system have multiple users?
>
> Not really, my user (robin) is the only real user plus root. If it would help
> debugging, I could create a new user to see if the problem is there, too.
>
Not necessary for now, I think the problem is not user configuration
but rather what I explained above.
--
Saludos,
Felipe Sateler
More information about the pkg-pulseaudio-devel
mailing list