Bug 476931 - pulseaudio system start should preclude pulseaudio per-x11 session start
Summary: pulseaudio system start should preclude pulseaudio per-x11 session start
Keywords:
Status: CLOSED DUPLICATE of bug 461546
Alias: None
Product: Fedora
Classification: Fedora
Component: pulseaudio
Version: 10
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Lennart Poettering
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-12-18 02:08 UTC by Rudd-O DragonFear
Modified: 2009-05-11 18:11 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2008-12-18 15:14:00 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

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 ***


Note You need to log in before you can comment on or make changes to this bug.