2

I try to start jack server on boot

I can run it manually on the desktop:

pi@raspberrypi:~ $ /usr/bin/jackd -r -d alsa -r 44100
jackdmp 1.9.12
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2016 Grame.
Copyright 2016-2017 Filipe Coelho.
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 non-realtime mode
self-connect-mode is "Don't restrict self connect requests"
audio_reservation_init
Acquire audio card Audio0
creating alsa driver ... hw:0|hw:0|1024|2|44100|0|0|nomon|swmeter|-|32bit
ALSA: Cannot open PCM device alsa_pcm for capture. Falling back to playback-only mode
configuring for 44100Hz, period = 1024 frames (23.2 ms), buffer = 2 periods
ALSA: final selected sample format for playback: 16bit little-endian
ALSA: use 2 periods for playback
Jack main caught signal 2
Released audio card Audio0
audio_reservation_finish

but once I try to run it via systemd, I get

Failed to connect to session bus for device reservation: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
To bypass device reservation via session bus, set JACK_NO_AUDIO_RESERVATION=1 prior to starting jackd.

just like if jack server needed the X server to be running

here is my systemd startup script:

pi@raspberrypi:~ $ cat /etc/systemd/system/jackd.service
[Unit]
Description=Jack audio server 

[Install]
WantedBy=multi-user.target

[Service]
Type=simple
PrivateTmp=true
ExecStart=/usr/bin/jackd -r -d alsa -r 44100
  • I tried exporting JACK_NO_AUDIO_RESERVATION=1 before running sudo systemctl start jackd
  • I tried to find the answer on google or a tutorial, but nobody as done this before apparently

how do I run jack audio server at startup with systemd ?

thanks for the time you'll spent on this question

9
  • 1
    Have you try to set variable in your unit file : [Service] Environment="JACK_NO_AUDIO_RESERVATION=1" ? followed by your other conf ExecStart=/usr/bin/jackd -r -d alsa -r 44100
    – Ephemeral
    May 8 '20 at 11:57
  • yes,indeed jack is running, now I need to figure why qjackctl does not see it running May 8 '20 at 12:01
  • qjackctl is a graphical interface ? The X server is require I think. Try to set Environment="Display...." variable in this case ?
    – Ephemeral
    May 8 '20 at 12:05
  • no I mean, jack is running now (from systemd config) but qjackctl does not find it running "Cannot connect to server socket err = No such file or directory" May 8 '20 at 12:08
  • Maybe try to search command line option for /usr/bin/jackd and socket listening or check qjackctl parameters.
    – Ephemeral
    May 8 '20 at 12:24
4

Thanks to Ephemeral

here is the answer:

to disable the X dependency issue, I added environment="JACK_NO_AUDIO_RESERVATION=1" in the systemd config

pi@raspberrypi:~ $ cat /etc/systemd/system/jackd.service
[Unit]
Description=Jack audio server 

[Install]
WantedBy=multi-user.target

[Service]
Type=simple
PrivateTmp=true
Environment="JACK_NO_AUDIO_RESERVATION=1"
ExecStart=/usr/bin/jackd -r -d alsa -r 44100
0

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.