2

Full context

I would like to set up Ardour and mess around a bit on a keyboard-as-in-music which I got a while ago, turned out not to need, but couldn't return. When I try to start Ardour, with a new session testing, using JACK as the audio system, I get (on starting JACK) the warning:

WARNING: Your system has a limit for maximum amount of locked memory. This might cause Ardour to run out of memory before your system runs out of memory. 

You can view the memory limit with 'ulimit -l', and it is normally controlled by  /etc/security/limits.conf`

When I try to continue on from there (because I don't expect to be using much memory on it any time soon, since right now I just want to be able to make any sound at all), I get the error error Could not create session in "/home/qwertystop/multimedia/ardour/testing".

When I try to start JACK through Qjackctl (with verbose messages on), it either apparently starts (but does not, as far as I can tell, register any input from my keyboard) or pops up its logs to report a failure.

In the latter case, scrolling back through them, I found an entry saying that the audio device was already in use, or something similar. That hasn't popped up in a while, I don't think I did anything differently between attempts, and unfortunately I did not copy down the exact log message the last time it did come up. I know it isn't (purely) a matter of whether any other applications are playing audio.

If I click Close instead of OK from the Ardour config, I get Could not create session in "/home/qwertystop/multimedia/ardour/testing": Cannot connect to audio/midi engine.

I have:

  • One "USB-MIDI keyboard controller" (Alesis V25)
  • Built-in audio on motherboard (not connected to any I/O, but does exist and occasionally confuses applications)
  • Audio output over HDMI from GPU
  • Linux Mint
  • Ardour 4.6 (via apt)
  • jackd 1.9.11 (installed as dependency of Ardour)

/proc/asound/cards has:

0 [PCH            ]: HDA-Intel - HDA Intel PCH
                     HDA Intel PCH at 0xdf240000 irq 128
1 [NVidia         ]: HDA-Intel - HDA NVidia
                     HDA NVidia at 0xdf080000 irq 17
2 [V25            ]: USB-Audio - V25
                     Alesis V25 at usb-0000:00:14.0-1, full speed

~/.jackdrc had /usr/bin/jackd -v -dalsa -dhw:0 -r44100 -p1024 -n2 the first time I looked, but when I opened Ardour it changed to /usr/bin/jackd -t 200 -p 2048 -R -T -d alsa -n 2 -r 44100 -p 1024 -d hw:PCH,0 -X raw. I tried changing PCH to Nvidia but it didn't help; Ardour changed it back and the other devices don't show up in Ardour's config stuff.

Pulseaudio does exist on my system and is currently running. I tried pasuspender qjackctl but JACK still wouldn't start. I also added myself to the audio group, following this, which seems to have stopped it from hitting memory errors.


Current status

The log from the most recent attempt (after adding myself to audio group, running qjackctl through pasuspender, driver is alsa, interface is hw:NVidia) is:

20:13:47.156 Statistics reset.
20:13:47.162 ALSA connection change.
20:13:47.172 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
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for 4294967295, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for 4294967295, skipping unlock
20:13:47.245 ALSA connection graph change.
20:13:52.295 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
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for 4294967295, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for 4294967295, skipping unlock
Wed Jan  2 20:13:52 2019: Starting jack server...
Wed Jan  2 20:13:52 2019: JACK server starting in realtime mode with priority 10
Wed Jan  2 20:13:52 2019: self-connect-mode is "Don't restrict self connect requests"
Wed Jan  2 20:13:52 2019: Jack: JackPosixThread::StartImp : create non RT thread
Wed Jan  2 20:13:52 2019: Jack: JackPosixThread::ThreadHandler : start
Wed Jan  2 20:13:52 2019: Jack: playback device hw:NVidia
Wed Jan  2 20:13:52 2019: Jack: capture device hw:NVidia
Wed Jan  2 20:13:52 2019: Jack: capture device hw:NVidia
Wed Jan  2 20:13:52 2019: Jack: playback device hw:NVidia
Wed Jan  2 20:13:52 2019: Jack: apparent rate = 44100
Wed Jan  2 20:13:52 2019: Jack: frames per period = 1024
Wed Jan  2 20:13:52 2019: Jack: JackDriver::Open capture_driver_name = hw:NVidia
Wed Jan  2 20:13:52 2019: Jack: JackDriver::Open playback_driver_name = hw:NVidia
Wed Jan  2 20:13:52 2019: Jack: Check protocol client = 8 server = 8
Wed Jan  2 20:13:52 2019: Jack: JackEngine::ClientInternalOpen: name = system
Wed Jan  2 20:13:52 2019: Jack: JackEngine::AllocateRefNum ref = 0
Wed Jan  2 20:13:52 2019: Jack: JackPosixSemaphore::Allocate name = jack_sem.1000_default_system val = 0
Wed Jan  2 20:13:52 2019: Jack: JackEngine::NotifyAddClient: name = system
Wed Jan  2 20:13:52 2019: Jack: JackGraphManager::SetBufferSize size = 1024
Wed Jan  2 20:13:52 2019: Jack: JackConnectionManager::DirectConnect first: ref1 = 0 ref2 = 0
Wed Jan  2 20:13:52 2019: Jack: JackGraphManager::ConnectRefNum cur_index = 0 ref1 = 0 ref2 = 0
Wed Jan  2 20:13:52 2019: Jack: JackDriver::SetupDriverSync driver sem in flush mode
Wed Jan  2 20:13:52 2019: Acquired audio card Audio1
Wed Jan  2 20:13:52 2019: creating alsa driver ... hw:NVidia|hw:NVidia|1024|2|44100|0|0|nomon|swmeter|-|32bit
Wed Jan  2 20:13:52 2019: ERROR: ALSA: Cannot open PCM device alsa_pcm for playback. Falling back to capture-only mode
Wed Jan  2 20:13:52 2019: Jack: JackDriver::Close
Wed Jan  2 20:13:52 2019: Jack: JackConnectionManager::DirectDisconnect last: ref1 = 0 ref2 = 0
Wed Jan  2 20:13:52 2019: Jack: JackGraphManager::DisconnectRefNum cur_index = 0 ref1 = 0 ref2 = 0
Wed Jan  2 20:13:52 2019: Jack: JackEngine::ClientInternalClose ref = 0
Wed Jan  2 20:13:52 2019: Jack: JackEngine::ClientCloseAux ref = 0
Wed Jan  2 20:13:52 2019: Jack: JackGraphManager::RemoveAllPorts ref = 0
Wed Jan  2 20:13:52 2019: Jack: JackPosixSemaphore::Destroy name = jack_sem.1000_default_system
Wed Jan  2 20:13:52 2019: Jack: ~JackDriver
Wed Jan  2 20:13:52 2019: ERROR: Cannot initialize driver
Wed Jan  2 20:13:52 2019: Jack: no message buffer overruns
Wed Jan  2 20:13:52 2019: Jack: JackPosixThread::Stop
Wed Jan  2 20:13:52 2019: Jack: JackPosixThread::ThreadHandler : exit
Wed Jan  2 20:13:52 2019: ERROR: JackServer::Open failed with -1
Wed Jan  2 20:13:52 2019: Jack: Succeeded in unlocking 82274202 byte memory area
Wed Jan  2 20:13:52 2019: Jack: JackShmMem::delete size = 0 index = 0
Wed Jan  2 20:13:52 2019: Jack: ~JackDriver
Wed Jan  2 20:13:52 2019: Jack: Succeeded in unlocking 1186 byte memory area
Wed Jan  2 20:13:52 2019: Jack: JackShmMem::delete size = 0 index = 1
Wed Jan  2 20:13:52 2019: Jack: Cleaning up shared memory
Wed Jan  2 20:13:52 2019: Jack: Cleaning up files
Wed Jan  2 20:13:52 2019: Jack: Unregistering server `default'
Wed Jan  2 20:13:52 2019: ERROR: Failed to open server
Wed Jan  2 20:13:54 2019: Saving settings to "/home/qwertystop/.config/jack/conf.xml" ...
20:13:54.478 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 4294967295, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for 4294967295, skipping unlock

JACK starts if the interface is set to hw:PCH or hw:PCH,0, but I don't have any speakers except on my screen, which is on my graphics card's HDMI, so I'm not sure there'd be any point.

Did some more experimentation. Setting the interface to (default) and setting the input and output devices separately was useful. If I set input and output both to NVidia, I get the same ERROR: ALSA: Cannot open PCM device alsa_pcm for playback. Falling back to capture-only mode error as before. If I set one of the two to NVidia and the other to PCH, I don't get an error. However, neither configuration produces audio output from the speakers in my monitor. If output is NVidia and input is PCH, Jack can see readable system ports presumably matching the mic ports, but no writable system ports. If output is PCH and input is NVidia, Jack can see writable system ports for my headphone jack but no readable ports. This is consistent with the idea that JACK cannot interface with the NVidia device for... some reason?

  • I find it strange that you have jackd 0.4.1 this seems to be extemely old. Jack 1 series currently has a version of 0.125.0 and Jack 2 1.9.12. – hargut Jan 4 at 23:27
  • jackd --version says 1.9.11. The 0.4.1 was a mistake; that's the version of qjackctl. Corrected. – David Heyman Jan 5 at 20:41
1

Following on from the current end-state of "JACK starts if the interface is set to hw:PCH or hw:PCH,0, but I don't have any speakers except on my screen, which is on my graphics card's HDMI, so I'm not sure there'd be any point.", I:

  • Found some terrible old headphones
  • plugged them into my computer's built-in headphone jack
  • ran a2jmidid -j default
  • set JACK's interface to hw:PCH
  • Hooked up various connections in JACK following this guide
  • successfully recorded some random noises on the (MIDI) keyboard
  • played them back through the headphones.

So my remaining issue is that it's still producing the error in the question when I try to point JACK at my graphics card's HDMI audio-out instead. Since I don't have separate speakers or other not-built-into-my-monitor audio output, that's still a problem, for which I will leave this question open.

0

The reason why the interface could not be opened is not really clear here. It could be various.

Things to check:

  • Does some other software use, and therefore lock the soundcard? Use lsof /dev/snd/* to verify that.
  • Are your settings for the samplerate correct for the soundcard? Needs checking of the soundcard capabilites in /proc/asound/ directories. Some soundcards do e.g only accept 96000 as samplerate, and I think I've seen that on Nvidia HDMI.
  • Are access permissions to /dev/snd/ enough or already active for your user.

Suggestions for debugging:

  • Try to start jack with as little as possible parameters.
  • Try to start jack as root to eleminate file permission issues as reason for startup failures. As soon as it starts as root, use the same parameters as user. If permissions are ok it will also start with a regular user.
  • lsof shows only pulseaudio there, and I was starting jack wrapped in pasuspender so that shouldn't be an issue. – David Heyman Jan 5 at 20:45
  • Looking in /proc/sound/NVidia, I'm not sure how to read these but as far as I can tell the rate is fine. codec#0 mentions "rates" in four different nodes, all of which say "3200 44100 48000 88200 96000 176400 192000"; the sample rate JACK was set to was already 44100. eld#0.1 also mentions rates, with a smaller list but still including 44100. – David Heyman Jan 5 at 20:51
  • Every directory in /dev/snd is group-read-writable, and is in the audio group, to which I have added myself. – David Heyman Jan 5 at 20:56
  • Experimented a bit more, added details to question. – David Heyman Jan 5 at 21:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.