hepita
Posts: 3
Joined: Tue Apr 13, 2021 12:23 pm

Raspberry Pi 4 and JACK Server

Tue Apr 13, 2021 12:37 pm

Hi all,
I want to build a RPi-based synthesizer. For this, I need to use JACK Server. However, after trying to launch JACK I get the following error:

Code: Select all

23:19:04.233 Statistics reset.
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
23:19:08.984 JACK is starting...
23:19:08.985 /usr/bin/jackd -dalsa -dhw:Headphones -r48000 -p512 -n4 -P
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
23:19:09.091 JACK was started with PID=1068.
jackdmp 1.9.12
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2016 Grame.
Copyright 2016-2017 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 Audio1
creating alsa driver ... hw:Headphones|-|512|4|48000|0|0|nomon|swmeter|-|32bit
configuring for 48000Hz, period = 512 frames (10.7 ms), buffer = 4 periods
ALSA: final selected sample format for playback: 16bit little-endian
ALSA: use 4 periods for playback
23:19:16.119 Could not connect to JACK server as client. - Overall operation failed. - Server communication error. Please check the messages window for more info.
JackPosixProcessSync::LockedTimedWait error usec = 5000000 err = Connection timed out
Driver is not running
Cannot read socket fd = 19 err = Success
Cannot create new client
CheckRes error
JackSocketClientChannel read fail
Cannot open qjackctl client
JackShmReadWritePtr1::~JackShmReadWritePtr1 - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
23:19:18.566 JACK is stopping...
Jack main caught signal 15
ALSA: poll time out, polled for 15999061 usecs
JackAudioDriver::ProcessAsync: read error, stopping...
Released audio card Audio1
audio_reservation_finish
23:19:25.633 JACK was stopped
I'm not sure what it means and how could I fix it. I double-checked that I was using correct options and I killed pulseaudio before. Sound from pulseaudio via headphone jack works without any problems.

From what I've read, people generally recommend against using built-in soundcard for professional audio (because of high latency and low sound quality), and JACK (supposedly) runs great with external USB soundcards/I2S DACs. But has anyone succesfully launched it on the built-in bcm2835? Or is an external soundcard necessary

I'm a bit short on money right now, so I'd like to avoid buying any additional equipment if possible.

Any help would be appreciated.

EDIT: I'm using and up-to-date Raspberry Pi OS.
Last edited by hepita on Tue Apr 13, 2021 1:00 pm, edited 1 time in total.

fruitoftheloom
Posts: 27226
Joined: Tue Mar 25, 2014 12:40 pm

Re: Raspberry Pi 4 and JACK Server

Tue Apr 13, 2021 12:41 pm

hepita wrote:
Tue Apr 13, 2021 12:37 pm
Hi all,
I want to build a RPi-based synthesizer. For this, I need to use JACK Server. However, after trying to launch JACK I get the following error:

Code: Select all

23:19:04.233 Statistics reset.
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
23:19:08.984 JACK is starting...
23:19:08.985 /usr/bin/jackd -dalsa -dhw:Headphones -r48000 -p512 -n4 -P
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
23:19:09.091 JACK was started with PID=1068.
jackdmp 1.9.12
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2016 Grame.
Copyright 2016-2017 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 Audio1
creating alsa driver ... hw:Headphones|-|512|4|48000|0|0|nomon|swmeter|-|32bit
configuring for 48000Hz, period = 512 frames (10.7 ms), buffer = 4 periods
ALSA: final selected sample format for playback: 16bit little-endian
ALSA: use 4 periods for playback
23:19:16.119 Could not connect to JACK server as client. - Overall operation failed. - Server communication error. Please check the messages window for more info.
JackPosixProcessSync::LockedTimedWait error usec = 5000000 err = Connection timed out
Driver is not running
Cannot read socket fd = 19 err = Success
Cannot create new client
CheckRes error
JackSocketClientChannel read fail
Cannot open qjackctl client
JackShmReadWritePtr1::~JackShmReadWritePtr1 - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
23:19:18.566 JACK is stopping...
Jack main caught signal 15
ALSA: poll time out, polled for 15999061 usecs
JackAudioDriver::ProcessAsync: read error, stopping...
Released audio card Audio1
audio_reservation_finish
23:19:25.633 JACK was stopped
I'm not sure what it means and how could I fix it. I double-checked that I was using correct options and I killed pulseaudio before. Sound from pulseaudio via headphone jack works without any problems.

From what I've read, people generally recommend against using built-in soundcard for professional audio (because of high latency and low sound quality), and JACK (supposedly) runs great with external USB soundcards/I2S DACs. But has anyone succesfully launched it on the built-in bcm2835? Or is an external soundcard necessary

I'm a bit short on money right now, so I'd like to avoid buying any additional equipment if possible.

Any help would be appreciated.

Raspberry Pi Operating System has the ALSA APi with PulseAudio as the Sound Server. Jack developers have a useful page here:

https://jackaudio.org/faq/pulseaudio_and_jack.html
Take what I advise as advice not the utopian holy grail, and it is gratis !!

hepita
Posts: 3
Joined: Tue Apr 13, 2021 12:23 pm

Re: Raspberry Pi 4 and JACK Server

Tue Apr 13, 2021 12:58 pm

Yes, I'm aware of that. But I don't want to use pulseaudio at all - that's why I killed it before launching jack.
My problem is that JACK doesn't work, not that it prevents pulseaudio from working.

fruitoftheloom
Posts: 27226
Joined: Tue Mar 25, 2014 12:40 pm

Re: Raspberry Pi 4 and JACK Server

Tue Apr 13, 2021 1:07 pm

hepita wrote:
Tue Apr 13, 2021 12:58 pm
Yes, I'm aware of that. But I don't want to use pulseaudio at all - that's why I killed it before launching jack.
My problem is that JACK doesn't work, not that it prevents pulseaudio from working.

Glad you saw that page, that information was not conveyed in your post and my crystal ball is being repaired.


Ideally you need to completely eradicate PulseAudio (not ideal) it is likely fighting Jack for control of ALSA APi......

......unless you use an older point release of Raspbian Pi Operating System prior to December 2020 which used ALSA and BlueAlsa, and never update / upgrade.
(Jack is in the repositories):

http://downloads.raspberrypi.org/raspbi ... 2019-09-30

https://wiki.debian.org/JACK
Take what I advise as advice not the utopian holy grail, and it is gratis !!

hepita
Posts: 3
Joined: Tue Apr 13, 2021 12:23 pm

Re: Raspberry Pi 4 and JACK Server

Tue Apr 13, 2021 1:38 pm

fruitoftheloom wrote:
Tue Apr 13, 2021 1:07 pm
Glad you saw that page, that information was not conveyed in your post and my crystal ball is being repaired.
I wrote that I wanted to use JACK, and I made sure that I've killed pulseaudio. I thought that my intentions were clear enough that I didn't want to use pulseaudio. Well, I was wrong, apparently.
Ideally you need to completely eradicate PulseAudio (not ideal) it is likely fighting Jack for control of ALSA APi......
I just checked if that's the case, but even after uninstalling pulseaudio, I get roughly the same error as above.
Looking closer at the log, these two lines seem to be critical:

Code: Select all

23:19:16.119 Could not connect to JACK server as client. - Overall operation failed. - Server communication error. Please check the messages window for more info.
JackPosixProcessSync::LockedTimedWait error usec = 5000000 err = Connection timed out
Driver is not running
This could indicate some problem with the driver, but I have no idea what could be wrong here.

Which brings me back to my main question:
has anyone succesfully launched it [JACK] on the built-in bcm2835? Or is an external soundcard necessary
Because I couldn't find any info about this anywhere.

fruitoftheloom
Posts: 27226
Joined: Tue Mar 25, 2014 12:40 pm

Re: Raspberry Pi 4 and JACK Server

Tue Apr 13, 2021 2:28 pm

.
One of many forum searches:

viewtopic.php?f=28&t=293921
Take what I advise as advice not the utopian holy grail, and it is gratis !!

renice123
Posts: 354
Joined: Tue Oct 15, 2019 3:56 pm

Re: Raspberry Pi 4 and JACK Server

Thu Apr 15, 2021 11:49 am

I've used jackd with and without pulseaudio. Better to work without pulseaudio - this program still crashes on all architectures. On Malin it is very convenient to abandon all drivers and install the driver for an "empty" snd-aloop card. This will leave the entire system working, redirect the sound to the server. Here is my topic viewtopic.php?t=256841
PS From the post, your problem is that you haven't completely uninstalled the pulseaudio package. The pulseaudio programmer wrote the program badly and it is not easy to "stop" the buggy program. The package must be removed with sudo apt-get remove

pirro
Posts: 2
Joined: Tue Dec 03, 2019 9:39 pm

Re: Raspberry Pi 4 and JACK Server

Mon Sep 20, 2021 8:05 pm

Did anyone manage to solve this problem? Removing pulseaudio from the system doesn't reallly work. Jackd continues to fail to start with the same error message posted above. Any luck anyone? Ideas?

Return to “Graphics, sound and multimedia”