How does PulseAudio start?

PulseAudio is always running on my system, and it always instantly restarts if it crashes or I kill it. However, I never actually start PulseAudio.

I have checked /etc/init.d/ and /etc/X11/Xsession.d/, and I have checked systemctl list-units -a, and PulseAudio is nowhere to be found.

How come PulseAudio seemingly magically starts by itself without me ever running it, and how does it instantly restart when it dies?

I’m using Debian 8 (jessie) with xinit and the i3 window manager, and PulseAudio 5.


Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.

Method 1

It seems any process linking to the libpulse* family of shared objects–either before or after running X and the i3 window manager–may implicitly autospawn PulseAudio server, under your user process, as a byproduct of attempts to interface with the audio subsystem. PulseAudio creator Lennart Poettering seems to confirm this, in a 2015-05-29 email to the systemd-devel mailing list:

“pulseaudio is generally not a system service but a user service.
Unless your user session is fully converted to be managed by systemd
too (which is unlikely) systemd is hence not involved at all with
starting it.

“PA is usually started from the session setup script or service. In
Gnome that’s gnome-session, for example. It’s also auto-spawned
on-demand if the libraries are used and note that it is missing.”

For example, on Debian Stretch (Testing), web browser IceWeasel links to two libpulse* shared objects: 1); and 2)

<a href="" class="__cf_email__" data-cfemail="1c775c7e697f777968">[email protected]</a>:~$ ps -ef | grep iceweasel
k        17318     1  5 18:58 tty2     00:00:15 iceweasel
k        17498  1879  0 19:03 pts/0    00:00:00 grep iceweasel
<a href="" class="__cf_email__" data-cfemail="f59eb59780969e9081">[email protected]</a>:~$ sudo pmap 17318 | grep -i pulse
00007fee08377000  65540K rw-s- pulse-shm-2442253193
00007fee0c378000  65540K rw-s- pulse-shm-3156287926
00007fee11d24000    500K r-x--
00007fee11da1000   2048K -----
00007fee11fa1000      4K r----
00007fee11fa2000      8K rw---
00007fee121af000    316K r-x--
00007fee121fe000   2044K -----
00007fee123fd000      4K r----
00007fee123fe000      4K rw---

You may see which running processes link to libpulse*. For example, first get a list of libpulse* shared objects, then run lsof on each (note: this comes from Debian Stretch (Testing), so your output may differ):
sudo find / -type f -name "*libpulse*"

sudo lsof /usr/lib/x86_64-linux-gnu/pulseaudio/
gnome-she   864 Debian-gdm mem    REG  252,1   524312 274980 /usr/lib/x86_64-linux-gnu/pulseaudio/
gnome-set   965 Debian-gdm mem    REG  252,1   524312 274980 /usr/lib/x86_64-linux-gnu/pulseaudio/
gnome-set  1232          k mem    REG  252,1   524312 274980 /usr/lib/x86_64-linux-gnu/pulseaudio/
gnome-she  1286          k mem    REG  252,1   524312 274980 /usr/lib/x86_64-linux-gnu/pulseaudio/
chrome     2730          k mem    REG  252,1   524312 274980 /usr/lib/x86_64-linux-gnu/pulseaudio/
pulseaudi 18356          k mem    REG  252,1   524312 274980 /usr/lib/x86_64-linux-gnu/pulseaudio/

To tell these processes not to autospawn PulseAudio, edit ~/.config/pulse/client.conf and add line
autospawn = no

PulseAudio and its libraries respect that setting, generally.

The libpulse* linking by running processes may also indicate why PulseAudio respawns so quickly. The page, “Running PulseAudio“, seems to confirm this:

“…typically some background application will immediately reconnect,
causing the server to get immediately restarted.”

You seem to indicate you start the i3 window manager via the console (by running xinit) and do not use a display manager or desktop environment. The rest of this answer details info for those that do use GNOME, KDE, and so forth.


Package PulseAudio (5.0-13), in Debian Jessie (Stable) amd64, installs the following four system files:

  1. /etc/xdg/autostart/pulseaudio-kde.desktop
  2. /etc/xdg/autostart/pulseaudio.desktop
  3. /usr/bin/start-pulseaudio-x11
  4. /usr/bin/start-pulseaudio-kde

Some graphical session managers automatically run autostart scripts on user login. The PulseAudio autostart script, in turn, tells graphical session managers to run the appropriate PulseAudio startup script:


These scripts call PulseAudio client /usr/bin/pactl to load PulseAudio modules, which spawns the PulseAudio server as a byproduct (note: if you have autospawn set to “no”, pactl respects that and will not autospawn PulseAudio server).

More detail, at the page “Running PulseAudio“.

Some display managers, in addition and in other distributions, may start PulseAudio (for example, SDDM, on ArchLinux. Though maintainers may have resolved this, by now).

Method 2

How is PulseAudio getting started?

While this is still a valid question, the answer for it has changed over time. The previous answers are either insufficient or incorrect as now PulseAudio is being launched automatically by the user’s systemd, which in turn was launched by the system’s systemd when the user logged in.

