Personal tools

Configuring Jack with Pulseaudio on Linux Mint 21

From Rivendell Wiki

Revision as of 05:41, 11 February 2024 by Ltyndale (Talk | contribs) (Created page with "This information was supplied by Luigino Bracci Roa via the Rivendell Open Source Automation Users Facebook Forum. === Steps to install Rivendell 4 with JACK and Pulseaudio i...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This information was supplied by Luigino Bracci Roa via the Rivendell Open Source Automation Users Facebook Forum.

Steps to install Rivendell 4 with JACK and Pulseaudio in Linuxmint 21 Mate (Ubuntu 22.04-based)

- Install Linuxmint 21 Mate

- Update packages (sudo apt update && sudo apt upgrade)

- Install KXStudio repositories following steps in https://kx.studio/Repositories

   sudo apt update
   sudo apt install kxstudio-default-settings cadence jackd2 pulseaudio-module-jack linux-image-lowlatency catia

- Add your user to the "audio" group (sudo adduser <username> audio)

- Run Cadence. Click on Configure, then click on Driver, choose ALSA, choose in Device/Interface your sound card or sound device. Configure other parameters and click OK.

- In JACK Bridges / Alsa Audio, choose in Bridge type: ALSA -> Pulseaudio- JACK

- In Pulseaudio, turn on "Auto-start at login"

- Do NOT turn on the option "Auto-start JACK or LADISH at login"

- Reboot

- Install Rivendell 4 following steps in https://software.paravelsystems.com/howtos/ubuntu/jammy/ (starting in "Running installation script")

- Add current user to the group "rivendell" (sudo adduser <username> rivendell)

- Run "sudo systemctl disable rivendell.service" (we don't want Rivendell to start automaticaly as a service whern the system boots, we need to start it after JACK is running)

- Let's disable Pulseaudio so it don't run at startup:

 systemctl --user disable pulseaudio.service
 systemctl --user disable pulseaudio.socket
 sudo systemctl --global disable pulseaudio.service
 sudo systemctl --global disable pulseaudio.socket

- As root, create a file /etc/sudoers.d/rivendell with this content (replace "username" with your user):

   username ALL=(ALL) NOPASSWD: /usr/bin/systemctl restart rivendell.service
   username ALL=(ALL) NOPASSWD: /usr/bin/systemctl start rivendell.service
   username ALL=(ALL) NOPASSWD: /usr/bin/systemctl stop rivendell.service

I'm making this so a regular user can start or stop Rivendell without being root.

- Let's make a script to start JACK, and then Rivendell, in the appropiate order. First, create a ~/Scripts forder and then, create an script "start-rivendell.sh" with the following content:

 #!/bin/sh
 notify-send "Please wait while starting audio services..."
 cadence-session-start -s
 sudo systemctl start rivendell.service
 sleep 3
 notify-send "Audio services started!"

- You can place in the script other needed commands... I also place there a "mount /var/snd" for my workstations.

- Give exec permissions to the script (chmod +x ~/Scripts/start-rivendell.sh)

- In the Linuxmint menu, find the "Startup Applications" applet. Add the script "/home/<username>/Scripts/start-rivendell.sh" (use the full path, change <username> as appropiate).

- Remove any other Cadence startup script in Startup Applications.

- Reboot.

- Configure the host in rdadmin (in "Manage hosts", add your host computer, verify that JACK is show in Audio Resources, then configure the cards and ports as appropiate)

- In this point you can reboot your server and, after logged in, and after receiving the "Audio services started" message, you can check with catia or other patchbay, and Rivendell should be running in JACK.

- You can use the jack_connect command (placing it in the start-rivendell.sh script) to automatically connect Rivendell with the system ins and outs in JACK. Or you can place this in /etc/rd.conf:

   [JackSession]
   Source1=rivendell_1:playout_0L
   Destination1=system:playback_1
   Source2=rivendell_1:playout_0R
   Destination2=system:playback_2
   Source3=rivendell_1:playout_1L
   Destination3=system:playback_3
   Source4=rivendell_1:playout_1R
   Destination4=system:playback_4
   ...etc.

- If you get any problem with rdlibrary uploading or listening carts, it's probable you have troubles with the rdxport.cgi permissions. I've solved it with this commands:

 sudo chown root:root /var/www/rd-bin/rdxport.cgi
 sudo chmod 4755 /var/www/rd-bin/rdxport.cgi