1

While troubleshooting a problem with VMWare disconnecting audio device during Ubuntu boot (18.04.1 LTS Ubuntu Desktop), I have isolated the problem to be systemd running pulseaudio in system mode before the login screen show up. pulseaudio runs in user mode just fine after logging in, and that is what I need.

My question is how to disable pulseaudio (which is part of sound.target) in systemd, before the user login screen.

4

Try first to stop and disable pulseaudio

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

or

sudo systemctl stop pulseaudio
sudo systemctl disable  pulseaudio

and eventually

sudo systemctl mask pulseaudio

to prevent that other services start pulseaudio again.

Take a look at

man pulse-daemon.conf

This man describes the PulseAudio daemon configuration file.

   The  PulseAudio sound server reads configuration directives from a con‐
   figuration file on startup. If the per-user  file  ~/.config/pulse/dae‐
   mon.conf  exists,  it  is used, otherwise the system configuration file
   /etc/pulse/daemon.conf is used. In addition to those main  files,  con‐
   figuration  directives  can  also  be  put  in  files under directories
   ~/.config/pulse/daemon.conf.d/  and  /etc/pulse/daemon.conf.d/.   Those
   files  have  to  have  the .conf file name extension, but otherwise the
   file names can be chosen freely. The files under daemon.conf.d are pro‐
   cessed  in alphabetical order. In case the same option is set in multi‐
   ple files, the last file to set an option overrides earlier files.  The
   main daemon.conf file is processed first, so options set in files under
   daemon.conf.d override the main file.

One of these settings is

   daemonize=  Daemonize after startup. Takes a boolean value, defaults to
               no. The --daemonize command line option takes precedence.

Open the /etc/pulse/daemon.conf and set

daemonize = no

Open the local configuration file ~/.config/pulse/client.conf

Uncomment the following line

autospawn = no

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.