You are not logged in.

#1 2014-01-04 18:04:35

colinkeenan
Member
From: Kansas City, MO USA
Registered: 2013-06-13
Posts: 213
Website

[Solved] What's starting pulseaudio? [It's the DM, SDDM in my case]

I started investigating the only boot error message I was getting.

The output of

sudo journalctl -b -p err

was consistently reporting

[pulseaudio] pid.c: Daemon already running.

After some experimentation, I discovered that moving /etc/xdg/autostart/pulseaudio.desktop to my home folder solved the problem. But, what else was starting it?

To find out, I tried to move other files that might be starting it. I ended up moving the following three files into ~/pulseaudio-trouble:

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

On restart, pulseaudio is still being loaded. There's no error messages on boot. Using htop, sorting by COMMAND, and searching on pulseaudio, I verified pulseaudio really is running. I checked my ~/.xinitrc and it doesn't do anything beyond executing stuff in /etc/X11/xinit/xinitrc.d. My ~/.bashrc is only a few lines long and doesn't execute any applications.

I also checked to see if systemd was running it:

systemctl | grep pulseaudio

returns nothing.

So, what's starting pulseaudio?

Last edited by colinkeenan (2014-01-07 00:38:04)

Offline

#2 2014-01-04 19:04:46

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: [Solved] What's starting pulseaudio? [It's the DM, SDDM in my case]

pulseaudio starts when anything wants to use it, unless you disable autospawn in its config files.

Offline

#3 2014-01-04 19:28:57

colinkeenan
Member
From: Kansas City, MO USA
Registered: 2013-06-13
Posts: 213
Website

Re: [Solved] What's starting pulseaudio? [It's the DM, SDDM in my case]

Thanks, I didn't know that. Two questions though:

1) Given that pulseaudio will start as soon as something needs it, why are there so many files making sure it starts at boot?

2) What would want pulseaudio at boot to cause it to start before /etc/xdg/autostart/pulseaudio.desktop is called?

Offline

#4 2014-01-04 19:40:17

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: [Solved] What's starting pulseaudio? [It's the DM, SDDM in my case]

These desktop files seem to do more than just start pulseaudio.

Maybe knotify4 starts it (if you're using KDE).

Offline

#5 2014-01-04 19:50:15

colinkeenan
Member
From: Kansas City, MO USA
Registered: 2013-06-13
Posts: 213
Website

Re: [Solved] What's starting pulseaudio? [It's the DM, SDDM in my case]

I'm using Xfce. There's an application for setting sessions and startup, but it doesn't show anything about pulseaudio. It just occurred to me to try and clear save sessions and see what happens. I will reboot and check from the terminal if pulseaudio is running.

Offline

#6 2014-01-04 19:55:24

colinkeenan
Member
From: Kansas City, MO USA
Registered: 2013-06-13
Posts: 213
Website

Re: [Solved] What's starting pulseaudio? [It's the DM, SDDM in my case]

Pulseaudio was running after clearing my Xfce saved sessions and rebooting. This is even though I've moved all the files that should start pulseaudio durring boot into a folder in my home directory.

I would like to know, does anybody NOT get the

[pulseaudio] pid.c: Daemon already running.

error on boot? Please check and report here by running this command:

sudo journalctl -b -p err

I mean, I know you get rid of the error by removing the relevant file from xdg, but anyone who hasn't already found that solution, don't all of you get this error message?

So, what's starting pulseaudio besides the xdg .desktop files?

Last edited by colinkeenan (2014-01-05 18:56:15)

Offline

#7 2014-01-05 02:24:34

Thaodan
Member
From: Dortmund, Nordrein-Westfalen
Registered: 2012-04-28
Posts: 448

Re: [Solved] What's starting pulseaudio? [It's the DM, SDDM in my case]

I get the same error on every login while using KDE no idea, theonly thing I noticed is that Pulseaudio doesn't save its master volume.


