sync-signal.com audio, video, electronics and code

6Dec/099

Configuring JACK and PulseAudio on Ubuntu 9.10

PulseJackThis 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:

JACK Settings

JACK Settings

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.

Comments (9) Trackbacks (0)
  1. 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”.

  2. Ah ta. Fixed now.

  3. 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.

  4. pulse-session seems to just re-launch pulse audio with the system defaults. Try replacing it with

    pulseaudio --start

  5. Thanks, this tipp helped me very much. Still having problem with assigning the port names (Using M-Audio M1010LT)

    Warm Regards
    Hans

  6. 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.

  7. Same error message for me here.. please help

  8. Nothing I can do. Package maintainer has updated his build.


Leave a comment


No trackbacks yet.

Recent Posts

Tags

Electronics Equaliser Fluxus Guide JACK Karmic Live Coding lucid PIC PICkit2 Project Projects Pulseaudio Python StagFS TVRage TVSlurp Ubuntu Undrawing Usenet Video

Archives

Blogroll