Trouble with JACK2

I’m recording audio on my computer, which requires JACK. So, I’ve installed:

  • jack2
  • pulseaudio-jack
  • pipewire-jack
  • qjackctl
  • realtime-privileges

I also added myself to the realtime group. Everything was working fine for about a week, now none of my applications can see my microphone–although, it’s clearly working in the audiomixer. The error message from qjackctl on startup says:

12:10:08.894 Statistics reset.
12:10:08.912 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
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock

When I press the start button, I get this error:

12:10:08.941 ALSA connection graph change.
12:19:05.294 JACK connection change.
12:19:05.312 Client activated.
12:19:05.312 Patchbay deactivated.
Cannot lock down 82280346 byte memory area (Cannot allocate memory)

I found references to the Cannot allocate memory issue. However, I couldn’t figure out how to get it sorted. It may be an issue with pam limits, but I’m lost.

One other thing to mention. Audio playback is working.

You may have to be in the audio group.

You may have to be in the audio group.

How do I check that?

Here is some info on the issue.

Edit: If that is not helpful then

https://wiki.archlinux.org/index.php/JACK_Audio_Connection_Kit

Open a terminal - type ‘groups’ and your user groups will be displayed

2 Likes

Thanks. After adding myself to the audio group, PulseAudio JACK Sink, and PulseAudio JACK Source now appear in my mixer. qjackctl now reports that JACK is running, but still with the memory error. When I whistle at my microphone, the bar jumps for the ASLA driver, but not for the JACK source. I’ve looked through the arch wiki article… but was skimming for a quick answer, perhaps I need to read it thoroughly. :stuck_out_tongue:

I don’t have much experience with the software i just look more for hardware aspects. I think it is a common issue and easily resolved.

Okay, now here’s somthing interesting. When I ran groups I found that I’m not in the realtime group, even though I did that as part of my setup. I tried to add myself, I’m still not in the realtime group… I double checked and I do have realtime-privileges installed.

It may be that you need to edit the security settings?

https://jackaudio.org/faq/linux_rt_config.html

Have a look at Realtime Process management on the arch wiki. There is a package for realtime privileges. Do you have that installed? Is it necessary? I don’t know.

Edit: https://wiki.archlinux.org/index.php/Realtime_process_management#Configuring_PAM

Installing the package realtime-privileges and adding the user to the realtime group, provides reasonable default values (e.g. relevant for Professional audio).

@Philo-Phineas
Oh sorry, I see you said you have that installed.

You may have to re-login or even reboot in order to having groups really changed.

1 Like

Did you happen to get any where further? Logging in and out or restarting?

Logging out, then in again fixed the realtime group problem. This also fixed the memory problem, and qjackctl reported no errors… However, I still had the same problem, no audio getting to my applications. I tried rebooting, and jack’s not running at all. Here’s the error mesages:

01:33:28.334 Statistics reset.
01:33:28.350 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
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
01:33:28.377 ALSA connection graph change.
01:35:38.949 JACK is starting...
01:35:38.949 /usr/bin/jackd -dalsa -dhw:0 -r48000 -p1024 -n2
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
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
01:35:38.957 JACK was started with PID=8333.
Could not open component .so '/usr/lib/jack/jack_firewire.so': libffado.so.2: cannot open shared object file: No such file or directory
Could not open component .so '/usr/lib/jack/jack_firewire.so': libffado.so.2: cannot open shared object file: No such file or directory
jack_get_descriptor : dll jack_firewire.so is not a driver
jack_get_descriptor returns null for 'jack_firewire.so'
Could not open component .so '/usr/lib/jack/jack_firewire.so': libffado.so.2: cannot open shared object file: No such file or directory
jackdmp 1.9.14
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2016 Grame.
Copyright 2016-2019 Filipe Coelho.
jackdmp comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details
JACK server starting in realtime mode with priority 10
self-connect-mode is "Don't restrict self connect requests"
audio_reservation_init
Acquire audio card Audio0
creating alsa driver ... hw:0|hw:0|1024|2|48000|0|0|nomon|swmeter|-|32bit
ALSA: Cannot open PCM device alsa_pcm for playback. Falling back to capture-only mode
Released audio card Audio0
audio_reservation_finish
Cannot initialize driver
JackServer::Open failed with -1
Failed to open server
01:35:39.116 JACK was stopped
01:35:41.064 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
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock

Have you checked that you are using the correct outputs and inputs on the devices.

The inputs and outputs are set correctly in the PulseAudio mixer. As JACK stopped working after I rebooted, I can’t really do anything with “Patchbay” in qjackctl.

It looks like this is an old issue from way back. It’s looking for a firewire driver even though you probably don’t have that device on your motherboard. The two options used back then were to install the driver libffado even though you don’t have that device or rebuild jack2 without it.

This is based on reading this old info. You can have a read yourself and see if you think it’s related. The libffado file is in the repo under repositories i’m looking at it in pamac. I don’t think there would be any harm installing it in my opinion. It’s either going to work or not. See what you think.

https://bugs.archlinux.org/task/33127

I installed libffado, which cleared that error message up, and we’re making progress. Now it’s reporting trouble with the ALSA driver.

09:57:45.952 Statistics reset.
09:57:45.953 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
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
09:57:45.973 ALSA connection graph change.
09:58:02.194 JACK is starting...
09:58:02.194 /usr/bin/jackd -dalsa -dhw:0 -r48000 -p1024 -n2
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
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
09:58:02.201 JACK was started with PID=4597.
no message buffer overruns
no message buffer overruns
no message buffer overruns
jackdmp 1.9.14
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2016 Grame.
Copyright 2016-2019 Filipe Coelho.
jackdmp comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details
JACK server starting in realtime mode with priority 10
self-connect-mode is "Don't restrict self connect requests"
audio_reservation_init
Acquire audio card Audio0
creating alsa driver ... hw:0|hw:0|1024|2|48000|0|0|nomon|swmeter|-|32bit
ALSA: Cannot open PCM device alsa_pcm for playback. Falling back to capture-only mode
Released audio card Audio0
audio_reservation_finish
Cannot initialize driver
JackServer::Open failed with -1
Failed to open server
09:58:02.294 JACK was stopped
09:58:04.216 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
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock

It looks like it’s not picking the right sound device.

What does aplay -l show

@Philo-Phineas

https://jackaudio.org/faq/routing_alsa.html

https://jackaudio.org/faq/pulseaudio_and_jack.html