use JACK for audio playback

Archived topics about LMDE 1 and LMDE 2
Locked
Gottfried

use JACK for audio playback

Post by Gottfried »

This may be a very common question ; and I think the answer would be useful for anyone use a DAC in linux.

Q :
How do I run pulseaudio via JACK instead of whatever is running normally? My goal is to get a program in WINE to work without a buzz and I'm told that I need to run audio playback via JACK (http://jackaudio.org/) not ALSA. (I don't know what that means :( )

background

1)
I have a new DAC (digital to analog convertor) that works right out of the box in linux mint 17 64-bit, at once deteced and configured in MENU -> PREFERENCES -> SOUND when turned on. Playback via all linux native programs has no issues by default. But the existing playback programs lack features (like an equalizer, arbitrary encoding decoding for new lossless audio codecs like TTA or TAK or the very latest FLAC .exe)

2)
So, I've been using Foobar2000 and have it running in Wine; but I get a buzz in playback when music becomes complicated or loud, regardless of buffer.

3)
I was told to run pulseaudio through JACK instead of ALSA. Where can I set these options? If I set this, can I turn this off easily when needed (to get normal default playback in youtube etc?)
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
Flemur
Level 20
Level 20
Posts: 10096
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: use JACK for audio playback

Post by Flemur »

2) So, I've been using Foobar2000 and have it running in Wine; but I get a buzz in playback when music becomes complicated or loud, regardless of buffer.

I use foobar without problems. I suggest:
- $ winecfg -> check audio settings.
- Check digital output rates (44 v 48) in foobar and ALSA so you're not converting unnecessarily.
- Check volumes for clipping. (alsamixer, pavucontrol)
- Different version of wine (v1.4 seems to be the best in some ways).

3) I was told to run pulseaudio through JACK instead of ALSA.

