You are not logged in.

#1 2015-06-18 17:54:33

Ploppz
Member
Registered: 2013-09-14
Posts: 291

Jack: How to run alongside Pulsaudio?

I'm trying to follow this simple step (for Jack 2): https://github.com/jackaudio/jackaudio. … ulseOnJack

My problem was (and is) that no other audio sources (mpd, firefox..) would play sound if I Jack was running.

In Cadence, under "Jack Bridges", under "Alsa Audio", I put the birdge type "ALSA -> PulseAudio -> JACK (Plugin)" and started jack but it still doesn't work.

What more do I need to do? Do I have to do anything on the PulseAudio side for example?

Offline

#2 2015-06-18 18:26:50

ooo
Member
Registered: 2013-04-10
Posts: 1,627

Re: Jack: How to run alongside Pulsaudio?

I haven't used cadence ever, so I can't directly help, but did you try:
https://wiki.archlinux.org/index.php/Pu … rough_JACK

"The new new way" should work with with jack2. Basically it routes pulseaudio to jack automatically when jack is started with the dbus interface. ALSA applications should get routed to pulseaudio as long as you have pulseaudio-alsa installed and haven't changed the default pcm in your ~/.asoundrc

Offline

#3 2015-06-19 20:08:48

Ploppz
Member
Registered: 2013-09-14
Posts: 291

Re: Jack: How to run alongside Pulsaudio?

Thanks for the reply. I just did what that guide told me. However, I can't start Jack (using qjackctl here):

22:07:42.304 ALSA connection change.
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
22:07:42.320 ALSA connection graph change.
22:07:43.673 JACK is starting...
22:07:43.674 jackd -dalsa -dhw:SB,0 -r48000 -p1024 -n2 -Xseq
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
22:07:43.682 Could not start JACK. Sorry.
22:07:47.111 JACK was stopped

I did this after rebooting.

Edit: In other news, I can't start neither alsamixer nor pavucontrol now. Can't change i.e. volume using amixer either. (I could before, using pulseaudio-alsa.)
Pavucontrol: "Fatal Error: Unable to connect to PulseAudio: OK"
Alsamixer: "ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused"

Last edited by Ploppz (2015-06-19 20:12:43)

Offline

#4 2015-06-20 08:10:53

MSC
Member
Registered: 2014-07-13
Posts: 33

Re: Jack: How to run alongside Pulsaudio?

Is dbus installed and running? What are your qjackctl settings?

"Unable to connect to PulseAudio: OK" means that PulseAudio is not running (very helpful error, I know... roll ) Start it with "pulseaudio -D". I find it useful to put this command in qjackctl, in the "Execute script after startup" field.

Offline

#5 2015-06-20 08:39:03

ooo
Member
Registered: 2013-04-10
Posts: 1,627

Re: Jack: How to run alongside Pulsaudio?

qjackctl does not use jackdbus by default. You can see in the log you posted, that it's trying to start jack with the jackd command, which doesn't use the dbus interface.

If I'm not mistaken, you can enable jackdbus support in qjackctl from Setup->Misc->Enable D-Bus interface, but I haven't tested it myself. If that doesn't work try starting jack using the jack_control interface, as documented here.

For your errors with alsamixer and pavucontrol: I'm guessing that either pulseaudio was simply killed when you tried to start jackd, or you have misconfigured it somehow and it fails to start because of that. Try to start pulseaudio manually from command line as suggested by MSC.

Offline

#6 2015-06-21 21:48:25

Ploppz
Member
Registered: 2013-09-14
Posts: 291

Re: Jack: How to run alongside Pulsaudio?

MSC wrote:

Is dbus installed and running? What are your qjackctl settings?

"Unable to connect to PulseAudio: OK" means that PulseAudio is not running (very helpful error, I know... roll ) Start it with "pulseaudio -D". I find it useful to put this command in qjackctl, in the "Execute script after startup" field.

I get this error:

E: [pulseaudio] main.c: Daemon startup failed.

I'm sorry, I'm not sure what to do further, and what more information to provide right now.

Offline

#7 2015-06-21 22:14:31

Knute
Member
From: Minot, ND
Registered: 2009-03-17
Posts: 604

Re: Jack: How to run alongside Pulsaudio?

So what happens when you open a terminal and issued the command

pulseaudio &

That command should start the server and let you see any output that it generates.


Knute

Offline

#8 2015-06-22 20:41:50

Ploppz
Member
Registered: 2013-09-14
Posts: 291

Re: Jack: How to run alongside Pulsaudio?

E: [pulseaudio] module.c: Module "module-jackdbus-detect" should be loaded once at most. Refusing to load.
E: [pulseaudio] main.c: Module load failed.
E: [pulseaudio] main.c: Failed to initialize daemon.