$ systemctl --user status pulseaudio
● pulseaudio.service - Sound Service
   Loaded: loaded (/usr/lib/systemd/user/pulseaudio.service; enabled; vendor pre
   Active: active (running) since Tue 2020-03-14 15:29:56 ZULU; 13s ago
 Main PID: 31080 (pulseaudio)
   CGroup: /user.slice/user-1000.slice/<a href="" class="__cf_email__" data-cfemail="314442544371000101011f42544347585254">[email protected]</a>/pulseaudio.service
           ├─31080 /usr/bin/pulseaudio --daemonize=no
           └─31081 /usr/lib/x86_64-linux-gnu/pulse/gsettings-helper

To kill PulseAudio

To stop the PulseAudio process and have it not immediately launch a new instance, use systemctl --user stop:

$ systemctl --user stop pulseaudio.service pulseaudio.socket

To disable PulseAudio

If you do not wish PulseAudio to start automatically upon login, you can disable it like so:

$ systemctl --user disable pulseaudio.service pulseaudio.socket

(By the way, even with it disabled, you can still start PulseAudio when you want it by using systemctl --user start.)

Answering the question in general

The commands above are all you need. However, if you are interested in how to figure out the solution on your own, keep reading.

To find out what processes have the sound card open

Use either the lsof or fuser -v commands to see what processes have the device files open.

$ lsof /dev/snd/*
pulseaudi 32768 hackerb9  3u   CHR  116,5       0t0 15499 /dev/snd/controlC0

To find out what process launched PulseAudio

Use pstree -s to show the parent processes like so:

$ pstree -sp 32768
                                              │                        ├─{gsett+
                                              │                        └─{gsett+

I used that to see that PulseAudio was actually getting launched by an instance of systemd (PID 738) which was running in my own account:
$ ps -fp 738
hackerb9   738     1  0 Feb10 ?        00:00:00 /lib/systemd/systemd --user

From there, it is easy to guess that one needs to use systemctl --user to stop it.

Method 3

Pulseaudio is a little daemon. man pulseaudio says you can turn it off with the command pulseaudio --kill but doing that takes the rebirth again– it respawns itself. A normal init script is there to start it at boot, /etc/rc2.d/S50pulseaudio. But when you try controlling this the normal Linux way it doesn’t work, because running /etc/init.d/pulseaudio stop doesn’t stop it. Removing /etc/rc2.d/S50pulseaudio doesn’t prevent it from starting at boot.

To stop its respawning habit, open /etc/pulse/client.conf, change autospawn = yes to autospawn = no, and set daemon-binary to /bin/true. Make sure these lines are uncommented, like this:

 autospawn = no
 daemon-binary = /bin/true

Now we can deal with the normal Linux startup files. First delete /etc/rc2.d/S50pulseaudio. Or you may rename it to a kill command, which preserves the link in case you ever want it again:

$ mv /etc/rc2.d/S50pulseaudio /etc/rc2.d/K50pulseaudio


There may be one more startup file to dispense with: /etc/X11/Xsession.d/70pulseaudio. This starts Pulse when a Gnome session starts. Delete it or copy it to a different directory in case you want to save it, and again verify the exact file name. A useful trick, when you find scripts that start PulseAudio, is to change the binary that they call from /usr/bin/pulseaudio to /bin/true. This is a nice little executable whose only job is to “do nothing, successfully”. It keeps the scripts happy, and it’s a convenient placeholder if you ever want to change it back.

Now that you have purged all the startup and respawning scripts, Now use the below commands to stop and start the pulse audio.

 $ pulseaudio --kill
 $ pulseaudio --start

Method 4

The answer given by Thushi/Carla Schroder (see next answer) still working fine after an upgrade from debian wheezy to jessie. I got following error after research my boot messages (the error is listed in last line).

<a href="" class="__cf_email__" data-cfemail="8dffe2e2f9cdfbe2f4e1e4e3f5">[email protected]</a>:/etc#journalctl -b | grep pulseaudio
Dez 31 16:19:46 voylinx rtkit-daemon[1507]: Successfully made thread 1506 of process 1506 (/usr/bin/pulseaudio) owned by '1000' high priority at nice level -11.
Dez 31 16:19:49 voylinx rtkit-daemon[1507]: Successfully made thread 1526 of process 1506 (/usr/bin/pulseaudio) owned by '1000' RT at priority 5.
Dez 31 16:19:49 voylinx rtkit-daemon[1507]: Successfully made thread 1527 of process 1506 (/usr/bin/pulseaudio) owned by '1000' RT at priority 5.
Dez 31 16:19:49 voylinx rtkit-daemon[1507]: Successfully made thread 1528 of process 1506 (/usr/bin/pulseaudio) owned by '1000' RT at priority 5.
Dez 31 16:19:49 voylinx rtkit-daemon[1507]: Successfully made thread 1533 of process 1506 (/usr/bin/pulseaudio) owned by '1000' RT at priority 5.
Dez 31 16:19:50 voylinx rtkit-daemon[1507]: Successfully made thread 1548 of process 1548 (/usr/bin/pulseaudio) owned by '1000' high priority at nice level -11.
Dez 31 16:19:50 voylinx pulseaudio[1548]: [pulseaudio] pid.c: Daemon already running.

pulseaudio-daemon was started twice. Once by the rtkit-daemon and the other times by GNOME/KDE AUTOSTART or an other app. Anyway setting in /etc/pulse/client.conf
autospawn = no
daemon-binary = /bin/true

solved my problem. The only thing what I can’t confirm is there are no more any startup scripts in any /etc/rcX.d directories. Pretty clear because the rtkit-daemon does the job with interaction of systemd.

All methods was sourced from or, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

0 0 votes
Article Rating
Notify of
Inline Feedbacks
View all comments