Linux odin 3.13.1-pf #1 SMP PREEMPT Wed Mar 5 21:47:28 CET 2014 x86_64 GNU/Linux

Offline

#8 2014-01-05 16:10:03

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

Re: [Solved] What's starting pulseaudio? [It's the DM, SDDM in my case]

I had exactly the same issue and was also very puzzled about it.

I ended up reporting the issue on the bugtracker: https://bugs.archlinux.org/task/37987

But in contrary to you, for me it was sufficient to (re)move all pulseaudio files in /etc/xdg/autostart in order to get rid of the error message on boot.

Offline

#9 2014-01-05 18:49:21

colinkeenan
Member
From: Kansas City, MO USA
Registered: 2013-06-13
Posts: 213
Website

Re: [Solved] What's starting pulseaudio? [It's the DM, SDDM in my case]

Orschiro and anyone else confused by my post,

I got rid of the error message no problem. Simply removing the one file that was trying to start it solved the problem: /etc/xdg/autostart/pulseaudio.desktop.

My question is, what else is making pulseaudio start on boot? I moved those other 2 files, but they weren't starting pulseaudio anyway. The kde one is only visible in kde and I'm not running kde. The X11 one tests to see if the desktop will be starting it, and correctly determined that Xfce would start pulseaudio by running /etc/xdg/autostart/pulseaudio.desktop. So, neither of those files had anything to do with the error message. It was just /etc/xdg/autostart/pulseaudio.desktop causing the error, but that's only because SOMETHING ELSE already started pulseaudio.

I think it's the same for everybody. SOMETHING is starting pulseaudio on boot, and it has nothing to do with the X11/xinit or xdg files.

Offline

#10 2014-01-05 18:53:33

colinkeenan
Member
From: Kansas City, MO USA
Registered: 2013-06-13
Posts: 213
Website

Re: [Solved] What's starting pulseaudio? [It's the DM, SDDM in my case]

Orshiro,

I just read you bug report and comments and it is EXACTLY what I am asking about. The error message goes away by removing the .desktop file in xdg that was starting it a 2nd time. However, what's starting it the first time? Why do we need files in X11 and xdg trying to start pulseaudio if it starts anyway?

Offline

#11 2014-01-05 21:21:12

dodo3773
Member
Registered: 2011-03-17
Posts: 801

Re: [Solved] What's starting pulseaudio? [It's the DM, SDDM in my case]

I'm not really that sure how this works but I am wondering if this may be related?

http://www.freedesktop.org/wiki/Softwar … gToServer/

The last paragraph starts: "If user's pulseaudio executable isn't running when a client reads the Address property, D-Bus automatically starts pulseaudio."

If dbus is disabled then does pulseaudio not start?

Edit: Another thing that may be worth looking at (from "man 7 systemd.special"):

sound.target
           This target is started automatically as soon as a sound card is plugged
           in or becomes available at boot.

           This may be used to pull in audio management daemons dynamically when
           audio hardware is found.

Maybe try to mask / disable that service to test.

Last edited by dodo3773 (2014-01-05 21:44:50)

Offline

#12 2014-01-06 02:14:02

colinkeenan
Member
From: Kansas City, MO USA
Registered: 2013-06-13
Posts: 213
Website

Re: [Solved] What's starting pulseaudio? [It's the DM, SDDM in my case]

I think you might be right, dodo3773. I'm beginning to read about dbus and already found out it's a dependency of systemd. So, disabling dbus would also disable systemd, I guess. I don't plan on doing that, but would like to understand it well enough to see if it's what's starting pulseaudio. I've noticed that dbus is in /etc/X11/xinit/xinitrc.d so that it gets started by .xinitrc or by your desktop if it's not already running.

I'm starting with this: http://www.freedesktop.org/wiki/IntroductionToDBus/

Offline

#13 2014-01-06 02:16:26

dodo3773
Member
Registered: 2011-03-17
Posts: 801

