OS: FreeBSD 12.2-RELEASE
I installed ardour-6.3.0 via FreeBSD ports and finally successfully got it running. However there are a couple of issues. I am posting to the forum because the bug tracker would not let me setup an account. It keeps telling me
APPLICATION ERROR #2800 Invalid form security token.
I tried several times with no delay, to make sure that it didn’t time me out, to no avail.
Ardour tries to start jackd with this command line, which fails to run.
/usr/local/bin/jackd -t 200 -p 2048 -R -T -d oss -n 2 -r 48000 -p 1024
When that command is run manually from the command line, it produces this error:
JACK compiled with System V SHM support. cannot use real-time scheduling (FIFO at priority 10) [for thread 9150464, from thread 9150464] (1: Operation not permitted) cannot create engine
The problem is, JACK requires root privileges to run with the -R switch for realtime scheduling.
I previously tried the older ardour version 2.8.16 because it is also pre-packaged in FreeBSD. I was able to get around this problem because the Options dialog had a checkbox to unckeck Realtime, which caused it to run jackd with -r rather than -R. I have found no such option in ardour 6.
The jackit package (jackd) includes a system startup script that allows you to enable jackd to be run as root on startup. However, that does not work because ardour does not have permissions to acces the communication files for it in /tmp when running as a non-root user.
Even if I run jackd as the same user and then run ardour, it fails because ardour is persistent about killing off any instance of jackd before it checks to see if it is already running. I finally had to write a wrapper script for launching ardour to get around this but there is still a problem as I will describe below.
Here is the script:
#!/bin/sh # First launch ardour in background ardour6 & # If ardour launches jackd it's self, it always runs jackd with -R for real time # high priority mode. jackd must be run as root to do that. If I run it as root # from the system startup script, ardour does not have permission to access the # jackd communication files in /tmp. # Delay a few seconds before starting jackd because ardour kills any existing # daemon on startup. sleep 4 # Run jackd with the same parameters that ardour uses, except change -R to -r # to disable real time scheduling. jackd -t 200 -p 2048 -r -T -d oss -n 2 -r 48000 -p 1024 & # After that, ardour recognizes that it's running and offers a dialog to connect # to the existing jackd daemon.
This works fine as long as I select a recent session on startup.
If I select New Session on the initial dialog, it gives me a dialog that says
JACK is already running. Ardour will connect to it and use the existing settings.
and has a Connect to JACK button. However, it immediately kills jackd by sending it a signal 31. So then, when you click on the Connect button, it fails and pops up an error that says it could not reconnect to Audio/MIDI engine.
If I run ardour as root, it still kills jackd on startup, if it is already running. I click New Session, and then click Open in the Session Setup dialog, it takes me to an Audio/MIDI Setup dialog which shows Stopped in red letters next to the Audio System Start button. The only difference is, at this point ardour is able to successfully re-launch jackd and the application comes up.
Ardour is overly insistent in killing any existing jackd process, even after it detects it is running and prompts to connect to it.
It forces you to run it as root without special wrapper scripts to launch jackd at the right time, because ardour starts jackd in real time scheduling mode (have I missed a way to change this?).