Ubuntu – How to use JACK and Pulseaudio/ALSA at the same time on the same audio device

jackpulseaudio

Whenever I launch hydrogen it breaks my audio in all other applications which use Pulse, for example, I can no longer play videos in Chrome after having launched Hydrogen once, until I restart my PC or do sudo alsa force-reload. I have found people with similar issues, but no actual guide to fix this, often there are links to http://jackaudio.org/pulseaudio_and_jack (which has moved to http://jackaudio.org/faq/pulseaudio_and_jack.html )
I am using Ubuntu Studio 14.04 64bit.

ALTERNATIVELY if this is truly impossible to achieve, can someone tell me how to use Jack on one soundcard and Pulse on another? This way I could plug in a USB sound card only when I need JACK.

Please don't make me use windows.

Best Answer

As of 16.04, things become a lot simpler :)

Just install qjackctl and pulseaudio-module-jack module:

apt-get install qjackctl pulseaudio-module-jack

Then configure qjackctl to run the following command after startup. Copy it into "Setup..." > "Options" > "Execute script after Startup":

pacmd set-default-sink jack_out

And that's it. Pulseaudio will recognize (through D-Bus) that JACK started, and automatically will route audio to it. When JACK is stopped Pulseaudio will revert to normal routing and start sending audio directly to card again.

So (almost) by default Pulseaudio implements the setup detailed above by mmv-ru.