How to set pipewire-jack as an audio backend for firefox?

I installed pipewire, wireplumber, jackit
and pipewire-spa-oss-ng. Then I run
pipewire &
pipewire -c jack.conf &
and set media.cubeb.backend=jack in firefox, but no audio.
There is audio when running pipewire -c pipewire-pulse.conf and setting pulse-rust in firefox.
 
Maybe depending on what DE / WM you're using, but if pulseaudio is installed, at least Mate forcibly start it regardless it's in autostart or not, and it avoids pipewire to work.

This would be the first thing to confirm before coping with jack on pipewire.

To avoid the behavior, I've omitted pulseaudio from autostart (to be paranoid) and did what Kevin suggests here, with additional modification I've posted here. Note that this is just a workaround, not a fix.

Putting desktop file and jack aside, the script with my addition is like below.
sh:
#!/bin/sh

if [ -z "$XDG_RUNTIME_DIR" ]; then
    export XDG_RUNTIME_DIR="/var/run/user/$(id -u)"
    mkdir -p "$XDG_RUNTIME_DIR"
    chmod 700 "$XDG_RUNTIME_DIR"
fi

pgrep -U "$(id -u)" -x pulseaudio >/dev/null && killall pulseaudio
sleep 5

pgrep -U "$(id -u)" -x pipewire >/dev/null || pipewire &
sleep 1
pgrep -U "$(id -u)" -x wireplumber >/dev/null || wireplumber &
pgrep -U "$(id -u)" -x pipewire-pulse >/dev/null || pipewire-pulse &
 
Pipewire with jack emu didn't work for me on FreeBSD recently. Can't recall details right now, might post more next week.

I recommend a real jackd with pulseaudio on top of jack for those applications that don't do jack.
 
Back
Top