Jack setup issueswith some software

Optimize your system for ultimate performance.

Moderators: khz, MattKingUSA

gunga
Established Member
Posts: 7
Joined: Tue Feb 14, 2017 10:57 pm

Jack setup issueswith some software

Postby gunga » Mon Dec 17, 2018 8:56 am

I setup jack with QjackCTL, this works fine with Bitwig but I have to turn off Jack for any other audio (spotify, browser) to play. I'm not sure if this is a routing problem or something else.

Any help would be appreciated.

cheers

tavasti
Established Member
Posts: 856
Joined: Tue Feb 16, 2016 6:56 am
Location: Kangasala, Finland
Contact:

Re: Jack setup issueswith some software

Postby tavasti » Mon Dec 17, 2018 9:36 am

Those other softwares use pulseaudio. See http://jackaudio.org/faq/pulseaudio_and_jack.html
Linux veteran & Novice musician

Hear my music at https://audiu.net/users/tawaste

User avatar
sysrqer
Established Member
Posts: 1832
Joined: Thu Nov 14, 2013 11:47 pm
Contact:

Re: Jack setup issueswith some software

Postby sysrqer » Mon Dec 17, 2018 10:11 am

I use this script viewtopic.php?f=19&t=13234

User avatar
Linuxmusician01
Established Member
Posts: 674
Joined: Mon Feb 23, 2015 2:38 pm
Location: Holland

Re: Jack setup issueswith some software

Postby Linuxmusician01 » Mon Dec 17, 2018 12:22 pm

Kill Jack with:

Code: Select all

pkill -9 jackdbus
killall jackd


Start Pulseaudio with:

Code: Select all

pulseaudio --start -v

Luc
Established Member
Posts: 741
Joined: Fri Mar 27, 2015 1:04 pm

Re: Jack setup issueswith some software

Postby Luc » Mon Dec 17, 2018 3:01 pm

gunga wrote:I setup jack with QjackCTL, this works fine with Bitwig but I have to turn off Jack for any other audio (spotify, browser) to play. I'm not sure if this is a routing problem or something else.

Why does anyone still use QjackCTL? Cadence is so much better. Just make sure you have the ALSA bridge running.

Pulseaudio has been banned from my computers for years and sound works fine for me on every situation. Before JACK, I just used plain ALSA and everything worked.

User avatar
sysrqer
Established Member
Posts: 1832
Joined: Thu Nov 14, 2013 11:47 pm
Contact:

Re: Jack setup issueswith some software

Postby sysrqer » Mon Dec 17, 2018 3:05 pm

Luc wrote:
gunga wrote:I setup jack with QjackCTL, this works fine with Bitwig but I have to turn off Jack for any other audio (spotify, browser) to play. I'm not sure if this is a routing problem or something else.

Why does anyone still use QjackCTL? Cadence is so much better. Just make sure you have the ALSA bridge running.

Pulseaudio has been banned from my computers for years and sound works fine for me on every situation. Before JACK, I just used plain ALSA and everything worked.

People have different needs. Pulseaudio is valuable for many people, including me (let me know how you can switch a stream of audio from my speakers to my HDMI output easily with alsa). Cadence has some issues working with pulseaudio and it's not possible for it to execute scripts. I agree that it is a fantastic piece of software and I generally prefer it but it doesn't suit all use cases.

User avatar
Linuxmusician01
Established Member
Posts: 674
Joined: Mon Feb 23, 2015 2:38 pm
Location: Holland

Re: Jack setup issueswith some software

Postby Linuxmusician01 » Mon Dec 17, 2018 3:21 pm

Luc wrote:
gunga wrote:I setup jack with QjackCTL, this works fine with Bitwig but I have to turn off Jack for any other audio (spotify, browser) to play. I'm not sure if this is a routing problem or something else.

Why does anyone still use QjackCTL? Cadence is so much better. Just make sure you have the ALSA bridge running.

Pulseaudio has been banned from my computers for years and sound works fine for me on every situation. Before JACK, I just used plain ALSA and everything worked.

QJackCtl was not the problem if I'm not mistaken (Jack was). And Firefox won't output sound without Pulseaudio. And reading @Sysrqer's reply above, I have to admit: it's all a mess. I use a shell script to swiftly switch back and forth between Jack and PA. Dunno why I should use QJackctl (I use Qtractor which has a window w/ the most useful QJackCtl parts). So it doesn't have to be complicated, it's all just difficult to grasp.

