JACK Issue

Still new to all of this? Feel free to post in any of the subforums on this site, but in this subforum newbie questions are especially encouraged!

Moderators: MattKingUSA, khz

Post Reply
Zakalwe
Established Member
Posts: 4
Joined: Fri Apr 10, 2020 2:35 am

JACK Issue

Post by Zakalwe »

Hi everyone,

Yes I know it's the most perennial of errors when first trying to use JACK. I get the usual issue that from what I've researched so far is something to do with Pulseaudio.

So what I've tried so far:

pulseaudio --kill then jackd -d alsa on console - didn't work even as root
pasuspender qjackctl - didn't work
installed pulseaudio-module-jack - didn't work
Audacity using ALSA as the sound driver - worked fine playback and record.


I'm still getting what looks to be the standard error output under these circumstances:


14:30:46.917 ALSA connection graph change.
14:30:49.841 D-BUS: JACK server could not be started. Sorry
Fri Apr 10 14:30:49 2020: Starting jack server...
Fri Apr 10 14:30:49 2020: JACK server starting in non-realtime mode
Fri Apr 10 14:30:49 2020: self-connect-mode is "Don't restrict self connect requests"
Fri Apr 10 14:30:49 2020: ERROR: Cannot lock down 82280346 byte memory area (Cannot allocate memory)
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
Fri Apr 10 14:30:49 2020: Acquired audio card Audio0
Fri Apr 10 14:30:49 2020: creating alsa driver ... hw:0|hw:0|1024|2|44100|0|0|nomon|swmeter|-|32bit
Fri Apr 10 14:30:49 2020: ERROR: ALSA: Cannot open PCM device alsa_pcm for playback. Falling back to capture-only mode
Fri Apr 10 14:30:49 2020: Released audio card Audio0
Fri Apr 10 14:30:49 2020: ERROR: Cannot initialize driver
Fri Apr 10 14:30:49 2020: ERROR: JackServer::Open failed with -1
Fri Apr 10 14:30:49 2020: ERROR: Failed to open server
Fri Apr 10 14:30:51 2020: Saving settings to "/home/xxxx/.config/jack/conf.xml" ...
14:31:00.582 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

This all started when I tried to run the VCV virtual modular synth, it has 3 sound device settings, JACK, ALSA or Bridge. None of which produce any sound even with the defaulte templat where you can see a waveform is being generated but no sound.
I found a form post where someone had the same problem and got it working using JACK.

My system is running Linux Mint 19.1 MATE on an old HP Elitebook 850 G1

Any help much appreciated!

Thanks
User avatar
bluebell
Established Member
Posts: 1909
Joined: Sat Sep 15, 2012 11:44 am
Location: Saarland, Germany
Has thanked: 111 times
Been thanked: 116 times

Re: JACK Issue

Post by bluebell »

Don't run jackd as root.

But make shure that you are in the audio group and that there is a /etc/security/limits.d/audio.conf with

Code: Select all

# Provided by the jackd package.
#
# Changes to this file will be preserved.
#
# If you want to enable/disable realtime permissions, run
#
#    dpkg-reconfigure -p high jackd

@audio   -  rtprio     95
@audio   -  memlock    unlimited
#@audio   -  nice      -19

Linux – MOTU UltraLite AVB – Qtractor – http://suedwestlicht.saar.de/

Zakalwe
Established Member
Posts: 4
Joined: Fri Apr 10, 2020 2:35 am

Re: JACK Issue

Post by Zakalwe »

bluebell wrote: Fri Apr 10, 2020 7:06 pm Don't run jackd as root.

But make shure that you are in the audio group and that there is a /etc/security/limits.d/audio.conf with

Code: Select all

# Provided by the jackd package.
#
# Changes to this file will be preserved.
#
# If you want to enable/disable realtime permissions, run
#
#    dpkg-reconfigure -p high jackd

@audio   -  rtprio     95
@audio   -  memlock    unlimited
#@audio   -  nice      -19
Hi, thanks for taking the time to reply!

I was not in the audio group only a user called pulse was there, but sadly adding myself to it did not change anything.
The file you mention is there with the exact same settings as your example. However still getting the same errors!
User avatar
bluebell
Established Member
Posts: 1909
Joined: Sat Sep 15, 2012 11:44 am
Location: Saarland, Germany
Has thanked: 111 times
Been thanked: 116 times

Re: JACK Issue

Post by bluebell »

See https://askubuntu.com/questions/166126/ ... ate-memory

You have to re-login to make group membership active.

Try:

Code: Select all

ulimit -l
not as root but as your user.

Code: Select all

hm@bubu:~$ ulimit -l
unlimited

Linux – MOTU UltraLite AVB – Qtractor – http://suedwestlicht.saar.de/

Zakalwe
Established Member
Posts: 4
Joined: Fri Apr 10, 2020 2:35 am

Re: JACK Issue

Post by Zakalwe »

Once I added myself to the audio group I rebooted to make extra sure!
The result of ulimit -l is unlimited.

I followed the suggestions on that Ubuntu form you suggested, it has taken away the memory allocation error, but the rest remains the same!
The PCM device error I think is the key one and from what I've been able to determine, should not be a problem if you suspend pulseaudio, there should be nothing stopping jackd from getting at the ALSA driver! Its really odd..

Code: Select all

Mon Apr 13 07:47:46 2020: Starting jack server...
Mon Apr 13 07:47:46 2020: JACK server starting in realtime mode with priority 10
Mon Apr 13 07:47:46 2020: self-connect-mode is "Don't restrict self connect requests"
Mon Apr 13 07:47:46 2020: Acquired audio card Audio0
Mon Apr 13 07:47:46 2020: creating alsa driver ... hw:0|hw:0|1024|2|44100|0|0|nomon|swmeter|-|32bit
Mon Apr 13 07:47:46 2020: ERROR: ALSA: Cannot open PCM device alsa_pcm for playback. Falling back to capture-only mode
Mon Apr 13 07:47:46 2020: Released audio card Audio0
Mon Apr 13 07:47:46 2020: ERROR: Cannot initialize driver
Mon Apr 13 07:47:46 2020: ERROR: JackServer::Open failed with -1
Mon Apr 13 07:47:46 2020: ERROR: Failed to open server
Zakalwe
Established Member
Posts: 4
Joined: Fri Apr 10, 2020 2:35 am

Re: JACK Issue

Post by Zakalwe »

Thank you Bluebell, between us we've solved the problem.
You helped with the audio group and memory allocation error with the forum you linked to and the entries in the /etc/security/limits.conf mentioned there.

I realised what the PCM error was when I saw on another forum post that someone had multiple devices listed when running aplay -l on command line.

This is the output I get with that command:

Code: Select all

**** List of PLAYBACK Hardware Devices ****
card 0: HDMI [HDA Intel HDMI], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: HDMI [HDA Intel HDMI], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: HDMI [HDA Intel HDMI], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: HDMI [HDA Intel HDMI], device 9: HDMI 3 [HDMI 3]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: HDMI [HDA Intel HDMI], device 10: HDMI 4 [HDMI 4]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 0: 92HD91BXX Analog [92HD91BXX Analog]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
I also have 2 devices and the default one is the HDMI output, but I'm using the internal speakers of the laptop which is card 1.
When I ran the command jackd -R -d alsa -d hw:1 to select device 1 instead of the default device 0 the JACK server started fine.

So thanks again. My next challenge is figuring out how to actually use JACK and qjackctl and route audio with it.
Post Reply