Linux HOWTO: Pulseaudio & Jack server

Introduction

It seems to be a common gripe among linux renoisers that you can’t play any audio from other applications while renoise is running, because it reserves the soundcard completely for itself.
Fortunately there’s a simple workaround for this, using jack server, and running both renoise’s and rest of the system’s sounds via it.

This method uses jack server’s dbus interface introduced in jack2, and pulseaudio’s module-jackdbus-detect. When you start jackdbus, the module-jackdbus-detect detects it (surprise), and routes all pulseaudio audio to jack. Now you can use renoise with jack output, and any PA application should work simultaneously via jack. This also makes it easy to record audio to renoise from any application. All you have to do is connect ‘system’ output to renoise’s input in jack for example via qjackctl.

This is also possible using legacy jackd+pulseaudio, or jack+alsa. I can write instructions for those later, although last time I checked both methods have the drawback that jack server must be setup to run system wide all the time.

Okay, let’s do it

You need to have installed:
-jack2
-pulseaudio (and module-jackdbus-detect for it if not provided by pulseaudio package)

First, let’s make sure jackdbus module is enabled for pulseaudio:

$ grep jack /etc/pulse/default.pa   
.ifexists module-jackdbus-detect.so  
load-module module-jackdbus-detect channels=2  

if the command above doesn’t show anything about module-jackdbus-detect, You need to add this in ~/.config/pulse/default.pa (for your user only), or in /etc/pulse/default.pa (system wide):