Re: [Solved] What's starting pulseaudio? [It's the DM, SDDM in my case]

I edited my post. Try masking / disabling sound.target through systemd and see if that works.

Edit: There is even a wiki page for systemctl (it's a redirect to systemd wiki page nevermind; but yeah read it): https://wiki.archlinux.org/index.php/Systemctl It is good to know your init system.

Last edited by dodo3773 (2014-01-06 02:58:07)

Offline

#14 2014-01-06 02:52:03

colinkeenan
Member
From: Kansas City, MO USA
Registered: 2013-06-13
Posts: 213
Website

Re: [Solved] What's starting pulseaudio? [It's the DM, SDDM in my case]

I tried simply moving /usr/lib/systemd/system/sound.target to my home directory and verified it was not in the original directory. On reboot, pulseaudio was still running even though sound.target was still not where it belonged. There's still a sound.target in /usr/lib/systemd/usr, but it's a broken link to the missing sound.target that I moved to my home directory. Doesn't seem like this is what's starting pulseaudio, but I will look into the proper way to disable sound.target.

Offline

#15 2014-01-06 02:54:55

dodo3773
Member
Registered: 2011-03-17
Posts: 801

Re: [Solved] What's starting pulseaudio? [It's the DM, SDDM in my case]

"systemctl mask sound.target" Read the systemctl man page. Probably be safer than just moving files around just saying. I meant to do the same with dbus (dbus.service etc...). I didn't mean trying to remove dbus from your system. Hope that makes more sense.

Offline

#16 2014-01-06 02:54:59

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: [Solved] What's starting pulseaudio? [It's the DM, SDDM in my case]

You need to look into how to mask something.  Removing the file is not masking it.

Offline

#17 2014-01-06 03:08:49

colinkeenan
Member
From: Kansas City, MO USA
Registered: 2013-06-13
Posts: 213
Website

Re: [Solved] What's starting pulseaudio? [It's the DM, SDDM in my case]

OK, I did

sudo systemctl mask sound.target

and reboot. Pulseaudio was not running, but before I got too excited (because this happens every once in a while), I reboot again. On 2nd reboot, pulseaudio was running. I verified that sound.target was still masked:

colin  ~$ systemctl status sound.target
sound.target
   Loaded: masked (/dev/null)
   Active: inactive (dead)

. Just to see what happened when pulseaudio didn't run, I did

colin  ~$ journalctl -b -1 -p err
-- Logs begin at Thu 2013-12-19 09:25:02 CST, end at Sun 2014-01-05 20:55:39 CST. --
colin  ~$ journalctl -b -0 -p err
-- Logs begin at Thu 2013-12-19 09:25:02 CST, end at Sun 2014-01-05 20:55:39 CST. --
colin  ~$ journalctl -b -2 -p err
-- Logs begin at Thu 2013-12-19 09:25:02 CST, end at Sun 2014-01-05 20:55:39 CST. --
Jan 05 20:54:21 colin pulseaudio[1341]: [pulseaudio] client-conf-x11.c: xcb_connection_has_error() returned true
Jan 05 20:54:21 colin pulseaudio[1417]: [pulseaudio] core-util.c: Failed to connect to system bus: Did not receive a reply. Possible c
Jan 05 20:54:21 colin pulseaudio[1417]: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/db
Jan 05 20:54:21 colin pulseaudio[1417]: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/db
Jan 05 20:54:21 colin pulseaudio[1417]: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/db
-- Logs begin at Thu 2013-12-19 09:25:02 CST, end at Sun 2014-01-05 20:55:39 CST. --
Jan 05 20:54:21 colin pulseaudio[1341]: [pulseaudio] client-conf-x11.c: xcb_connection_has_error() returned true
Jan 05 20:54:21 colin pulseaudio[1417]: [pulseaudio] core-util.c: Failed to connect to system bus: Did not receive a reply. Possible c
Jan 05 20:54:21 colin pulseaudio[1417]: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/db
Jan 05 20:54:21 colin pulseaudio[1417]: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/db
Jan 05 20:54:21 colin pulseaudio[1417]: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/db
Jan 05 20:54:21 colin pulseaudio[1417]: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/db
Jan 05 20:54:21 colin pulseaudio[1417]: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/db
Jan 05 20:54:21 colin pulseaudio[1417]: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/db
Jan 05 20:54:21 colin pulseaudio[1417]: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/db
Jan 05 20:54:21 colin pulseaudio[1417]: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/db
Jan 05 20:54:21 colin pulseaudio[1417]: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/db
Jan 05 20:54:21 colin pulseaudio[1417]: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/db
Jan 05 20:54:21 colin pulseaudio[1417]: [alsa-sink-HDMI 0] core-util.c: Failed to connect to system bus: Failed to connect to socket /
Jan 05 20:54:21 colin pulseaudio[1417]: [alsa-sink-HDMI 0] core-util.c: Failed to connect to system bus: Failed to connect to socket /
Jan 05 20:54:21 colin pulseaudio[1417]: [alsa-sink-HDMI 0] core-util.c: Failed to connect to system bus: Failed to connect to socket /
Jan 05 20:54:21 colin pulseaudio[1417]: [alsa-sink-HDMI 0] core-util.c: Failed to connect to system bus: Failed to connect to socket /
Jan 05 20:54:21 colin pulseaudio[1417]: [alsa-sink-HDMI 0] core-util.c: Failed to connect to system bus: Failed to connect to socket /
Jan 05 20:54:21 colin pulseaudio[1417]: [alsa-source-ALC892 Analog] core-util.c: Failed to connect to system bus: Failed to connect to
Jan 05 20:54:21 colin pulseaudio[1417]: [alsa-source-ALC892 Analog] core-util.c: Failed to connect to system bus: Failed to connect to
Jan 05 20:54:21 colin pulseaudio[1417]: [alsa-source-ALC892 Analog] core-util.c: Failed to connect to system bus: Failed to connect to
Jan 05 20:54:21 colin pulseaudio[1417]: [alsa-source-ALC892 Analog] core-util.c: Failed to connect to system bus: Failed to connect to
Jan 05 20:54:21 colin pulseaudio[1417]: [alsa-source-ALC892 Analog] core-util.c: Failed to connect to system bus: Failed to connect to
Jan 05 20:54:21 colin pulseaudio[1417]: [pulseaudio] module-jackdbus-detect.c: Unable to contact D-Bus session bus: org.freedesktop.DB
Jan 05 20:54:21 colin pulseaudio[1417]: [pulseaudio] module.c: Failed to load module "module-jackdbus-detect" (argument: "channels=2")
Jan 05 20:54:21 colin pulseaudio[1417]: [pulseaudio] main.c: Module load failed.

There were no errors last time or this time, so I don't know why pulseaudio wasn't running last time. What's interesting though is 2 times ago when I had moved sound.target. There's tons of error messages about failing to  connect to stuff including system bus and D-bus.

It's also interesting to look at the full boot message on this boot (when pulseaudio did load) and previous boot (when pulseaudio did not load):