Luc
Established Member
Posts: 741
Joined: Fri Mar 27, 2015 1:04 pm

Re: Jack setup issueswith some software

Postby Luc » Mon Dec 17, 2018 3:51 pm

Sound in Firefox without Pulseaudio has always worked for me. Still does.
I don't want to be stubborn or pick up any fights over this. I'm just saying. FWIW.
AFAIK, Bluetooth doesn't work without Pulseaudio.

User avatar
khz
Established Member
Posts: 1197
Joined: Thu Apr 17, 2008 6:29 am
Location: German

Re: Jack setup issueswith some software

Postby khz » Mon Dec 17, 2018 4:12 pm

With Debian Firefox Audio only works with pulseaudio.
On Gentoo I can set the jack use flag for Firefox, so build it with jack support.
It depends on the distribution how they built the packages.
FZ - Does humor belongs in Music?
GNU/LINUX@AUDIO ~ /Wiki $ Howto.Info && GNU/Linux Debian installing >> Linux Audio Workstation LAW
    I don't care about the freedom of speech because I have nothing to say.

gunga
Established Member
Posts: 7
Joined: Tue Feb 14, 2017 10:57 pm

Re: Jack setup issueswith some software

Postby gunga » Wed Dec 19, 2018 2:43 pm

OK great, I tried the code to kill pulse automatically, it doesn't seem to work.

I'll try cadence and see if that works better.

I'm having another separate issue now though, after trying to install airwave for VSTs Ubuntu doens't register and soundcard although if I use Jack and Bitwig, my USB focusrite works fine.

I'm going to try update, WINE and Airwave and see if that helps. It's odd though as it worked fine yesterday but overnight after restarting the computer audio doesn't exist.

User avatar
Linuxmusician01
Established Member
Posts: 674
Joined: Mon Feb 23, 2015 2:38 pm
Location: Holland

Re: Jack setup issueswith some software

Postby Linuxmusician01 » Wed Dec 19, 2018 3:25 pm

gunga wrote:OK great, I tried the code to kill pulse automatically, it doesn't seem to work.

Do you mean the command that I posted? This command?:

Code: Select all

pkill -9 jackdbus
killall jackd

That command kills Jackaudio. To kill Pulseaudio I use:

Code: Select all

 pulseaudio --kill

Wanna start Pulseaudio? Use:

Code: Select all

pulseaudio --start

Starting Jackaudio can differ for each computer setup. If you have one soundcard then its device number is 0. You can start Jack this way (that's how I do it):

Code: Select all

jackd -d alsa --device hw:0

The text "- d alsa" means that the driver is ALSA.


gunga wrote:[...] Ubuntu doens't register and soundcard [...]

Dunno what exactly you mean by "register".

gunga wrote:[...] my USB focusrite works fine.

[...] It's odd though as it worked fine yesterday but overnight after restarting the computer audio doesn't exist.

You might have more than one audio card (or: audio device, or: audio interface) on your computer. Probably a sound card in your computer and the external USB Focusrite audio interface. Am I right? I think that you are doing the following: you start your PC (audio device number 0 then is your on-board audio card); you connect the Focusrite (now audio device 1 is the Focusrite). Then you start Jackaudio. However, you started Jack for audio device number 0. This is not the audio device you want.

However, if you've connected the Focusrite before starting your PC then it might very well be audio device number 0! And the command to start Jack doesn't work again. So try to check which number your preferred audio device has. Do this w/ the following command:

Code: Select all

cat /proc/asound/cards

On my computer this outputs:

Code: Select all

 0 [CMI8738        ]: CMI8738-MC6 - C-Media CMI8738
                      C-Media CMI8738 (model 55) at 0xd000, irq 20
 1 [PCH            ]: HDA-Intel - HDA Intel PCH
                      HDA Intel PCH at 0xf7c10000 irq 45

That means that the sound card in my PC with the CMI8738 chip is card number 0. I also have an on board sound card soldered on the motherboard. That's sound card 1 (i.e. the Intel one). You probably have to start Jack for your second audio device (i.e. number 1, not number 0):

Code: Select all

jackd -d alsa --device hw:1

Notice the "hw:1" instead of "hw:0"!

Good luck w/ puzzling w/ Linux. :)


[edit 19-12-2018, 17:01] Edited to remove many typo's
Last edited by Linuxmusician01 on Wed Dec 19, 2018 4:01 pm, edited 5 times in total.