Offline

#9 2015-06-22 20:55:24

Knute
Member
From: Minot, ND
Registered: 2009-03-17
Posts: 604

Re: Jack: How to run alongside Pulsaudio?

Well, it looks like you are loading that module more than once.

You may want to check your default.pa file.  There is one located in /etc and another in .config/pulse/  or even perhaps in .pulse.

Last edited by Knute (2015-06-22 20:55:48)


Knute

Offline

#10 2015-06-23 17:57:13

Ploppz
Member
Registered: 2013-09-14
Posts: 291

Re: Jack: How to run alongside Pulsaudio?

Yes indeed it was in my default.pa file as an artifact from when I tried the link in the first answer here, failing to revert the changes. Shame I failed to read and interpret the errors.. And taking away the line that loads that module, solved other problems I had with some things being really slow (like opening termite, or right-clicking in Firefox). Neat. The alsamixer and pavucontrol problems are fixed.

But if I have such problems with that module, how can I accomplish what was the initial goal of this post? Did I do something wrong?

Last edited by Ploppz (2015-06-23 17:57:24)

Offline

#11 2015-06-23 18:06:17

Knute
Member
From: Minot, ND
Registered: 2009-03-17
Posts: 604

Re: Jack: How to run alongside Pulsaudio?

According to the error, it should be loaded only once.  If there were 2 references in there for it, it could cause issues.

The other thing is that perhaps you didn't have jack set up correctly.

http://www.freedesktop.org/wiki/Softwar … #index44h3

That links to the pulseaudio modules and gives some details about what it expects.

Please note this part:

For this to work, you need to use JACK 2, and enable JACK's D-Bus interface.

I don't know how you set jack up, nor am I knowledgeable about jack because I don't use it.

I do hope that this information is helpful to you though.


Knute

Offline

#12 2015-06-24 11:21:37

ooo
Member
Registered: 2013-04-10
Posts: 1,627

Re: Jack: How to run alongside Pulsaudio?

Indeed, you must use jack's dbus interface in order to make it work with pulseaudio's jackdbus-detect module.

As I said earlier, try enabling d-bus interface from qjackctl's settings, or use the jack_control command.

Offline

#13 2015-06-26 14:51:28

Ploppz
Member
Registered: 2013-09-14
Posts: 291

Re: Jack: How to run alongside Pulsaudio?

.. Seems like I wrote a reply but forgot to post it:
This is already in default.pa, I noticed:

### Automatically connect sink and source if JACK server is present
.ifexists module-jackdbus-detect.so
.nofail
load-module module-jackdbus-detect channels=2
.fail
.endif

I will come back to this a bit later - I'm going away now for a couple of days.

Offline

#14 2015-06-26 16:14:19

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 12,518

Re: Jack: How to run alongside Pulsaudio?

Yes the module is defined, however output above suggests you are using jack 1 (jackd in the output means you are still using jack1 not 2) and not jack2 you have to use jack2-dbus, which is a seperate package that will replace jack, and this will have dbus and hence pulseaudio support. I really suggest you carefully read through the JACK wiki article also mentioned earlier, as it contains all the information you need.

Last edited by V1del (2015-06-26 16:14:51)

Offline

#15 2015-06-28 13:10:40

ooo
Member
Registered: 2013-04-10
Posts: 1,627

Re: Jack: How to run alongside Pulsaudio?

V1del wrote:

Yes the module is defined, however output above suggests you are using jack 1 (jackd in the output means you are still using jack1 not 2) and not jack2 you have to use jack2-dbus, which is a seperate package that will replace jack, and this will have dbus and hence pulseaudio support.

Not quite,

There are three different packages for jack in arch repos:
- jack is the jack1 package that only contains jackd binay and no jackdbus
- jack2 includes both, the legacy jackd binary and the new dbus interface
- jack2-dbus only contains the jackdbus interface, and no jackd binary

You can route pulseaudio output to jack with any of the packages, and using either jackdbus or classic jackd.

If you use jackdbus, there's jackdbus-detect pulseaudio module, which detects when jack is started (using dbus) and routes pulseaudio output to jack pretty much automatically.

If you use classic jackd, you can use jack-sink and jack-source pulseaudio modules to route pulseaudio output to jack. However you may have to load the PA modules, and set the default PA source and sink manually. There's guide for that in arch wiki also: https://wiki.archlinux.org/index.php/Pu … he_new_way


@Ploppz
Looks like the wiki article is a bit outdated, and you don't need to add the module-jackdbus-detect to your pulseaudio configs any more. Just make sure you've installed pulseaudio-jack and start jack with the dbus interface, and pulseaudio output should get routed to jack without any extra hassle.