colin  ~$ journalctl -b -0
-- Logs begin at Thu 2013-12-19 09:25:02 CST, end at Sun 2014-01-05 20:55:39 CST. --
Jan 05 20:55:39 colin systemd[414]: Failed to open private bus connection: Failed to connect to socket /run/user/1000/dbus/user_bus_so
Jan 05 20:55:39 colin systemd[414]: Mounted /sys/kernel/config.
Jan 05 20:55:39 colin systemd[414]: Stopped target Sound Card.
Jan 05 20:55:39 colin systemd[414]: Stopped target Bluetooth.
Jan 05 20:55:39 colin systemd[414]: Starting Default.
Jan 05 20:55:39 colin systemd[414]: Reached target Default.
Jan 05 20:55:39 colin systemd[414]: Startup finished in 18ms.
colin  ~$ journalctl -b -1
-- Logs begin at Thu 2013-12-19 09:25:02 CST, end at Sun 2014-01-05 20:55:39 CST. --
Jan 05 20:54:04 colin systemd[413]: Failed to open private bus connection: Failed to connect to socket /run/user/1000/dbus/user_bus_so
Jan 05 20:54:04 colin systemd[413]: Mounted /sys/kernel/config.
Jan 05 20:54:04 colin systemd[413]: Stopped target Sound Card.
Jan 05 20:54:04 colin systemd[413]: Stopped target Bluetooth.
Jan 05 20:54:04 colin systemd[413]: Starting Default.
Jan 05 20:54:04 colin systemd[413]: Reached target Default.
Jan 05 20:54:04 colin systemd[413]: Startup finished in 12ms.
Jan 05 20:55:22 colin systemd[413]: Stopping Default.
Jan 05 20:55:22 colin systemd[413]: Stopped target Default.
Jan 05 20:55:22 colin systemd[413]: Starting Shutdown.
Jan 05 20:55:22 colin systemd[413]: Reached target Shutdown.
Jan 05 20:55:22 colin systemd[413]: Starting Exit the Session...

Both are the same (not counting shutdown messages from the previous boot), except when pulseaudio didn't load, startup was 6ms faster.

Last edited by colinkeenan (2014-01-06 03:11:55)

Offline

#18 2014-01-06 03:22:02

colinkeenan
Member
From: Kansas City, MO USA
Registered: 2013-06-13
Posts: 213
Website

Re: [Solved] What's starting pulseaudio? [It's the DM, SDDM in my case]

I reboot 2 more times and again the first reboot pulseaudio was not running and the 2nd reboot it was running. I verified both times that sound.card was masked. The systemctl man page seems to say that the mask only continues until the next reboot, but that's not true or I am not understanding the man page on that. Masking sound.target seems to have little effect other than possibly making the start of pulseaudio a little less stable. I have unmasked sound.target.

Offline

#19 2014-01-06 03:28:48

colinkeenan
Member
From: Kansas City, MO USA
Registered: 2013-06-13
Posts: 213
Website

Re: [Solved] What's starting pulseaudio? [It's the DM, SDDM in my case]

Boot looks the same whether or not sound.target is masked. Here it is unmasked:

colin  ~$ journalctl -b -0
-- Logs begin at Thu 2013-12-19 09:25:02 CST, end at Sun 2014-01-05 21:15:13 CST. --
Jan 05 21:15:13 colin systemd[416]: Failed to open private bus connection: Failed to connect to socket /run/user/1000/dbus/user_bus_so
Jan 05 21:15:13 colin systemd[416]: Mounted /sys/kernel/config.
Jan 05 21:15:13 colin systemd[416]: Stopped target Sound Card.
Jan 05 21:15:13 colin systemd[416]: Stopped target Bluetooth.
Jan 05 21:15:13 colin systemd[416]: Starting Default.
Jan 05 21:15:13 colin systemd[416]: Reached target Default.
Jan 05 21:15:13 colin systemd[416]: Startup finished in 17ms.
colin  ~$ systemctl status sound.target
sound.target - Sound Card
   Loaded: loaded (/usr/lib/systemd/system/sound.target; static)
   Active: inactive (dead)
     Docs: man:systemd.special(7)

Offline

#20 2014-01-06 03:32:41

colinkeenan
Member
From: Kansas City, MO USA
Registered: 2013-06-13
Posts: 213
Website

Re: [Solved] What's starting pulseaudio? [It's the DM, SDDM in my case]

Although unrelated, does anyone know anything about the first message in the boot journal every time?

...Failed to open private bus connection: Failed to connect to socket /run/user/1000/dbus/user_bus_socket...

