-
-
Save Overemployed/f30db915ac5dcb0b3d17ea1b6310e5f2 to your computer and use it in GitHub Desktop.
#!/bin/bash | |
# Check if script is running as root | |
if [ "$EUID" -ne 0 ] | |
then echo "Please run as root" | |
exit | |
fi | |
# your personal machine running jacktrip | |
REMOTE_JACK_SERVER=nat.local | |
# change to any name to identify this jacktrip client | |
JOB_NAME=J1 | |
BUFFER_SIZE=1024 | |
# -d hw:1,0 for pikvm v3 hat | |
# -d hw:0,0 for others | |
AUDIO_DEVICE=-d hw:1,0 | |
pacman -Syu | |
pacman -S --needed jack2 jacktrip njconnect jack-example-tools | |
# Checking if user 'jacktrip' already exists | |
if id "jacktrip" &>/dev/null; then | |
echo "User 'jacktrip' already exists. Skipping user creation." | |
else | |
useradd -M -r jacktrip -G audio | |
fi | |
cat > /etc/systemd/system/jack.conf <<EOF | |
JACK_NO_AUDIO_RESERVATION=1 | |
JACK_OPTS=-d alsa $AUDIO_DEVICE -r 44100 -p $BUFFER_SIZE | |
JACKTRIP_OPTS=-C $REMOTE_JACK_SERVER -n 1 --remotename $JOB_NAME | |
EOF | |
cat > /etc/systemd/system/jackd.service <<EOF | |
[Unit] | |
Description=jackd | |
After=sound.target | |
[Service] | |
User=jacktrip | |
Type=simple | |
LimitRTPRIO=infinity | |
LimitMEMLOCK=infinity | |
LimitRTTIME=infinity | |
EnvironmentFile=/etc/systemd/system/jack.conf | |
ExecStart=/usr/bin/jackd \$JACK_OPTS | |
Restart=always | |
RestartSec=2s | |
[Install] | |
WantedBy=multi-user.target | |
EOF | |
cat > /etc/systemd/system/jacktrip.service <<EOF | |
[Unit] | |
Description=jacktrip | |
Requires=jackd.service | |
After=network.target jackd.service | |
[Service] | |
User=jacktrip | |
Type=simple | |
LimitRTPRIO=infinity | |
LimitMEMLOCK=infinity | |
LimitRTTIME=infinity | |
EnvironmentFile=/etc/systemd/system/jack.conf | |
ExecStartPre=jack_wait -w -t 5 | |
ExecStart=/usr/bin/jacktrip \$JACKTRIP_OPTS | |
Restart=always | |
RestartSec=2s | |
[Install] | |
WantedBy=multi-user.target | |
EOF | |
systemctl daemon-reload | |
systemctl enable jackd.service | |
systemctl enable jacktrip.service | |
systemctl start jackd.service | |
systemctl start jacktrip.service |
anthonyolanre
commented
Dec 24, 2023
via email
I'm getting the same issue. @josephum have you found a solution? I had to uninstall jacktrip to get sound back to my pikvm through HDMI, but now I can't use jacktrip.
Try to uninstall all the jack/jacktrip packages first: pacman -Rscnd jack2 jacktrip njconnect jack-example-tools
Then go to package cache to rollback with the packages that worked before: cd /var/cache/pacman/pkg/ pacman -U file:///rtaudio-5.2.0-2-armv7h.pkg.tar.xz pacman -U file:///xdg-utils-1.1.3+45+g301a1a4-1-any.pkg.tar.xz pacman -U file:///jacktrip-1:1.9.0-1-armv7h.pkg.tar.xz pacman -U file:///jack2-1.9.22-1-armv7h.pkg.tar.xz pacman -U file:///njconnect-1.6-3-armv7h.pkg.tar.xz pacman -U file:///jack-example-tools-4-1-armv7h.pkg.tar.xz
Works here!
Thank you, this seemed to solve my issue!
Note: There was an issue installing the jacktrip package, so I had to dig into this archive you provided: http://tardis.tiny-vps.com/aarm/repos/2023/11/01/armv7h/extra/ and manually installed all the dependencies it needed before I could successfully install the older version of jacktrip. This process looked something like this:
1. Find a dependency that I'm missing:
wget http://tardis.tiny-vps.com/aarm/repos/2023/11/01/armv7h/extra/qt5-base-5.15.11+kde+r138-1-armv7h.pkg.tar.xz
2. Install dependency after the download is complete:
sudo pacman -U qt5-base-5.15.11+kde+r138-1-armv7h.pkg.tar.xz
This can look entirely different for you depending on the dependencies it's asking you to install. Once I've installed all the dependencies (even the dependencies that my jacktrip dependencies needed)... I then attempted to reinstall the jacktrip package.
Appreciate you, @josephum for providing that archive.
I hope this helps someone else as well.
I did all of the above, services are enable and I have a connection from peer, I can also connect the inputs and outputs through qjackctl on my macbook.
BUT, I had zero sound coming through, neither in nor output.
I finally figured it out: With my PiKVM v4 I needed to set the AUDIO_DEVICE setting in the jack.conf:
AUDIO_DEVICE=-d hw:1,0 to AUDIO_DEVICE=-d hw:0,0 <-- 0,0 instead 1,0
is anybody having a problem with echo? People in the meetings keep hearing what they are saying. What could cause this
Hello please I need your put on this anyone. I observe that the Jacktrip is doing one way audio like the hdmi is only had sound output no input I have a Pikvm 3 and this happened after I moved the Pikvm from one location to another. I flashed the OS of the Pikvm and still did not get any solution @Overemployed @overemployedswe @josephum I don’t know if anyone has experienced this or if there is anything I can do.