Configuring JACK and PulseAudio on Ubuntu 9.10
This guide should get you set up to route audio through JACK from PulseAudio on Ubuntu 9.10 (Karmic Koala) when you want without having to run JACK all the time.
Update: While this works it only works sometimes. I've found it to be incredibly unreliable and crash all the time.
Pre-Setup
A little bit of work is needed to get JACK working in Ubuntu. These commands were taken from here.
sudo addgroup <username> audio sudo su -c 'echo @audio - rtprio 99 >> /etc/security/limits.conf' sudo su -c 'echo @audio - nice -10 >> /etc/security/limits.conf' sudo su -c 'echo @audio - memlock unlimited >> /etc/security/limits.conf'
Downloads
First you're going to need to set up a custom apt repository that provides the pulseaudio JACK module. The launchpad page is here.
From your system menu navigate to the Software Sources tool (System -> Administration -> Software Sources) and switch to the "Other Software" tab. Click "Add" and enter "ppa:motin/until-jack-is-included-in-main". Close the window and you're done.
sudo apt-get install pulseaudio-module-jack qjackctl
PulseAudio Configuration
First, copy your systems default pulse config into your home directory.
cp /etc/pulse/default.pa ~/.pulse/pulsejack.pa
Now, in your favourite text editor, you want to make the following lines:
### Load audio drivers statically (it is probably better to not load ### these drivers manually, but instead use module-hal-detect -- ### see below -- for doing this automatically) #load-module module-alsa-sink #load-module module-alsa-source device=hw:1,0 #load-module module-oss device="/dev/dsp" sink_name=output source_name=input #load-module module-oss-mmap device="/dev/dsp" sink_name=output source_name=input #load-module module-null-sink #load-module module-pipe-sink ### Automatically load driver modules depending on the hardware available .ifexists module-hal-detect.so load-module module-hal-detect .else ### Alternatively use the static hardware detection module (for systems that ### lack HAL support) load-module module-detect .endif
Look like this:
### Load audio drivers statically (it is probably better to not load ### these drivers manually, but instead use module-hal-detect -- ### see below -- for doing this automatically) #load-module module-alsa-sink #load-module module-alsa-source device=hw:1,0 #load-module module-oss device="/dev/dsp" sink_name=output source_name=input #load-module module-oss-mmap device="/dev/dsp" sink_name=output source_name=input #load-module module-null-sink #load-module module-pipe-sink load-module module-jack-source load-module module-jack-sink ### Automatically load driver modules depending on the hardware available #.ifexists module-hal-detect.so #load-module module-hal-detect #.else ### Alternatively use the static hardware detection module (for systems that ### lack HAL support) #load-module module-detect #.endif
To stop PulseAudio from launching every time you try and kill it, you need to tell it to not autospawn.
echo "autospawn = no" > ~/.pulse/client.conf pkill pulseaudio
JACK Configuration
Configuring JACK is easy. Launch qjackctl and under 'Setup -> Options' make the four fields under 'scripting' it look like this:
Now, quit qjackctl and relaunch it. You should be able to see "PulseAudio JACK Sink" and "PulseAudio JACK Source" in qjackctl's Connect pane. Now all of your applications that use PulseAudio are being routed through JACK.

December 8th, 2009 - 20:30
Thanks a lot, I was struggling to get jack to work, this is great.
There is one little html hiccup: your “echo “autospawn = no” > ~/.pulse/client.conf” line came out as “echo “autospawn = no” > ~/.pulse/client.conf”.
December 8th, 2009 - 20:47
Ah ta. Fixed now.
December 13th, 2009 - 04:59
Many thanks, this information is not widely known.
What does the last script, pulse-session, do? I am making these settings on Fedora 12, and pulse-session does not seem to exist on Fedora.
December 13th, 2009 - 11:03
pulse-session seems to just re-launch pulse audio with the system defaults. Try replacing it with
January 9th, 2010 - 09:28
Thanks, this tipp helped me very much. Still having problem with assigning the port names (Using M-Audio M1010LT)
Warm Regards
Hans
February 28th, 2010 - 08:59
Thanks a lot for providing this information. Nevertheless I have encountered the following problem when trying to install the package pulseaudio-module-jack:
–
$ sudo apt-get install pulseaudio-module-jack
Reading package lists… Done
Building dependency tree
Reading state information… Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
pulseaudio-module-jack: Depends: libpulse0 (= 1:0.9.19-0ubuntu4+withjack0) but 1:0.9.19-0ubuntu4.1 is to be installed
Depends: pulseaudio (= 1:0.9.19-0ubuntu4+withjack0) but 1:0.9.19-0ubuntu4.1 is to be installed
E: Broken packages
–
Any help is very much appreciated.
March 7th, 2010 - 11:11
Same error message for me here.. please help
March 7th, 2010 - 11:13
Nothing I can do. Package maintainer has updated his build.
March 7th, 2010 - 12:35
maybe this will help
http://ubuntuforums.org/showthread.php?t=1306443&page=3