If you can't get that to work, try using jack-sink and jack-source modules with classic jackd as mentioned above.

Offline

#16 2015-07-19 13:11:36

Ploppz
Member
Registered: 2013-09-14
Posts: 291

Re: Jack: How to run alongside Pulsaudio?

I'm back here a little late, sorry.. I hope we can continue this discussion.

I have jack2-dbus installed. I have checked "Enable D-Bus interface" in Qjackctl, and I tried to start jack from there, and then play music using ncmpcpp.
The song progresses, but there is no output, not even in pavucontrol. Then, as said here, I added this to /etc/asound.conf:

pcm.pulse {
    type pulse
}
ctl.pulse {
    type pulse
}
pcm.!default {
    type pulse
}
ctl.!default {
    type pulse
}

And I rebooted. But now when I try to start Jack, I get this output with errors:

15:10:02.743 Statistics reset.
15:10:02.746 ALSA connection change.
15:10:02.755 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
15:10:02.772 ALSA connection graph change.
15:10:03.999 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
Sun Jul 19 15:10:03 2015: Starting jack server...
Sun Jul 19 15:10:03 2015: JACK server starting in realtime mode with priority 10
Sun Jul 19 15:10:03 2015: self-connect-mode is "Don't restrict self connect requests"
Sun Jul 19 15:10:03 2015: ERROR: cannot register object path "/org/freedesktop/ReserveDevice1/Audio0": A handler is already registered for /org/freedesktop/ReserveDevice1/Audio0
Sun Jul 19 15:10:03 2015: ERROR: Failed to acquire device name : Audio0 error : A handler is already registered for /org/freedesktop/ReserveDevice1/Audio0
Sun Jul 19 15:10:03 2015: ERROR: Audio device hw:SB,0 cannot be acquired...
Sun Jul 19 15:10:03 2015: ERROR: Cannot initialize driver
Sun Jul 19 15:10:03 2015: ERROR: JackServer::Open failed with -1
Sun Jul 19 15:10:03 2015: ERROR: Failed to open server
Sun Jul 19 15:10:05 2015: Saving settings to "/home/ploppz/.config/jack/conf.xml" ...
15:10:09.429 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

However, I'm in doubt: do I need to use Cadence (it has this option of bridging http://i.imgur.com/YTLfhDv.png), or is QJackCTL sufficient?

Thanks.

Offline

#17 2015-07-24 21:14:25

ooo
Member
Registered: 2013-04-10
Posts: 1,627

Re: Jack: How to run alongside Pulsaudio?

Ploppz wrote:

I have jack2-dbus installed. I have checked "Enable D-Bus interface" in Qjackctl, and I tried to start jack from there, and then play music using ncmpcpp.
The song progresses, but there is no output, not even in pavucontrol.

do you have pulseaudio-jack installed as well?
can you change pulseaudio's output to jack server from pavucontrol?
check the 'Audio' tab from qjackctl's 'Connections' window when jack is running. If pulseaudio is routing to jack, you should see its output ports on the left pane, and you may have to connect them manually to input ports on the right pane.

Ploppz wrote:

Then, as said here, I added this to /etc/asound.conf:

again the wiki article is outdated. You're better off by install pulseaudio-alsa from official repos, which provides asound.conf with the same basic functionality but it keeps ALSA in working order even if you don't use pulseaudio.

Ploppz wrote:

However, I'm in doubt: do I need to use Cadence (it has this option of bridging http://i.imgur.com/YTLfhDv.png), or is QJackCTL sufficient?

The asound.conf provided by pulseaudio-alsa package routes audio from ALSA applications to pulseaudio.
Modules provided by pulseaudio-jack package route audio from pulseaudio to jack server.

I don't know if cadence has some built in alsa->pulseaudio->jack bridge, but you definitely don't need it for any of that.

Offline

#18 2015-07-27 18:05:59

Ploppz
Member
Registered: 2013-09-14
Posts: 291

Re: Jack: How to run alongside Pulsaudio?

Thanks for your reply, and for still helping me.
I have pulseaudio-jack installed.
I can't see anything about Jack in pavucontrol.
'Audio' tab: http://i.imgur.com/X9WDnzf.png Connecting those didn't help - I guess they aren't from Pulseaudio.

Offline

#19 2015-10-13 06:21:39

abcsds
Member
Registered: 2015-10-13
Posts: 1

Re: Jack: How to run alongside Pulsaudio?

Could this be a solution for you?
http://dpod.kakelbont.ca/2015/08/16/fixing-qjackctl/
Changing the hardware input from the advanced tab in the preset settings.
Setup>Settings>Advanced>Output&Input device
change it to hw:pch
This solved my problem, with the exact same output error.

Offline

Board footer

Powered by FluxBB