### Automatically connect sink and source if JACK server is present  
load-module module-jackdbus-detect channels=2  
``` remember to restart pulseaudio after, if you edit either one of the files.  
  
And that would be it, except now the problem is renoise doesn't support the jackdbus interface, and starts the legacy jackd instead, which isn't recognized by pulseaudio's jackdbus-detect.  
Because of this, jackdbus must be started before launching renoise.  
  
That can be done from command line with jack_control script, which is unfortunately rather badly documented: run jack_control without arguments to get list of commands, or see the script example below.  
You can also use qjackctl for this if you enable d-bus interface in setup->misc, although I haven't tested this thoroughly.   
  
Or you can use script to start/configure jackdbus and start renoise.  
Here's and example. You will probably need to edit it for your needs, at least make sure the alsa device is correct.  

#!/bin/sh

jack_control start # start jackdbus

jack_control eps realtime true # enable realtime privilidges for it

jack_control ds alsa # select driver
jack_control dps device hw:0 # select alsa device

jack_control dps rate 48000 # set sample rate
jack_control dps nperiods 3 # set number of periods
jack_control dps period 512 # set period size

#/path/to/your/renoise/renoise $1 # start renoise
renoise $1 # you don’t need the path if renoise is installed system wide

jack_control exit # stop jackdbus after you exit renoise

killall jackd # in case renoise starts legacy jackd

  
This may seem complicated, but actually the jackdbus+pulseaudio combo should work out of the box when you install the necessary packages on most modern linux distributions, and it's only missing from renoise, which is why you need the script or to start jack manually.  
  
I hope this was helpful to someone. Let me know if you have any issues or comments, thanks ![:)](https://files.renoise.com/forum/emoticons/default/smile.gif)/>

i don’t need this but your help is welcome indeed newbie on linux can’t always know this thing’s,you rules!!

Hi pussi,

thanks a lot for your help! I wasn’t even aware that there is a jack2 server, I was just used to jack(1).
Can you tell me on which distro you are?

I tried your suggestions on Mint 16 (Petra) and it did not work. The jackdbus modules for pulseaudio are enabled, I configured ~/.config/pulse/default.pa, but the server still fails to start

$ pulseaudio --kill && jack_control start ~  
--- start  
DBus exception: org.jackaudio.Error.Generic: Failed to open server  
  

Looks like in ubuntu/mint/etc. you need to install pulseaudio-module-jack package, which includes the module-jackdbus-detect. Also you shouldn’t pulseaudio --kill before starting jack, as you want it running and routing audio to jack. Although the error you got probably isn’t related to either of those things, and the error messages outputted by jack_control aren’t the most informative.

Could you try the legacy jackd by running ‘jackd -dalsa’ (jackd is included in jackd2 package as well so no need to install anything), and see if there are any errors? It could be that there’s just some application reserving your sound card, or could be anything else really…

I’m using arch linux myself.

Hi, thanks for that HowTo!!! \o/

I still had some problems to get it to work here at first, because the other applications didn’t output to “PulseAudio JACK Sink” automagically.
I installed pavucontrol and followed the hints here:
https://wiki.archlinux.org/index.php/PulseAudio/Examples#PulseAudio_through_JACK

Just wanted to leave this here, if anyone else runs into that problem.

I did what user PUSSI said above and now I see and select JACK as audio choice without errors but:

  1. I still cant play other apps like youtube videos when Renoise is active. they wont play. as soon as I close Renoise they play.

  2. I cant seem to record with my Logitech 9000 camera microphone, into the waveform and create samples etc. I see something for FX but no audio dropdown thing in the recording dialog box.

So I cant seem to record.

With Jack selected under audio preference, for device in I can select 2 channels etc, but no device, and in ALSA

Im starting to regret purchasing Renoise for Linux.

@normanbird Do you have qjackctl installed? It is a frontend/GUI for JACK. Perhaps you just need to choose the correct microphone input , see my attachment ( underlined in red )

5817 Screenshot from 2015-07-30 03:16:10.png

Thnaks Mikobuntu, I do have it installed and played with settings and still no dice.

I saw some old forum references that said in 2010 Renoise did not work with Logitech 9000 USB microphones because it was mono etc. but Renoise later said back in 2010 that they fixed that with new updates, so I assume Renoise can handle mono input devices now. Can anyone verify this?

Either way im still unable to record, even thous the Jack audio selection is not throwing any errors. input is for 2 channels though.

Normanbird open a terminal and type in alsamixer and check that your mic input level is not set to zero

  1. I still cant play other apps like youtube videos when Renoise is active. they wont play. as soon as I close Renoise they play.

Some applications (like flash player plugin) use ALSA directly, and the ALSA output has to be routed to pulseaudio for this to work alongside pulseaudio and jack server.

Try if putting this in either your ~/.asoundrc or /etc/asound.conf helps:

# Use PulseAudio by default
pcm.!default {
  type pulse
  fallback "sysdefault"
  hint {
    show on
    description "Default ALSA Output (currently PulseAudio Sound Server)"
  }
}

ctl.!default {
  type pulse
  fallback "sysdefault"
}
  1. I cant seem to record with my Logitech 9000 camera microphone, into the waveform and create samples etc. I see something for FX but no audio dropdown thing in the recording dialog box.

You need to connect the jack server output ports for your microphone, to renoise’s jack input ports. You can do that in qjackctl’s “Connect” window.

PUSSI, that file does not exist in /etc/ and the other I assume is supposed to be in my home user directory…right? didnt see a .asoundrc file there either. Should I just create one in /etc/?

and I was able to plug this headphones I have with BOTH a 1/8th fir headphone and mic and that worked fine as soon as I plugged it in I was now able to record my voice! so yippie, Im satisfied as long as I have a working mic.

I did notice that the mic does have like a default …Hiss or white noise that is there even before talking. It of course also shows up on my recorded samples. Any idea whats the cause or how to remove. I have been playing with the EQ and filters on it but not really suitable. Renoise doesnt seem to have a noise reduction filter like Audacity of something. Let me know if I should place this noise removal in its own seperate question.

thanks

I did notice that the mic does have like a default …Hiss or white noise

I too have been chasing this unicorn for a long time, and tried most/all things to resolve it, but I believe this will be a problem unless you invest in a pro quality microphone.

invest in a pro quality microphone

Thanks mikobuntu.

I guess to have a good microphone one needs to have one of those fancy sound cards with 1/4 inch input jacks and all that stuff huh? I do have one of those in another older machine, maybe its time to slap Xubuntu on it and install Renoise on it and use that as my music production box. It has midi ports and stuff. :slight_smile: