<div dir="ltr"><div dir="ltr"><div>Hey Mantas and others,</div><div dir="ltr"><br></div><div dir="ltr">On Thu, May 9, 2019 at 11:57 PM Mantas Mikulėnas <<a href="mailto:grawity@gmail.com">grawity@gmail.com</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">On Fri, May 10, 2019 at 5:22 AM Matt Zagrabelny <<a href="mailto:mzagrabe@d.umn.edu" target="_blank">mzagrabe@d.umn.edu</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr">Greetings,<div><br></div><div>I am attempting to get a user service running on my session login.</div><div><br></div><div>The unit is called jack. I've enabled it via:</div><div><br></div><div>$ systemctl --user enable jack</div><div><br></div><div>When I boot up the system and log in I see that it is inactive. I can start it manually without issue:</div><div><br></div><div><div>$ systemctl --user status jack</div><div>● jack.service - JACK 2</div><div>   Loaded: loaded (/home/theophilus/.config/systemd/user/jack.service; enabled; vendor preset: enabled)             </div><div>   Active: inactive (dead)</div><div><br></div><div>$ journalctl --user -u jack -b</div><div>-- Logs begin at Thu 2019-05-09 20:54:31 CDT, end at Thu 2019-05-09 21:13:53 CDT. --                                </div><div>-- No entries --</div><div><br></div><div>$ systemctl --user cat jack</div><div># /home/theophilus/.config/systemd/user/jack.service</div><div>[Unit]</div><div>Description=JACK 2</div><div>Before=sound.target</div><div>Before=pulseaudio.service</div><div>Requires=dbus.socket</div><div><br></div><div>[Service]</div><div>Type=dbus</div><div>BusName=org.jackaudio.Controller</div></div></div></div></blockquote><div><br></div><div>Among other things, the bus name seems to be incorrect. In jack2-dbus the only claimed name appears to be "org.jackaudio.service".</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div><div>ExecStart=/usr/bin/jack_control start</div></div></div></div></blockquote><div><br></div><div>The jack_control program does not spawn nor directly execute the actual jackd daemon. Instead it *remotely* activates org.jackaudio.service through D-Bus (you'll see jackdbus under the dbus.service cgroup), then sends it a single method call and exits.</div><div><br></div><div>In other words, jack_control is not a Type=dbus service, it's a oneshot script that controls another Type=dbus service. You can imagine that it's just a wrapper around `dbus-send` or `gdbus call`, and is something you'd instead use in JACK's *ExecStartPost=*.</div><div><br></div><div>A direct conversion of jackdbus to a systemd service would look like this – because of the way jackdbus is written, it always needs that extra command to be sent over D-Bus (either by running `jack_control start` or by using the manual tools):</div><div><br></div><div>(~/.config/systemd/user/jack.service)</div><div>[Service]</div><div>Type=dbus</div><div>BusName=org.jackaudio.service</div><div>ExecStart=/usr/bin/jackdbus auto</div><div>#ExecStartPost=/usr/bin/jack_control start<br></div><div>#ExecStartPost=/usr/bin/gdbus call -e -d org.jackaudio.service -o /org/jackaudio/Controller -m org.jackaudio.JackControl.StartServer</div><div>ExecStartPost=/usr/bin/busctl call --user org.jackaudio.service /org/jackaudio/Controller org.jackaudio.JackControl StartServer</div><div><br></div></div></div></div></div></div></div></div></div></div></blockquote><div><br></div><div>I used this service file (thank you for providing it!), but it seems jack is still not starting when the user logs in to the session:</div><div><br></div><div><div>$ systemctl --user status jack</div><div>● jack.service</div><div>   Loaded: loaded (/home/theophilus/.config/systemd/user/jack.service; enabled; vendor preset: enabled)</div><div>   Active: inactive (dead)</div><div><br></div><div>$ ps -ef | grep jack</div><div>theophi+  1200  1183  0 09:30 pts/3    00:00:00 grep jack</div><div><br></div><div>$ systemctl --user status jack</div><div>● jack.service</div><div>   Loaded: loaded (/home/theophilus/.config/systemd/user/jack.service; enabled; vendor preset: enabled)</div><div>   Active: inactive (dead)</div><div><br></div><div>$ systemctl --user cat jack</div><div># /home/theophilus/.config/systemd/user/jack.service</div><div>[Service]</div><div>Type=dbus</div><div>BusName=org.jackaudio.service</div><div>ExecStart=/usr/bin/jackdbus auto</div><div>#ExecStartPost=/usr/bin/jack_control start</div><div>#ExecStartPost=/usr/bin/gdbus call -e -d org.jackaudio.service -o /org/jackaudio/Controller -m org.jackaudio.JackControl.StartServer</div><div>ExecStartPost=/usr/bin/busctl call --user org.jackaudio.service /org/jackaudio/Controller org.jackaudio.JackControl StartServer</div><div><br></div><div>$ systemctl --user is-enabled jack</div><div>enabled</div><div><br></div><div>$ systemctl --user is-active jack</div><div>inactive</div><div><br></div><div>$ systemctl --user | grep jack</div><div><br></div><div>$ systemctl --user | grep bus</div><div>at-spi-dbus-bus.service                                                                               loaded active running   Accessibility services bus</div><div>dbus.service                                                                                          loaded active running   D-Bus User Message Bus</div><div>dbus.socket                                                                                           loaded active running   D-Bus User Message Bus Socket</div></div><div><br></div><div>If I start ardour (which makes use of jack) it (ardour) tells me jack is not running.</div><div><br></div><div>I can start the jack service:</div><div><br></div><div>$ systemctl --user start jack</div><div><br></div><div>So...</div><div><br></div><div>How can I figure out why it is not starting automatically?</div><div><br></div><div>Thanks!</div><div><br></div><div>-m</div></div></div></div>