Stop Pulseaudio/Pipewire temporarily

Optimize your system for ultimate performance.

Moderators: MattKingUSA, khz

Post Reply
User avatar
khz
Established Member
Posts: 1648
Joined: Thu Apr 17, 2008 6:29 am
Location: German
Has thanked: 42 times
Been thanked: 92 times

Stop Pulseaudio/Pipewire temporarily

Post by khz »

& Disabling PulseAudio and Pipewire in Debian Bullseye: viewtopic.php?p=132663#p132663


Systemd - As a user
Stop:

Code: Select all

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

Code: Select all

systemctl stop --user pulseaudio && systemctl disable --user pulseaudio
Start:

Code: Select all

systemctl --user start pulseaudio.socket && systemctl --user start pulseaudio.service

Code: Select all

systemctl start --user pulseaudio && systemctl enable --user pulseaudio
or
  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!

    ==>
    • Code: Select all

      echo "autospawn = no" >> ~/.config/pulse/client.conf
    (You don't need the entry "pulseaudio -k" in the "~/.bashrc".)
or

pacmd - Reconfigure a PulseAudio sound server during runtime https://linux.die.net/man/1/pacmd

Code: Select all

apt-get install pulseaudio-utils

Code: Select all

pacmd suspend true

==> Route Pulseaudio to jack <==

https://github.com/brummer10/pajackconnect
qjackctl
Setup >> Options > [X] Run script after startup:

Code: Select all

/usr/bin/pajackconnect start 
Setup >> Options > [X] Execute script on Shutdown:

Code: Select all

/usr/bin/pajackconnect stop &
Setup >> Options > [X] Execute script after Shutdown:

Code: Select all

/usr/bin/pajackconnect reset &
http://bandshed.net/pdf/AVL2019UserManual.pdf :: JACK's L'il - Helpers: pajackconnect and a2jmidid

or
  • there are several possibilities:
- Install "pulseaudio-module-jack"
- PulseAudio through JACK https://wiki.archlinux.org/index.php/Pu ... rough_JACK
- How use PulseAudio and JACK? >> http://jackaudio.org/faq/pulseaudio_and_jack.html
- WalkThrough_User_PulseOnJack >> https://github.com/jackaudio/jackaudio. ... ulseOnJack
- Using Qjackctl with jackd and pulseaudio >> viewtopic.php?p=58043#p58043
- pulseaudio_and_jack >> http://marzen.de/Holger/pulseaudio_and_jack/
- KXStudio : Applications : Cadence >> https://kx.studio/Applications:Cadence
- ... <== #)


####

(Then:

# (https://linuxaudio.github.io/libremusic ... -jack.html; https://web.archive.org/web/20200811001 ... -jack.html;
https://github.com/jackaudio/jackaudio. ... -and-jack2, https://github.com/jackaudio/jackaudio.github.com/wiki
# http://bandshed.net/pdf/ AVL2018UserManual.pdf >> AUDIO & MIDI IN AV LINUX)

(https://linux.die.net/man/1/jackd, https://manpages.debian.org/buster/jackd2/, https://man.archlinux.org/man/a2jmidid.1.en, https://www.freedesktop.org/wiki/Softwa ... itymodules, #https://wiki.debian.org/PipeWire#For_JACK
==> Install "a2jmidid" https://github.com/jackaudio/a2jmidid and "pulseaudio-module-jack" https://www.freedesktop.org/wiki/Softwa ... itymodules.
In qjackctl Setup:
Jack with a2jmidid and pulseaudio:
  • Setup >> Settings > Parameters > MIDI Drivers "seq" or "none"
  • Setup >> Settings > Advanced > "Server Prefix" select "jackd" https://github.com/jackaudio/jack2/blob/master/README)
  • Setup >> Settings > Advanced > [X] Soft Mode
  • Setup >> Settings > Advanced > (RT) Priority (0 - 98)
  • Setup >> Options > [X] Run script after startup: "pacmd load-module module-jack-source channels=2 && pacmd load-module module-jack-sink channels=2 && sleep 5 && a2j -e -u &" (a2j enables dbus) or "sleep 5 && a2jmidid -e -u &" (without dbus)
  • Setup >> Options > [X] Execute script on Shutdown: "pulseaudio --kill"
  • Setup >> Options > [X] Execute script after Shutdown: "killall jackd"
  • Setup >> Misc > [X] Provide support for ALSA sequencer

Optional:
  • Setup >> Settings > Advanced > [X] H/W Monitor
  • Setup >> Settings > Advanced > [X] H/W Meter

Jack without pulseaudio:
  • Setup >> Options > [X] Execute script at startup: "systemctl --user stop pulseaudio.socket && systemctl --user stop pulseaudio.service"
  • Setup >> Options > [X] Run script after shutdown: "killall -9 jackd && systemctl --user start pulseaudio.socket && systemctl --user start pulseaudio.service")
=> In System sounds select the "pulseaudio-module-jack". https://www.freedesktop.org/wiki/Software/PulseAudio/
. . . 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: 1524
Joined: Mon Feb 23, 2015 2:38 pm
Location: Holland
Has thanked: 756 times
Been thanked: 137 times

Re: Stop Pulseaudio temporarily

Post by Linuxmusician01 »

Thanks for the tip. Forgot about that. :)
martibs
Established Member
Posts: 123
Joined: Mon Oct 15, 2018 7:06 pm
Location: Oslo, Norway
Has thanked: 34 times
Been thanked: 15 times

Re: Stop Pulseaudio temporarily

Post by martibs »

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: 1524
Joined: Mon Feb 23, 2015 2:38 pm
Location: Holland
Has thanked: 756 times
Been thanked: 137 times

Re: Stop Pulseaudio temporarily

Post by Linuxmusician01 »

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: 2520
Joined: Thu Nov 14, 2013 11:47 pm
Has thanked: 319 times
Been thanked: 148 times
Contact:

Re: Stop Pulseaudio temporarily

Post by sysrqer »

Stop and disable the service?
martibs
Established Member
Posts: 123
Joined: Mon Oct 15, 2018 7:06 pm
Location: Oslo, Norway
Has thanked: 34 times
Been thanked: 15 times

Re: Stop Pulseaudio temporarily

Post by martibs »

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: 2036
Joined: Sat Jun 11, 2016 12:05 am
Has thanked: 10 times
Been thanked: 22 times

Re: Stop Pulseaudio temporarily

Post by jonetsu »

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: 1524
Joined: Mon Feb 23, 2015 2:38 pm
Location: Holland
Has thanked: 756 times
Been thanked: 137 times

Re: Stop Pulseaudio temporarily

Post by Linuxmusician01 »

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: 123
Joined: Mon Oct 15, 2018 7:06 pm
Location: Oslo, Norway
Has thanked: 34 times
Been thanked: 15 times

Re: Stop Pulseaudio temporarily

Post by martibs »

Code: Select all

sudo systemctl stop pulseaudio
martibs
Established Member
Posts: 123
Joined: Mon Oct 15, 2018 7:06 pm
Location: Oslo, Norway
Has thanked: 34 times
Been thanked: 15 times

Re: Stop Pulseaudio temporarily

Post by martibs »

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: 109
Joined: Wed Feb 07, 2018 9:31 pm
Has thanked: 1 time
Been thanked: 7 times
Contact:

Re: Stop Pulseaudio temporarily

Post by nikgnomicradio »

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
Post Reply