Bug 476931

Summary: pulseaudio system start should preclude pulseaudio per-x11 session start
Product: [Fedora] Fedora Reporter: Rudd-O DragonFear <rudd-o>
Component: pulseaudioAssignee: Lennart Poettering <lpoetter>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 10CC: lkundrak, lpoetter, pierre-bugzilla
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-12-18 15:14:00 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Rudd-O DragonFear 2008-12-18 02:08:57 UTC
Description of problem:

if pulseaudio is configured to run as a system daemon by a system integrator or terminal services manager, then the extra pulseaudio processes started up by the /etc/xdg/autostart dir are useless

the fix is straightforward:

/usr/bin/start-pulseaudio-x11:

add line

pgrep -f 'pulseaudio.*--system' > /dev/null && exit

before line

set -e

and that fixes the issue.

the gains for the user scenarios listed above are big.

Comment 1 Rudd-O DragonFear 2008-12-18 02:10:21 UTC
Here is a sample event.d upstart startup file for pulseaudio as a system service (just for reference purposes):

-------------------------------------

start on runlevel [2345]
stop on runlevel [016]

exec pulseaudio --system --realtime --log-target=syslog

respawn

description "PulseAudio system server"

pre-start script
        for a in `seq 60` ; do
                sleep 1
                killall -0 hald && killall -0 dbus-daemon && break
        done
end script

-------------------------------------

The pre-start script takes care of checking whether dbus is already up, which is needed for some pulseaudio featuers.

Comment 2 Rudd-O DragonFear 2008-12-18 02:10:38 UTC
Here is a sample event.d upstart startup file for pulseaudio as a system service (just for reference purposes):

-------------------------------------

start on runlevel [2345]
stop on runlevel [016]

exec pulseaudio --system --realtime --log-target=syslog

respawn

description "PulseAudio system server"

pre-start script
        for a in `seq 60` ; do
                sleep 1start on runlevel [2345]
stop on runlevel [016]

exec pulseaudio --system --realtime --log-target=syslog

respawn

description "PulseAudio system server"

pre-start script
        for a in `seq 60` ; do
                sleep 1
                killall -0 hald && killall -0 dbus-daemon && break
        done
end script
                killall -0 hald && killall -0 dbus-daemon && break
        done
end script

-------------------------------------

The pre-start script takes care of checking whether dbus is already up, which is needed for some pulseaudio featuers.

Comment 3 Rudd-O DragonFear 2008-12-18 02:11:18 UTC
disregard comment #2 please, my mouse is broken.

Comment 4 Lennart Poettering 2008-12-18 15:14:00 UTC

*** This bug has been marked as a duplicate of bug 461546 ***