Jack working on Headless RaspPi

Hi All,

Does anyone have any suggestions on how to get Jack working and running on autostart on a headless Raspberry Pi? I’ve been following the directions on how to build SuperCollider on Raspberry Pi here: http://supercollider.github.io/development/building-raspberrypi.html I’ve been following the SCIDE build with Raspbian Jessie. At the bottom of the tutorial, it says to run the following command before starting Jack: export DISPLAY=:0.0 in order to run it headless. The problem I’m coming across is that this doesn’t work when I attempt to create a cronjob to autostart Jack and SuperCollider at start up. Does anyone have any suggestions on the best way to do this?



Did you recompile jack on your own? I remember that in order to get ‘no D-BUS’ version of jack, the one from apt-get is not enough, and I think it’s a requirement to have it running ‘headless’.

The steps are outlined in step 4 of the guide, but you may also be interested to digging a bit into our MOD Emulator for Pi scripts here: https://github.com/BlokasLabs/modep/blob/master/scripts/modep.sh#L105 and it uses systemctl instead of cron jobs to start jack: https://github.com/BlokasLabs/modep/blob/master/services/jack.service

If the above does not help, then you’ll need to look for any output you can get from jack and super collider. You may have luck by redirecting the stdout and stderr to some log files when starting jack or SC from crontab, systemctl takes care of that for us. You could run commands like sudo systemctl status jack and it would print whether its running and last messages produced.

Hope this helps!

I’ve managed to start vanilla jackd on a headless pisound system with these steps:

  1. Create /etc/dbus-1/system.d/pisound.conf with the following contents:
<!DOCTYPE busconfig PUBLIC
 "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
        <policy user="root">
                <allow own="org.freedesktop.ReserveDevice1.Audio1"/>
        <policy user="pi">
                <allow own="org.freedesktop.ReserveDevice1.Audio1"/>
  1. Reload system dbus configuration: sudo service dbus reload

  2. Start jackd with system dbus session address:
    DBUS_SESSION_BUS_ADDRESS=unix:path=/run/dbus/system_bus_socket jackd -R -d alsa -d hw:pisound -r 48000

UPD: there seems to be an even shorter way to run it – just disable audio device reservation via an environment variable JACK_NO_AUDIO_RESERVATION=1. Seems to work without all the fiddling with dbus.


Just a note to those searching here with jackd problems: This is the fix!