User avatar
sysrqer
Established Member
Posts: 1832
Joined: Thu Nov 14, 2013 11:47 pm
Contact:

Re: Jack setup issueswith some software

Postby sysrqer » Wed Dec 19, 2018 3:31 pm

gunga wrote:OK great, I tried the code to kill pulse automatically, it doesn't seem to work.

I'll try cadence and see if that works better.

I'm having another separate issue now though, after trying to install airwave for VSTs Ubuntu doens't register and soundcard although if I use Jack and Bitwig, my USB focusrite works fine.

I'm going to try update, WINE and Airwave and see if that helps. It's odd though as it worked fine yesterday but overnight after restarting the computer audio doesn't exist.


I don't understand what you are trying to do here, can you explain in more detail?

User avatar
nikgnomicradio
Established Member
Posts: 86
Joined: Wed Feb 07, 2018 9:31 pm
Contact:

Re: Jack setup issueswith some software

Postby nikgnomicradio » Thu Dec 20, 2018 8:27 am

Killing Pulseaudio would make it impossible to listen to Audio streams in Pulseaudio

To hear Pulseaudio playback whilst JACK is running use these commands:

Code: Select all

pactl load-module module-jack-sink channels=2 connect=0
pactl set-default-sink jack_out

(omit 'connect = 0' from first command if you want audio to connect to JACK 'system' output automatically)

If you also need connection for audio from jack to Pulseaudio (eg connecting a mic for a VOiP application):

Code: Select all

pactl load-module module-jack-source channels=2 connect=0
pactl set-default-sink jack_out


This is one simple way to get the connections needed, there are many alternative ways to do this:
QjackCtl has option to run a bash script after JACK for a sequence of commands to run automatically
Cadence has it's own tool that will create both connections
Latest version of Ubuntu Studio 18.10 has it's own built-in Ubuntu Studio Controls,
looks like a good alternative option to QjackCtl or Cadence but I am still testing it for reliability

gunga
Established Member
Posts: 7
Joined: Tue Feb 14, 2017 10:57 pm

Re: Jack setup issueswith some software

Postby gunga » Thu Dec 20, 2018 8:41 am

Thanks for the replies, I had already done a bit of digging to find an answer and have found a way to make it work. For now.

I had to do the following:

I removed WINE as it was one of the last things installed - still no fix
I installed cadence and set it up for the Focusrite - This worked with Bitwig and Reaper but not with pulse audio ie (spotify or browser)

After reading a quora thread i tried this and it worked, i.e the internal soundcard appeared in the list of audio output devices and have this running spotify and the browser.

Code: Select all

rm -R ~/.config/pulse
sudo systemctl reboot
pulseaudio --kill
pulseaudio --start


This morning i had to use pulseaudio --start for the internal soundcard to work again.

Ideally I want the USB focusrite to be my main soundcard. I'll reread your post when I get a chance and see if I can fix this permanently.

Cheers

User avatar
Linuxmusician01
Established Member
Posts: 674
Joined: Mon Feb 23, 2015 2:38 pm
Location: Holland

Re: Jack setup issueswith some software

Postby Linuxmusician01 » Thu Dec 20, 2018 3:08 pm

gunga wrote:I installed cadence and set it up for the Focusrite - This worked with Bitwig and Reaper but not with pulse audio ie (spotify or browser)

Cadence works with Jack. Pulseaudio is an "alternative" or "concurrent" for Jack. So it's no surprise that Pulse won't work w/ Jack. Because you have to choose between Jack or Pulse. DAW's usually work better w/ Jack so that's why Reaper and Bitwig work with them. Pulse in not necessarily needed but if you want to listen to two sound sources at the same time (like Youtube as well as MP3 music) you'll need Pulse.

And both rely on ALSA which is the actual sounddriver for Linux. Confusing isn't it? :wink:


[edit, 20-12-'18, 16:40] By the way, for years I've purged Pulse from my system so that I only had to worry 'bout ALSA. Every application that produces sound works perfectly well w/ ALSA. However, in Linux you have to tell every single friggin' application to use Pulse, Jack or just Alsa. Yep: that's pretty complicated.
Last edited by Linuxmusician01 on Fri Dec 21, 2018 12:37 pm, edited 3 times in total.


Return to “System Tuning and Configuration”

Who is online

Users browsing this forum: No registered users and 1 guest