You are here: Home Linux Pulseaudio and Jackd

Pulseaudio and Jackd

by Harald Hoyer last modified Feb 23, 2011 09:21 AM
Howto configure Fedora 9 to run pulseaudio and jackd at the same time.

How to setup Fedora 9 to run the Jack Daemon and Pulseaudio

As root

Install the required packages:

# yum install pulseaudio-module-jack alsa-plugins-jack jack-audio-connection-kit 

Add yourself to the pulse-rt and jackuser  group.

# usermod -a -G pulse-rt,jackuser "<your username>"

Edit /etc/security/limits.conf:

@jackuser - rtprio 20
@jackuser - memlock 4194304
@pulse-rt - rtprio 20
@pulse-rt - nice -20

As your normal user

Create the pulseaudio start file ~/jack.pa:

#!/usr/bin/pulseaudio -nF
#
load-module module-jack-sink
load-module module-jack-source

load-module module-native-protocol-unix
load-module module-volume-restore
load-module module-default-device-restore
load-module module-rescue-streams
load-module module-suspend-on-idle
.ifexists module-gconf.so
.nofail
load-module module-gconf
.fail
.endif
.ifexists module-x11-publish.so
.nofail
load-module module-x11-publish
.fail
.endif

Relog to get the new group permissions and limits.

To keep pulse from bouncing back every time you try to kill it, you have to edit the file /etc/pulse/client.conf and change "autospawn = yes" to "autospawn = no"

Kill the current pulseaudio daemon:

$ killall pulseaudio

Start the jack daemon (your parameters may be different):

$ jackd -R -P4 -dalsa -r44100 -p512 -n4 -D -Chw:0 -Phw:0

Start the pulseaudio daemon:

$ pulseaudio -nF ~/jack.pa

Now everything should work :) At least for me it does.

What next? See Professional audio with Fedora and join the Fedora AudioCreation SIG.

Filed under: , , , , ,

Correction and hint

Avatar Posted by Mads Kiilerich at Jul 19, 2008 11:23 AM
Thanks.

[root@localhost ~]# usermod -a -G pulse-rt,jackaudio mk
usermod: unknown group jackaudio

Using jackuser as mentioned in the text works.

"Relog" seems to be short for "log out and log in again" (in order to let pam_limits read the new settings). Else you will get "cannot use real-time scheduling". But you can also just make a su to your self.

- and then rakarrack can be started ... ;-)

Re: Correction

Avatar Posted by Harald Hoyer at Jul 19, 2008 11:24 AM
Thanks for the "jackuser" group correction.

some extras

Avatar Posted by pyrael at Jan 21, 2009 10:20 AM
First off, thanks a million for this info!!

What I found in my search for a way to have jackd, qjackctrl and pulse "playing nicely together" on login for FC9 running Gnome:

in your home directory:
$ vi .pulsekill

#!/bin/bash
killall pulseaudio
jackd -R -dalsa -r96000 -p256 -n2 -D -Chw:0 -Phw:0 -s -i2 -o2 & ##
pulseaudio -nF ~/jack.pa

save it (<esc> :wq)

**NOTE: your jackd settings may be different, I use 96k most often and seems ok for pulse just make sure the & is left in in order for the last line to execute

$ chmod +x .pulsekill

then open qjackctrl
click setup and in the options tab uncheck the scripting boxes (we won't need them)
in the Misc tab, uncheck "Start Jack on application startup" and check the "enable system tray icon" or Start minimized if using v3.2

Save the setup and exit

in:
system>Preferences>personal>sessions:
Add a new task:
name it pulsekill and point it at ~/.pulsekill and save it
Add another new task:
Name it qjackctl and put qjackctl in the command textbox

log out and back in, and pulse should be killed, jackd started, jack.pa started, and qjackctl started (minimized if you have the option)

Again, thanks for the help and I hope this little extra info helps someone else ;)
this might work for other distros (I wouldn't know) post back if you try it!!

Pyrael

module-stream-restore

Avatar Posted by synapse at Aug 31, 2009 09:33 AM
On fedora 11, use
'load-module module-stream-restore'
instead of
'load-module module-volume-restore'
in the given example.

Pulseaudio & Jack

Avatar Posted by Darkman at Nov 08, 2009 10:57 AM
Hello,

first, I would like to say my comments on this topic. I am running 32 bit Fedora 11.
I did it following the procedure by Harald until the step of killing pulseaudio and
then I followed the procedure by Pyrael.
 
/etc/security/limits.conf was already set up as described, so I didn't have to do
nothing there
I made the file pulsekill as a normal file, not hidden (without the . in front).
Otherwise it wasn't possible to select it in the startup sessions configuration and
even writing the file name, it didn't seem to start.
And one question to Pyrael. In the file pulsekill:
jackd -R -dalsa -r96000 -p256 -n2 -D -Chw:0 -Phw:0 -s -i2 -o2 & ##
what is the purpose of the ## at the end of this line?
Also I had to add the following line to /etc/rc.local:
/sbin/modprobe snd-seq-oss
Otherwise, qjackctl complains on startup that it can't access ALSA MIDI or
something similar, but now it is okAy.

So, I did it, as described above. Well, it is a big step forward, but it still doesn't
work completely for me. When I boot up, jack is not started. If I start it hitting the
button in qjackctl, then I am starting Skype and it doesn't have sound.
Then I have to stop jack, restart skype and audio works again. The same is in Firefox.
On the other hand, when I have no other applications running, I can start jack and FOR
THE FIRST TIME I am able to hear sound from the till now so quiet application named
Rezound!! And Rosegarden also seems to work. It still didn't sound, but I don't know
how to make it do so :-) At least it starts without any errors.
So, why the hell everything can't work together, as it is doing in other OS?? Can you
PLEASE help me to make it work, if it is possible at all??

THANKS a lot!! This website is the only place, which provided some help!

Running jackd with pulseaudio

Avatar Posted by jd1008 at Feb 18, 2011 11:00 AM
So far, I have not been able to prevent
pulseaudio from restarting automatically after killing it, much less forcing
it to start manually via the script you
provide:

pulseaudio -nF ~/jack.pa

jd1008@gmail.com

Killing Pulse For Good

Avatar Posted by Steve at Feb 23, 2011 08:31 AM
To keep pulse from restarting forever, you have to edit the file /etc/pulse/client.conf and change "autospawn = yes" to "autospawn = no"

pulse audio autospawn

Avatar Posted by steve at Feb 23, 2011 09:15 AM
To keep pulse from bouncing back every time you try to kill it, you have to edit the file /etc/pulse/client.conf and change "autospawn = yes" to "autospawn = no"

Thanks

Avatar Posted by Frode Haugsgjerd at Mar 11, 2012 12:27 PM
That last comment from steve was really usefull ("autospawn = no") The unkillable pulse deamon was really irritating. But probably useful on a normal desktop.

Thanks, Very Useful

Avatar Posted by Brian at Mar 08, 2013 08:16 AM
I'm using Fedora 17 and this information is still quite relevant and useful. One tip, lines in beginning with ";" in /etc/pulse/client.conf are comments, you have to remove the ";". I was initially fooled by syntax coloring.

Add comment

You can add a comment by filling out the form below. Plain text formatting.

(Required)
Please enter your name.
(Required)
(Required)
(Required)
Enter the word