Stop Pulseaudio temporarily

Optimize your system for ultimate performance.

Moderators: khz, MattKingUSA

User avatar
khz
Established Member
Posts: 1038
Joined: Thu Apr 17, 2008 6:29 am
Location: German

Stop Pulseaudio temporarily

Postby khz » Sat Mar 02, 2019 9:18 am

  1. As a user, not as root, copy the "client.conf" into your home directory:

    Code: Select all

    cp /etc/pulse/client.conf ~/.config/pulse/client.conf
  2. Change the entry in "~/.config/pulse/client.conf" from

    Code: Select all

    ; autospawn = yes

    to

    Code: Select all

    autospawn = no

    "no". The ";" out!

    or

    Code: Select all

    echo "autospawn = no" > ~/.config/pulse/client.conf


    (You don't need the entry "pulseaudio -k" in the "~/.bashrc".)

or

Systemd:

Code: Select all

systemctl --user stop pulseaudio


or

With pacmd - Reconfigure a PulseAudio sound server during runtime

Code: Select all

apt-get install pulseaudio-utils

Code: Select all

pacmd suspend true

https://linux.die.net/man/1/pacmd

####

(Then:
==> Install "a2jmidid" and "pulseaudio-module-jack".

In qjackctl settings:
    Jack with a2jmidid (and pulseaudio).
    • (Setup >> Options >> [X] Execute script at startup: "pulseaudio --start")
    • Setup >> Options >> [X] Run script after startup: "sleep 5 && a2j -e &" (a2j enables dbus) or "sleep 5 && a2jmidid -e &" (# sleep - delay a specified time period)
    • Setup >> Settings >> Parameters >> MIDI Drivers [none]
    • Setup >> Miscellaneous >> [ ] ([none]) Provide support for ALSA sequencer
    Jack without pulseaudio:
    • Setup >> Options >> [X] Execute script at startup: "pulseaudio -k"
    • Setup >> Options >> [X] Run script after shutdown: "pulseaudio --start"
)

####

# ==> Route Pulseaudio to jack, there are several possibilities:
- Install "pulseaudio-module-jack"
- PulseAudio through JACK https://wiki.archlinux.org/index.php/PulseAudio/Examples#PulseAudio_through_JACK
- How use PulseAudio and JACK? >> http://jackaudio.org/faq/pulseaudio_and_jack.html
- WalkThrough_User_PulseOnJack >> https://github.com/jackaudio/jackaudio.github.com/wiki/WalkThrough_User_PulseOnJack
- Using Qjackctl with jackd and pulseaudio >> https://linuxmusicians.com/viewtopic.php?p=58043#p58043
- pulseaudio_and_jack >> http://marzen.de/Holger/pulseaudio_and_jack/
- ... <== #
FZ - Does humor belongs in Music?
GNU/LINUX@AUDIO ~ /Wiki $ Howto.Info && GNU/Linux Debian installing >> Linux Audio Workstation LAW
    I don't care about the freedom of speech because I have nothing to say.

User avatar
Linuxmusician01
Established Member
Posts: 406
Joined: Mon Feb 23, 2015 2:38 pm
Location: Holland

Re: Stop Pulseaudio temporarily

Postby Linuxmusician01 » Sat Mar 02, 2019 12:34 pm

Thanks for the tip. Forgot about that. :)

martibs
Established Member
Posts: 17
Joined: Mon Oct 15, 2018 7:06 pm

Re: Stop Pulseaudio temporarily

Postby martibs » Fri Mar 08, 2019 11:13 am

For any Fedora users reading this: Pulseaudio is now (since F28, I believe) handled by systemd, and the autospawn parameter is not used.

User avatar
Linuxmusician01
Established Member
Posts: 406
Joined: Mon Feb 23, 2015 2:38 pm
Location: Holland

Re: Stop Pulseaudio temporarily

Postby Linuxmusician01 » Fri Mar 08, 2019 12:47 pm

martibs wrote:For any Fedora users reading this: Pulseaudio is now (since F28, I believe) handled by systemd, and the autospawn parameter is not used.

How do you stop PA from autospawning then?

User avatar
sysrqer
Established Member
Posts: 1748
Joined: Thu Nov 14, 2013 11:47 pm
Contact:

Re: Stop Pulseaudio temporarily

Postby sysrqer » Fri Mar 08, 2019 12:50 pm

Stop and disable the service?

martibs
Established Member
Posts: 17
Joined: Mon Oct 15, 2018 7:06 pm

Re: Stop Pulseaudio temporarily

Postby martibs » Fri Mar 08, 2019 1:04 pm

Linuxmusician01 wrote:How do you stop PA from autospawning then?

I guess you don't. If the process crashes, it autospawns. If you don't want it to run, you stop the service.

jonetsu
Established Member
Posts: 1324
Joined: Sat Jun 11, 2016 12:05 am

Re: Stop Pulseaudio temporarily

Postby jonetsu » Fri Mar 08, 2019 3:43 pm

Slight variation: you can create a client.conf file in ~/.config/pulse/ and write a single line in it (eg. no need to copy the client.conf file from /etc/) :

autospawn=no

Or even just do :

echo "autospawn=no" > ~/.config/pulse/client.conf
Last edited by jonetsu on Fri Mar 08, 2019 5:54 pm, edited 2 times in total.

User avatar
Linuxmusician01
Established Member
Posts: 406
Joined: Mon Feb 23, 2015 2:38 pm
Location: Holland

Re: Stop Pulseaudio temporarily

Postby Linuxmusician01 » Fri Mar 08, 2019 4:35 pm

martibs wrote:
Linuxmusician01 wrote:How do you stop PA from autospawning then?

I guess you don't. If the process crashes, it autospawns. If you don't want it to run, you stop the service.

Do you mean like?:

Code: Select all

sudo service pulseaudio stop

martibs
Established Member
Posts: 17
Joined: Mon Oct 15, 2018 7:06 pm

Re: Stop Pulseaudio temporarily

Postby martibs » Fri Mar 08, 2019 4:38 pm

Code: Select all

sudo systemctl stop pulseaudio

martibs
Established Member
Posts: 17
Joined: Mon Oct 15, 2018 7:06 pm

Re: Stop Pulseaudio temporarily

Postby martibs » Fri Mar 08, 2019 8:16 pm

Actually, scratch that: pulseaudio.service is run in the user context, so this is the correct way to stop it:

Code: Select all

$ systemctl --user stop pulseaudio

User avatar
nikgnomicradio
Established Member
Posts: 75
Joined: Wed Feb 07, 2018 9:31 pm
Contact:

Re: Stop Pulseaudio temporarily

Postby nikgnomicradio » Tue Mar 12, 2019 3:06 pm

why not just use:

Code: Select all

pacmd suspend true

that was enough to suspend Pulseaudio for starting JACK
used to be something i used in QjackCtl pre-start script,but do not need it now
D-Bus prevents any possible squabble between JACK and Pulseaudio


Return to “System Tuning and Configuration”

Who is online

Users browsing this forum: Bing [Bot], merlyn and 2 guests