I'm pretty sure both pulseaudio and JACK use ALSA, and JACK would replace pulse. You might try removing pulse and running with just ALSA - I've done it and the only thing you really miss is being able to play two audio streams at once (and "Record what you hear" - ?? don't recall for sure).

Where can I set these options? If I set this, can I turn this off easily when needed (to get normal default playback in youtube etc?)

It would consist of removing pulseaudio, installing JACK and then trying to run it, to which I say - good luck!
IOW, you can't easily switch back and forth.
But - if you manage to get JACK working then normal playback should still work.

Disclaimer: I was too dumb to get JACK to do anything.
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
1.618

Re: use JACK for audio playback

Post by 1.618 »

There is a package called pulseaudio-module-jack that will allow you to run pulse and jack together, if you have jackqtl installed you should be able to patchbay your source to jack to pulse. the jack sinks should show up in sound prefernces and if you install pavucontrol you can see them there as well

i had pulse apps running through jack into DAW on mint 16, i just haven't bothered setting 17 up yet but it should work
Gottfried

Re: use JACK for audio playback

Post by Gottfried »

I installed the jack pulseaudio module. thanks for the suggestion

What do you mean patchbay the source to jack btw? I'm not sure how to get this working.
1.618

Re: use JACK for audio playback

Post by 1.618 »

the package qjackctl is a gui for the jack server, once installed, open from a menu and start the jack server, if you click the 'connect' button a window will open showing all available sources and outputs, you then have to connect them as you would like, jack doesn't save the connections by default, the connections button will give you the active session, so open a patchbay, make your connections and save, then to restore the session use patchbay instead of 'connect'

this thread should help explain things a bit clearer and the pics should help

http://ubuntuforums.org/showthread.php?t=1545300
Gottfried

Re: use JACK for audio playback

Post by Gottfried »

Once I restarted the computer, I have no sound at all, although the DAC is detected in sound preferences as before.

I already installed jackctl but I have no idea how to use it. The connect seems to only want to do something to my midi ports on the DAC (its a studio DAC, so it has several intrument ports).

If I click start I get the error :

D-BUS: JACK server could not be started

Says it cannot find jackdbus

But I already have jackd package installed from the package manager and there is no jackdbus package listed

I do have dbus installed...

(BTW, suppose I want to use pulseaudio instead of jack for a time, since both are installed now via the pulseaudio-jack module, how do I switch?)

FULL ERROR LOG :

17:20:58.711 Patchbay deactivated.
17:20:58.719 Statistics reset.
17:20:58.889 ALSA connection change.
17:20:58.931 D-BUS: Service is available (org.jackaudio.service aka jackdbus).
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
17:20:58.944 ALSA connection graph change.
(qjackctl:3393): Gtk-CRITICAL **: IA__gtk_widget_get_direction: assertion 'GTK_IS_WIDGET (widget)' failed
(qjackctl:3393): Gtk-CRITICAL **: IA__gtk_widget_get_direction: assertion 'GTK_IS_WIDGET (widget)' failed
17:21:28.466 D-BUS: JACK server could not be started. Sorry
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
(qjackctl:3393): Gtk-CRITICAL **: IA__gtk_widget_get_direction: assertion 'GTK_IS_WIDGET (widget)' failed
(qjackctl:3393): Gtk-CRITICAL **: IA__gtk_widget_get_direction: assertion 'GTK_IS_WIDGET (widget)' failed
Sun Aug 31 17:21:28 2014: Starting jack server...
Sun Aug 31 17:21:28 2014: JACK server starting in realtime mode with priority 10
Sun Aug 31 17:21:28 2014: ERROR: Cannot lock down 82274202 byte memory area (Cannot allocate memory)
Sun Aug 31 17:21:28 2014: ERROR: control open "hw:0" (No such file or directory)
Sun Aug 31 17:21:28 2014: ERROR: control open "hw:0" (No such file or directory)
Sun Aug 31 17:21:28 2014: creating alsa driver ... hw:0|hw:0|1024|2|44100|0|0|nomon|swmeter|-|32bit
Sun Aug 31 17:21:28 2014: ERROR: control open "hw:0" (No such file or directory)
Sun Aug 31 17:21:28 2014: ERROR: ALSA: Cannot open PCM device alsa_pcm for playback. Falling back to capture-only mode
Sun Aug 31 17:21:28 2014: ERROR: Cannot initialize driver
Sun Aug 31 17:21:28 2014: ERROR: JackServer::Open failed with -1
Sun Aug 31 17:21:28 2014: ERROR: Failed to open server
Sun Aug 31 17:21:29 2014: Saving settings to "/home/admini/.config/jack/conf.xml" ...
17:21:32.956 Could not connect to JACK server as client. - Overall operation failed. - Unable to connect to server. Please check the messages window for more info.
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
Gottfried

Re: use JACK for audio playback

Post by Gottfried »

I also have no sound output at all now. I tried uninstalling jackd jackctl jack2 and pulseaudio-module-jack

To see if that reverses it. No...

But I the same configuration as before I installed jack plus accessories. So, for useful knowledge, any ideas how to reinstall the default mint sound setup (what exists in a fresh mint install) ?

Also, since I am probably going to have to reinstall pulseaudio (it's installed but not working now ... although its started upon startup as usual no error there) is there a way to install pulseaudio with its equalizer module? I know that the module is built in but deactived by default and to turn it on, pulseaudio must be reinstalled with its equalizer module active. All the guides for doing this seem outdated, so I want to be careful : what pulseaudio + equalizer install guide is known to work with latest ubuntu / mint ?
pdc_2
Level 10
Level 10
Posts: 3019
Joined: Mon May 11, 2009 1:21 am

Re: use JACK for audio playback

Post by pdc_2 »

I wonder if some of these wikis might contain valuable material for you

https://help.ubuntu.com/community/Ubunt ... reparation

https://help.ubuntu.com/community/Ubunt ... Intro/1204

http://trac.jackaudio.org/wiki/WalkThro ... ulseOnJack

http://docs.fedoraproject.org/en-US/Fed ... _JACK.html

___________________________________

there is an UbuntuStudio forum on the Ubuntu forums http://ubuntuforums.org/forumdisplay.php?f=335 which is linked from here https://help.ubuntu.com/community/UbuntuStudio

and the UbuntuStudio link has this good coverage of sound: https://help.ubuntu.com/community/Ubunt ... AudioIntro

let us know how you have resolved it
1.618

Re: use JACK for audio playback

Post by 1.618 »

there's a forum for linux audio users, it might be worth starting a thread there as well, quite a few knowledgeable peeps over there

http://www.linuxmusicians.com/

are you sure jack is shutting down properly, check system monitor and make sure it's closing down

try the command killall jackd

you could try reloading the pulseaudio module, type 'pulseaudio' into terminal
1.618

Re: use JACK for audio playback

Post by 1.618 »

The pulseaduio equaliser requires additional ppas but should work in ubuntu 14:04, which mint is currrently based upon

http://www.webupd8.org/2013/03/install- ... ystem.html
User avatar
Flemur
Level 20
Level 20
Posts: 10096
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: use JACK for audio playback

Post by Flemur »

So, for useful knowledge, any ideas how to reinstall the default mint sound setup (what exists in a fresh mint install) ?

I almost hate to say it, but I was waiting for that.
Linux audio software is pretty bad and the documentation is even worse, so don't feel too bad...

In synaptic ($ sudo synaptic), purge/"completely remove" all ALSA and all pulse components ('pulse' in the quicksearch will help get it all since there's no consistent naming convention).

Remove all *pulse* directories under you /home/username, especially ~/.pulse, if present (the other is ~/.config/pulse).
Doing the same for alsa probably won't hurt (e.g. ~/.gconf/apps/gnome-alsamixer)

In synaptic, reinstall ALSA and all the pulse stuff, then reboot (with fingers crossed and jaw in proper position).

PS: did you try any of my suggestions regarding the poor sound in wine/foobar? (which I gather was the original reason for installing JACK)
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
bitsgalore

Re: use JACK for audio playback

Post by bitsgalore »

Don't know if this helps, but I had major difficulties in setting up JACK myself, encountering similar error messages as those reported here. Just as I was about to give up I came across this:

http://lkubuntu.wordpress.com/2013/08/0 ... g-up-jack/

Using the info in that blog post, I managed to make playback work by trying out the different device settings. You can either do this using the command line method that is explained in the post above, or in QjackCtl.

In my case I kept on getting this message (which may or may not turn out to be a problem):

Code: Select all

ALSA: Cannot open PCM device alsa_pcm for capture. Falling back to playback-only mode
However, playback now works. Must say I'm a bit puzzled why the default points to a device that doesn't work (and there's zero hints at this in the official docs); this seems to be a pretty common problem ...
Locked

Return to “LMDE Archive”