Edit: looks like it's about this systemd/User - https://wiki.archlinux.org/index.php/Systemd/User. I guess pam_systemd.so tries to launch a user instance of systemd when I log on, but I don't have systemd/User configured. Don't really see why it's necessary though, so not going to worry about it.

Last edited by colinkeenan (2014-01-06 03:41:32)

Offline

#21 2014-01-06 03:43:50

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: [Solved] What's starting pulseaudio? [It's the DM, SDDM in my case]

That last post is a known issue that shouldn't hurt anything.  It is basically because systemd --user has not been officially implemented.

Offline

#22 2014-01-06 03:51:00

dodo3773
Member
Registered: 2011-03-17
Posts: 801

Re: [Solved] What's starting pulseaudio? [It's the DM, SDDM in my case]

Okay so did you mask / disable the dbus services too?

Offline

#23 2014-01-06 04:52:05

colinkeenan
Member
From: Kansas City, MO USA
Registered: 2013-06-13
Posts: 213
Website

Re: [Solved] What's starting pulseaudio? [It's the DM, SDDM in my case]

Tried masking dbus just now, and on reboot, pulseaudio was not running, but that's because I couldn't log into my desktop either. My Display Manager (SDDM) ran fine, but since systemd wasn't working properly without dbus, it didn't start pam so there was nothing verifying my password to login. I had to ctrl-alt-f1 to the terminal. Then, to my horror, I discovered I couldn't use systemctl to unmask dbus! Systemctl needs dbus to do anything. Running htop, I saw almost nothing was running in fact. Luckily, I kind of remembered that when I unmasked sound.target, all it did was remove sound.target from a folder in /etc somewhere. I easily found it in /etc/systemd/system and removed it. On reboot, I was back into my desktop.

Can't test if dbus is starting pulseaudio because almost everything depends on dbus so that nothing much runs without it.

Offline

#24 2014-01-06 05:16:12

progandy
Member
Registered: 2012-05-17
Posts: 5,003

Re: [Solved] What's starting pulseaudio? [It's the DM, SDDM in my case]

colinkeenan wrote:

Can't test if dbus is starting pulseaudio because almost everything depends on dbus so that nothing much runs without it.

If pulseaudio is started with dbus, there should be a service file in "/usr/share/dbus-1/services". Find it and disable it.


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#25 2014-01-06 05:34:23

dodo3773
Member
Registered: 2011-03-17
Posts: 801

Re: [Solved] What's starting pulseaudio? [It's the DM, SDDM in my case]

colinkeenan wrote:

Tried masking dbus just now, and on reboot, pulseaudio was not running, but that's because I couldn't log into my desktop either. My Display Manager (SDDM) ran fine, but since systemd wasn't working properly without dbus, it didn't start pam so there was nothing verifying my password to login. I had to ctrl-alt-f1 to the terminal. Then, to my horror, I discovered I couldn't use systemctl to unmask dbus! Systemctl needs dbus to do anything. Running htop, I saw almost nothing was running in fact. Luckily, I kind of remembered that when I unmasked sound.target, all it did was remove sound.target from a folder in /etc somewhere. I easily found it in /etc/systemd/system and removed it. On reboot, I was back into my desktop.

Can't test if dbus is starting pulseaudio because almost everything depends on dbus so that nothing much runs without it.

Oh glad you were able to get it back up quickly.

If pulseaudio is started with dbus, there should be a service file in "/usr/share/dbus-1/services". Find it and disable it.

Maybe this?:  org.gnome.GConf.service
That runs "/usr/lib/GConf/gconfd-2"  When doing a "ps aux | grep pulse" on my system shows "/usr/lib/pulse/gconf-helper" wondering if those two may be related.

Edit: Also, while testing make sure you are not using a display manager and you are starting your window manager like "xinit /path/to/wm" to make sure that's not what is starting it.

Last edited by dodo3773 (2014-01-06 05:39:02)

Offline

Board footer

Powered by FluxBB