Commit 6e49f925 by PLN (Algolia)

fix(gig-up): SuperDirt starts under pw-jack, or it steals the card

open_term() launched sclang directly, bypassing parvagues-sc.service and its
10-pipewire-jack.conf drop-in. With jack2 installed, ldconfig hands scsynth the
real libjack, it finds no server and starts jackd on hw:sofsoundwire, which
takes the card from PipeWire by D-Bus reservation. Meters move, nothing is
audible (raw jackd -dalsa bypasses ALSA UCM, so the SOF speaker route is never
enabled), and Bluetooth cannot work at all since jackd has no BT backend.

Also adds tools/parvagues.desktop so the ordered launcher is one Super-key away;
nothing had ever been installed in ~/.local/share/applications.
parent bf90f377
...@@ -4,6 +4,46 @@ Sprint entries, newest first. Player-facing: what changed about *playing*, not ...@@ -4,6 +4,46 @@ Sprint entries, newest first. Player-facing: what changed about *playing*, not
about the code. Task IDs reference the L'Armada board; `n/a` where the work was about the code. Task IDs reference the L'Armada board; `n/a` where the work was
unplanned (which, on a gig night, is most of it). unplanned (which, on a gig night, is most of it).
## Sprint 10 — 2026-09-11 (midday) · the second audio server, again
A launch started by hand ("I opened Ardour and Pulsar and ran sclang myself")
came up with meters moving and no sound at all. The cause was not Ardour: the
hand-started `sclang` linked jack2's REAL `libjack.so.0`, so scsynth found no
server, started its OWN `jackd -dalsa -Chw:sofsoundwire`, and took the card from
PipeWire by D-Bus reservation. The internal card then vanished from `pactl list
sinks` entirely, the default sink fell through to a Bluetooth headset, and raw
`jackd -dalsa` never enables the SOF codec's speaker route (it bypasses ALSA
UCM) — hence audible nothing behind healthy-looking meters.
### Fixed
- **`gig-up.sh` starts SuperDirt under `pw-jack`.** `open_term()` launched
`sclang` directly, so `parvagues-sc.service`'s `10-pipewire-jack.conf` drop-in
— which has been correct all along — never applied to the path gig-up actually
takes. Both branches (terminal and the no-terminal background fallback) are
wrapped now, matching what the Ardour launch has done since Sprint 1. On
Bluetooth this is not a nicety: jackd has no BT backend, so orbits outside
PipeWire can never reach a headset.
- **A stereo master that was mono into the right speaker.** Found mid-diagnosis
on the jackd graph: both `Master/audio_out 1` and `2` were connected to
`system:playback_2`. Not reproducible under PipeWire, where Ardour
auto-connects FL/FR correctly — recorded because the symptom (everything
present, half the field missing) reads as a room problem, not a patch problem.
### Added
- **`tools/parvagues.desktop`** — `Super` → "parvagues" → `Enter` runs `gig-up.sh`
in a held terminal, with actions for `--headphones`, `rig-doctor`, and the
tray. Nothing had been installed in `~/.local/share/applications`, so the
existing entries were invisible to the shell. It exists to make the ordered
launcher the path of least resistance — every by-hand start so far has
produced a second audio server.
### Known
- `tools/ardour-tidal-live.desktop` still says `Exec=ardour9`; this box only has
`ardour` (8.4.0), so that entry would fail if installed. `gig-up` is unaffected
(it tries `ardour ardour9 ardour8 Ardour` in order).
- Orbits 13-14 (`SC out_25..28`) have no Ardour tracks — 12 Tidal tracks exist.
Fine on the stage rig, audible only via the headphones fold.
## Sprint 9 — 2026-09-07 (evening) · the travel rig ## Sprint 9 — 2026-09-07 (evening) · the travel rig
A readiness question ("can we leave tomorrow and play on the trip?") found two A readiness question ("can we leave tomorrow and play on the trip?") found two
......
...@@ -180,13 +180,33 @@ pick_term(){ ...@@ -180,13 +180,33 @@ pick_term(){
open_term(){ # open a new terminal running the headless sclang gig-boot open_term(){ # open a new terminal running the headless sclang gig-boot
local term; term="$(pick_term)" local term; term="$(pick_term)"
# scsynth MUST get PipeWire's libjack shim, exactly as Ardour must (see the
# long note at the Ardour launch below). This box has jack2 installed, so
# ldconfig resolves libjack.so.0 to the REAL jackd2 one; scsynth then finds no
# server, STARTS a jackd on hw:sofsoundwire, and takes the card away from
# PipeWire by D-Bus reservation. The symptom is nasty because it is not
# silent-looking: Ardour's meters move, fold-orbits reports "no
# SuperCollider:out_* ports in the graph", the internal card disappears from
# `pactl list sinks` entirely, and nothing is audible — a raw jackd -dalsa
# also bypasses ALSA UCM, so the SOF codec's speaker route is never enabled.
# Bluetooth can never work at all this way: jackd has no BT backend, so the
# travel rig NEEDS the orbits inside PipeWire.
# parvagues-sc.service already gets this right via its 10-pipewire-jack.conf
# drop-in, but this function does not go through systemd, so the drop-in never
# applied here. Wrap with pw-jack when present (it only sets LD_LIBRARY_PATH).
local wrap=""
if command -v pw-jack >/dev/null 2>&1; then
wrap="pw-jack "
else
warn "pw-jack absent — SuperDirt may start its own jackd and steal the card."
fi
if [ -z "$term" ]; then if [ -z "$term" ]; then
warn "no terminal emulator found — running SuperDirt in the background (post → $DIR/gig-sclang.log)" warn "no terminal emulator found — running SuperDirt in the background (post → $DIR/gig-sclang.log)"
( cd "$DIR" && QT_QPA_PLATFORM=offscreen setsid sclang start_and_midi.scd >gig-sclang.log 2>&1 & ) ( cd "$DIR" && QT_QPA_PLATFORM=offscreen setsid ${wrap}sclang start_and_midi.scd >gig-sclang.log 2>&1 & )
return return
fi fi
# konsole/gnome-terminal want `-e`; most others accept it too. # konsole/gnome-terminal want `-e`; most others accept it too.
setsid "$term" -e bash -lc "cd '$DIR'; QT_QPA_PLATFORM=offscreen sclang start_and_midi.scd; exec bash" \ setsid "$term" -e bash -lc "cd '$DIR'; QT_QPA_PLATFORM=offscreen ${wrap}sclang start_and_midi.scd; exec bash" \
>/dev/null 2>&1 & >/dev/null 2>&1 &
} }
......
[Desktop Entry]
# The one launcher: Super -> "parvagues" -> Enter.
#
# It runs gig-up.sh, which is the ONLY correct way to bring the rig up — the
# order matters (SuperDirt must claim the LaunchControl before Ardour can, and
# fader-baseline can only restore in the Ardour-closed window). Starting the
# pieces by hand is how you get two audio servers: this box has jack2 installed,
# so a bare `sclang` or `ardour` links the REAL libjack, finds no server, starts
# its own jackd on hw:sofsoundwire, and takes the card away from PipeWire. The
# tell is cruel — Ardour's meters move and nothing is audible, because raw
# jackd -dalsa never enables the SOF codec's speaker route (no ALSA UCM), and
# Bluetooth cannot work at all (jackd has no BT backend).
#
# Terminal=false + an explicit kitty --hold instead of Terminal=true: GNOME's
# Terminal=true handler is not guaranteed to exist, and --hold keeps the boot log
# on screen, which is the log you actually want when a launch goes sideways.
Name=ParVagues
Comment=Bring the rig up in order — SuperDirt, Ardour (the mix), Pulsar
Exec=kitty --hold --title "ParVagues — gig up" /home/pln/Work/Sound/Tidal/gig-up.sh
Path=/home/pln/Work/Sound/Tidal
Icon=/home/pln/Work/Sound/Tidal/tools/tools.png
Terminal=false
Type=Application
Categories=AudioVideo;Audio;X-Jack;
Keywords=tidal;livecoding;superdirt;gig;rig;parvagues;
Actions=headphones;doctor;tray;
[Desktop Action headphones]
# Travel rig: no Ardour, no faders, no stems — all 14 orbits folded onto the
# default sink, which is what makes Bluetooth listening possible at all.
Name=Headphones (travel rig, all orbits to one sink)
Exec=kitty --hold --title "ParVagues — headphones" /home/pln/Work/Sound/Tidal/gig-up.sh --headphones
[Desktop Action doctor]
Name=Rig doctor (can this box play a set?)
Exec=kitty --hold --title "ParVagues — rig doctor" /home/pln/Work/Sound/Tidal/tools/rig-doctor.py
[Desktop Action tray]
Name=Gearbox tray
Exec=systemctl --user restart perf-tray.service
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment