On 07/09/2017 02:26 PM, alex wrote:



On 07/09/2017 02:10 PM, Ralf Mardorf wrote:
On Sun, 9 Jul 2017 13:55:26 +0300, alex wrote:
Distributor ID:    Ubuntu
Release:    14.04
Codename:    trusty
This is a very good information :).

See https://wiki.ubuntu.com/SystemdForUpstartUsers .

You are _not_ using systemd, or a hybrid. You are using upstart, IOW
init scripts.

So _unfortunately_ you could ignore Hermann's suggestion to use a
systemd unit.
So, I should replace (not that I've tried already) Hermann's suggestion with the following:
description "Job that runs the foo daemon"

# start in normal runlevels when disks are mounted and networking is available
start on runlevel [2345]

# stop on shutdown/halt, single-user mode and reboot
stop on runlevel [016]

env statedir=/var/cache/foo

# create a directory needed by the daemon
pre-start exec mkdir -p "$statedir"

exec /usr/bin/foo-daemon --arg1 "hello world" --statedir "$statedir"
Taken from the link you provided, right? This example is for a /etc/init/foo.conf file. Should I create a /etc/init/jackd.conf file? If so, I guess I should change some stuff, like the last two lines. But what should I put there instead?
Again, troubleshooting should be done by redirecting messages to a log
file + taking into account what Neil mentions, assuming you should try
with ALSA instead of jackd.
-rt is the default behavior in Pd, if I'm not mistaken. Never-the-less I tried to launch it with this flag and ALSA but I still get dropouts.
However, I don't understand why you do not get a log file :(.
I'll try again. I tried to add 'jack_wait -w' to my script, and again running manually works fine, but on boot jack_wait waits for ever and jack never starts.
jack_wait -w actually helped with creating a log file. Here's the output:

jackdmp 1.9.10
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2013 Grame.
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
Failed to connect to session bus for device reservation Unable to autolaunch a dbus-daemon without a $DISPLAY$

Audio device hw:1 cannot be acquired...
Cannot initialize driver
JackServer::Open failed with -1
Failed to open server


Even if I change hw:1 to hw:USB I get the same with:
Audio device hw:USB cannot be acquired...

Is there a chance that jack starts before the system sees the USB sound card? Should I put a 'sleep 10' before launching jack in the script?