FS#38412 - [pulseaudio] pid.c: Daemon already running, Prevent by modifying ...xinitrc.d/pulseadio & PKGBUILD

Attached to Project: Arch Linux
Opened by Colin Keenan (colinkeenan) - Tuesday, 07 January 2014, 23:38 GMT
Last edited by Jan Alexander Steffens (heftig) - Thursday, 06 February 2014, 21:11 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Jan Alexander Steffens (heftig)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 2
Private No

Details

Many people over the years on various distros have reported getting the following error message on boot:

[code][pulseaudio] pid.c: Daemon already running.[/code]

I am reporting this bug against both the pulseaudio PKGBUILD and /etc/X11/xinit/xinitrc.d/pulseaudio.

I have determined that the following three files work together well to only start pulseaudio one time:

[code]
/etc/xdg/autostart/pulseaudio.desktop
/etc/xdg/autostart/pulseaudio-kde.desktop
/etc/X11/xinit/xinitrc.d/pulseaudio
[/code]

In spite of that, something still tries to start pulseaudio a 2nd time regardless of what Desktop Environment is used.

Steps to reproduce:
1) Install and enable SDDM (probably many other Display Managers as well, but I haven't tested it.)

That's the only step needed to produce this error on boot. I have determined that SDDM starts pulseaudio even if all three of the files listed above are deleted. In fact, I have eliminated the error on my machine by deleting all three of those files and letting SDDM be the only thing starting pulseaudio.

The way that I determined that SDDM starts pulseaudio no matter what is by deleting the three files listed above and seeing that pulseaudio still started on boot;and then by disabling SDDM and seeing that pulseaudio would not start on boot (I tried 3 times). So, it starts with SDDM and doesn't start without SDDM (having previously deleted the other files that would start pulseaudio). Therefore SDDM starts pulseaudio no matter what. I'm sure that many other Display Managers do as well.

Suggested fix:
This problem can be completely solved in Arch, although it will still effect other distros. To solve it in Arch, I'm suggesting changes be made to both pulseaudio PKGBUILD and /etc/X11/xinit/xinitrc.d/pulseaudio.

/etc/X11/xinit/xinitrc.d/pulseaudio - I'm suggesting removing the test for $DESKTOP_SESSION (this change will have to be made in coordination with changing the PKGBUILD). Instead, test for what Display Manager is running (using systemd or whatever is available). Somebody will have to compile a list of Display Managers that start pulseaudio no matter what, and if any of those Display Managers are being used, don't start pulseaudio. I'm also suggesting to verify pulseaudio isn't already running before trying to start pulseaudio.

PKGBUILD - I'm suggesting the the following 2 files be removed from the Arch pulseaudio PKGBUILD: /etc/xdg/autostart/pulseaudio.desktop
/etc/xdg/autostart/pulseaudio-kde.desktop
Also, no need to create /etc/xdg or /etc/xdg/autostart..
This task depends upon

Closed by  Jan Alexander Steffens (heftig)
Thursday, 06 February 2014, 21:11 GMT
Reason for closing:  Duplicate
Additional comments about closing:   FS#37987 
Comment by Jan Alexander Steffens (heftig) - Thursday, 06 February 2014, 20:23 GMT
Please bring this upstream if it's really an advantageous change.
Comment by Jan Alexander Steffens (heftig) - Thursday, 06 February 2014, 21:11 GMT
I forgot the xinit stuff was our downstream patch; still, please don't duplicate bugs.

Loading...