I tried it, no luck yet. If it informs other solutions, the way I manually start jack that directs audio to bluetooth is:
exec /usr/bin/jackd -r -d alsa -P bluealsa -n 3 -S -o 2 -X seq
So to try to automate this, I modified /etc/jackdrc, replacing
exec /usr/bin/jackd -t 2000 -R -P 95 -d alsa -d hw:ALSA -r 44100 -p 512 -n 3 -X seq -s -S
with
exec /usr/bin/jackd -r -d alsa -P bluealsa -n 3 -S -o 2 -X seq
*I realize I omitted realtime options. I don’t need them for my (plant generated music) project. That allowed me to have zero xruns with Carla instruments. So with the jack service start, I will have to explore how to make sure bluealsa runs first, or where I can put a connecting command to initiate the speaker connection, before jack runs.
jackdrc contents:
#!/bin/sh
#exec is used to ‘morph’ the shell interpreter process into jackd process, saving some system resources.
exec /usr/bin/jackd -r -d alsa -P bluealsa -n 3 -S -o 2 -X seq
#Original one here - out of box patchbox
#exec /usr/bin/jackd -t 2000 -R -P 95 -d alsa -d hw:ALSA -r 44100 -p 512 -n 3 -X seq -s -S
Loaded: loaded (/etc/systemd/system/jack.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sun 2021-10-10 10:09:47 CDT; 8min ago
Process: 425 ExecStart=/etc/jackdrc (code=exited, status=255/EXCEPTION)
Main PID: 425 (code=exited, status=255/EXCEPTION)
Results of sudo systemctl status jack.service:
Oct 10 10:09:47 patchbox jackdrc[425]: ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'defaults.bluealsa.device
Oct 10 10:09:47 patchbox jackdrc[425]: ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_refer returned error: No such f
Oct 10 10:09:47 patchbox jackdrc[425]: ALSA lib conf.c:5036:(snd_config_expand) Args evaluate error: No such file or directory
Oct 10 10:09:47 patchbox jackdrc[425]: ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM bluealsa
Oct 10 10:09:47 patchbox jackdrc[425]: ALSA: Cannot open PCM device alsa_pcm for playback. Falling back to capture-only mode
Oct 10 10:09:47 patchbox jackdrc[425]: Cannot initialize driver
Oct 10 10:09:47 patchbox jackdrc[425]: JackServer::Open failed with -1
Oct 10 10:09:47 patchbox jackdrc[425]: Failed to open server
Oct 10 10:09:47 patchbox systemd[1]: jack.service: Main process exited, code=exited, status=255/EXCEPTION
Oct 10 10:09:47 patchbox systemd[1]: jack.service: Failed with result ‘exit-code’.
I do not get these errors when I run the command manually from the desktop/patch user session.