Should media-sound/pipewire[jack] satisfy virtual/jack? I would like to use Catia (media-sound/cadence) with PipeWire as suggested here: https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/543#note_845943 As I understand it, I do not need the original JACK server to do that. I assume that if bug #777408 was solved and media-sound/pipewire[jack] would satisfy virtual/jack, I could do what Wim Taymans suggests in that PipeWire issue.
Pipewire does not ship its own jack server, instead it uses media-sound/jack2, which is pulled in as a dependency with media-sound/pipewire[jack].
(In reply to Emily Rowlands from comment #1) > Pipewire does not ship its own jack server, instead it uses > media-sound/jack2, which is pulled in as a dependency with > media-sound/pipewire[jack]. So how would setting up "loopback" with Catia (from media-sound/cadence) work with PipeWire? (cf. https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/543#note_845943) Would that not use PipeWire at all? I thought the whole idea was that PipeWire replaces the JACK client libraries and makes them connect to PipeWire instead.
Pipewire can either be run as a JACK2 client (likely because it requires jackdbus but I haven't checked for sure) or it can attempt to replace JACK 1/2 by having its alternative libraries loaded before the traditional ones. That way applications linked against libjack.so and related libraries think that the jackd (and from what I can tell in the future jackdbus, too) is running and that they are free to make their native JACK API calls when in fact they are talking to the pipewire daemon. Currently PipeWire implements enough of the JACK2 API that it's possible to run pw-jack catia and do routing for not just JACK but also PulseAudio and ALSA applications as if they were native JACK clients. To do this with version 0.3.22 and older one just needs media-video/pipewire built with the jack USE flag, while for 0.3.24, if my pull request gets merged, pipewire-jack USE flag will be used instead with jack USE flag having been split out for the aforementioned JACK2 client capability. As for virtual/jack, patience young Padawan, patience. ;) For now you need either JACK or JACK2 installed to provide at least the headers to build your JACK applications against. Furthermore, I have not yet gotten to testing applications built against JACK 1 running under pw-jack - the API should be the same apart from lacking jackdbus but I can't rule out surprises, so JACK2 is the safer bet.
Oh, and if you have trouble starting pw-jack catia, make sure that media-sound/cadence was built with the a2jmidid USE flag enabled - the Python code behind Catia refuses to start otherwise.
(In reply to Niklāvs Koļesņikovs from comment #3) > As for virtual/jack, patience young Padawan, patience. ;) Haha :) OK, I will try. :) Thank you so much, Niklāvs! I got it to work and it was not even difficult. :) I installed media-video/pipewire[jack], put "media-sound/jack2-1" into /etc/portage/profile/package.provided, force-unmerged (-C) media-sound/jack2, installed media-sound/jack-audio-connection-kit and was able to emerge media-sound/cadence (and a2jmidid and jack_capture as its dependencies) successfully. I disabled, masked and stopped pulseaudio.service and pulseaudio.socket, unmasked and enabled pipewire-pulse.socket and pipewire.socket. I started a YouTube video (for audio output) and a Whereby video chat (for audio input) in Firefox. I ran `pw-jack catia` [1] and added wires from `monitor_FL` and `monitor_FR` of my sound car to `input_FL` and `input_FR` of Firefox. Both input from my microphone as well as the output of the YouTube video where registered by Whereby as input. [1]: Without it Catia would try to connect to /dev/shm/jack-1000/default/jack_0 and fail, because no actual JACK server is running, even though `/etc/ld.so.conf.d/99pipewire-jack-x86_64.conf` contains `/usr/lib64/pipewire-0.3/jack/`. Possibly because libjack.so.0 from jack-audio-connection-kit appears earlier in the search path: ❯ ldconfig -p | rg libjack libjackserver.so.0 (libc6,x86-64) => /usr/lib64/libjackserver.so.0 libjackserver.so.0 (libc6,x86-64) => /usr/lib64/pipewire-0.3/jack/libjackserver.so.0 libjackserver.so (libc6,x86-64) => /usr/lib64/libjackserver.so libjackserver.so (libc6,x86-64) => /usr/lib64/pipewire-0.3/jack/libjackserver.so libjacknet.so.0 (libc6,x86-64) => /usr/lib64/pipewire-0.3/jack/libjacknet.so.0 libjacknet.so (libc6,x86-64) => /usr/lib64/pipewire-0.3/jack/libjacknet.so libjack.so.0 (libc6,x86-64) => /usr/lib64/libjack.so.0 libjack.so.0 (libc6,x86-64) => /usr/lib64/pipewire-0.3/jack/libjack.so.0 libjack.so (libc6,x86-64) => /usr/lib64/libjack.so libjack.so (libc6,x86-64) => /usr/lib64/pipewire-0.3/jack/libjack.so Portage 3.0.17 (python 3.8.8-final-0, default/linux/amd64/17.1/desktop/plasma/systemd, gcc-10.2.0, glibc-2.32-r8, 5.11.7 x86_64) ================================================================= System Settings ================================================================= System uname: Linux-5.11.7-x86_64-AMD_Ryzen_5_2400G_with_Radeon_Vega_Graphics-with-glibc2.2.5 KiB Mem: 14190276 total, 3407076 free KiB Swap: 16777212 total, 14124208 free Timestamp of repository gentoo: Sun, 21 Mar 2021 08:15:01 +0000 Head commit of repository gentoo: 58b7e923678d444c1995f90de45d8fea7c124325 Timestamp of repository haskell: Sun, 21 Mar 2021 00:51:00 +0000 Head commit of repository haskell: a095bb93972948112ef6daae454908f6021880c3 Head commit of repository local: 8ec9d2140e17eb3bf799c01b5855456daa272908 sh bash 5.1_p4 ld GNU gold (Gentoo 2.35.2 p1 2.35.2) 1.16 ccache version 4.2 [disabled] app-shells/bash: 5.1_p4::gentoo dev-java/java-config: 2.3.1::gentoo dev-lang/perl: 5.32.1::gentoo dev-lang/python: 2.7.18_p7::gentoo, 3.8.8::gentoo, 3.9.2::gentoo dev-util/ccache: 4.2::gentoo dev-util/cmake: 3.19.7::gentoo dev-util/pkgconfig: 0.29.2::gentoo sys-apps/baselayout: 2.7-r1::gentoo sys-apps/sandbox: 2.21::gentoo sys-devel/autoconf: 2.13-r1::gentoo, 2.71::gentoo sys-devel/automake: 1.13.4-r2::gentoo, 1.16.3-r1::gentoo sys-devel/binutils: 2.35.2::gentoo sys-devel/gcc: 10.2.0-r5::gentoo sys-devel/gcc-config: 2.4::gentoo sys-devel/libtool: 2.4.6-r6::gentoo sys-devel/make: 4.3::gentoo sys-kernel/linux-headers: 5.11::gentoo (virtual/os-headers) sys-libs/glibc: 2.32-r8::gentoo Repositories: gentoo location: /var/cache/portage/gentoo sync-type: rsync sync-uri: rsync://rsync.de.gentoo.org/gentoo-portage priority: -1000 sync-rsync-verify-jobs: 1 sync-rsync-extra-opts: --new-compress sync-rsync-verify-metamanifest: yes sync-rsync-verify-max-age: 24 haskell location: /var/db/repos/haskell sync-type: git sync-uri: https://github.com/gentoo-mirror/haskell.git masters: gentoo crossdev location: /var/cache/portage/crossdev masters: gentoo priority: 100 local location: /var/cache/portage/local sync-type: git sync-uri: https://github.com/devurandom/gentoo-overlay.git masters: gentoo priority: 1000 ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="@FREE" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-pipe -O2 -march=znver1" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /etc/grs/systems.conf /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.6/conf" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php8.0/ext-active/ /etc/php/cgi-php8.0/ext-active/ /etc/php/cli-php8.0/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c" CXXFLAGS="-pipe -O2 -march=znver1" DISTDIR="/var/cache/portage/distfiles" EMERGE_DEFAULT_OPTS="--nospinner" ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildsyspkg cgroup compressdebug config-protect-if-modified distlocks ebuild-locks fakeroot fixlafiles ipc-sandbox merge-sync mount-sandbox multilib-strict network-sandbox news parallel-fetch parallel-install pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://ftp.spline.inf.fu-berlin.de/mirrors/gentoo/ http://ftp-stud.hs-esslingen.de/pub/Mirrors/gentoo/ http://distfiles.gentoo.org" LANG="en_GB.utf8" LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu" MAKEOPTS="-j6 -l4" PKGDIR="/var/cache/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_EXTRA_OPTS="--new-compress" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git" PORTAGE_TMPDIR="/tmp" USE="7z 7zip X a52 aac aacplus aacs acl acpi activities aio alsa amd64 amr appindicator appstream archive audit avahi avif ayatana bdplus berkdb blake2 blas bluetooth bluray bpf branding brotli bs2b btrfs bzip2 cairo caps cdda cddb cdio cdr celt cet chromaprint cjk cli clipboard color-management colord conntrack crypt cups curl d3d9 dav1d dbus declarative device-mapper dirac djvu dmabuf dri drm dts dvb dvd dvdr ed25519 editorconfig egl elf emboss emoji encode epub evdev exif faudio fax fdk ffmpeg fftw filecaps firefox firewalld fish-completion fits flac fontconfig fontforge fortran fribidi gamepad gbm gdal gdbm geoclue geolocation gif git gles2 gles3 gmp gnome-online-accounts gnupg google googledrive gpg gps graphicsmagick gstreamer gtk gtk3 gui gzip harfbuzz hdf5 heif http2 ibus iconv icu id3tag idn imlib inotify introspection ipv6 iwd jemalloc jpeg jpeg2k json kde kipi kms kwallet lapack latex lcms libatomic libglvnd libidn2 libinput libnotify libproxy libsecret libsoxr libtirpc libvirt lm-sensors lrz lv2 lvm lz4 lzma lzo mad magic man mariadb markdown mbim mercurial mjpeg mng mobi modemmanager modplug mp3 mp4 mpeg mplayer mpris mtp multilib mysql ncurses netlink networkmanager nftables nls nptl numa office ofono ofx ogg openal opencl opencv openexr opengl openh264 openmax openmp opus pam pango pcap pch pcre pcre2 pdf pgo phonon pixman pkcs11 pkcs7 plasma pm-utils png policykit postscript ppds prison pulseaudio pwquality python qml qrcode qt5 rav1e raw rdp readline rtmp rubberband samba sasl scanner schroedinger screencast sctp sdl sdl2 seatd seccomp semantic-desktop share smartcard snappy sparse speech speex spell spice srt ssl startup-notification steamruntime stemmer svg systemd tbb tcpd teamd telemetry telepathy tga theora threads thunderbolt tiff timezone tmux truetype udev udisks uinput unicode unwind upnp upnp-av upower usb utempter v4l v4l2 vaapi vamp vdpau vkd3d vorbis vpx vulkan wasm wavpack wayland webchannel webengine webp widgets wireguard wmf woff2 wps x264 x265 xattr xcb xinerama xkb xml xmp xrandr xscreensaver xv xvid xwayland xxhash xz yaml zeroconf zeromq zimg zlib zstd" ABI_X86="64" ADA_TARGET="gnat_2018" ALSA_CARDS="hda-intel" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt rdrand sha sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3" ELIBC="glibc" ENLIGHTENMENT_MODULES="*" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="joystick libinput" KERNEL="linux" L10N="de de-DE en en-GB ar fa tr ja ko zh zh-CN zh-TW" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="nlpsolver scripting-javascript wiki-publisher" LIRC_DEVICES="devinput" LLVM_TARGETS="AMDGPU BPF RISCV WebAssembly" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1 lua5-4 luajit" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-3 php7-4" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_8" PYTHON_TARGETS="python3_8 pypy pypy3" QEMU_SOFTMMU_TARGETS="riscv32 riscv64 x86_64" QEMU_USER_TARGETS="riscv32 riscv64" RUBY_TARGETS="ruby26" USERLAND="GNU" VIDEO_CARDS="amdgpu virgl" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS ================================================================= Package Settings ================================================================= media-sound/jack-audio-connection-kit-0.125.0-r1::gentoo was built with the following: USE="alsa pam (-altivec) (-coreaudio) -debug -doc -examples -oss" ABI_X86="(64) -32 (-x32)" CPU_FLAGS_X86="sse -3dnow" media-video/pipewire-0.3.22::gentoo was built with the following: USE="X bluetooth ffmpeg gstreamer jack sdl systemd vulkan -debug -doc -sndfile -test" ABI_X86="(64)" FEATURES="multilib-strict unknown-features-warn userfetch binpkg-dostrip protect-owned sfperms binpkg-logs compressdebug parallel-install assume-digests ipc-sandbox fakeroot distlocks cgroup ebuild-locks news pid-sandbox mount-sandbox usersandbox xattr sandbox network-sandbox unmerge-logs usersync config-protect-if-modified merge-sync strict buildsyspkg fixlafiles userpriv binpkg-docompress parallel-fetch binpkg-multi-instance preserve-libs qa-unresolved-soname-deps unmerge-orphans" media-sound/cadence-0.9.1::gentoo was built with the following: USE="a2jmidid opengl -pulseaudio" ABI_X86="(64)" PYTHON_SINGLE_TARGET="python3_8 -python3_7 -python3_9"
I'm glad to hear pw-jack loader is working for you now. I did try to repeat the procedure you described (which, I believe, is the same as described by the INSTALL.md file) and on my system it worked flawlessly. I have asked Gentoo developers if they might have an idea on why system libraries would get preferred over the PATH listed in an override but I haven't received an answer yet, so I can only speculate that perhaps your system has some additional ld.so.conf.d files that happen to put JACK 1 libraries before PW's. I should clarify that I'm using JACK 2 to test this but that's unlikely to be significant.
(In reply to Niklāvs Koļesņikovs from comment #6) > so I can only speculate that perhaps your > system has some additional ld.so.conf.d files that happen to put JACK 1 > libraries before PW's. Yes, indeed it does: ❯ for f in /etc/ld.so.conf.d/* echo === $f === cat $f end === /etc/ld.so.conf.d/05gcc-x86_64-pc-linux-gnu.conf === /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0 /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/32 === /etc/ld.so.conf.d/81-blas-lib64.conf === # Auto-generated by eselect::blas. DON'T EDIT. /usr/lib64 === /etc/ld.so.conf.d/82-lapack-lib64.conf === # Auto-generated by eselect::lapack. DON'T EDIT. /usr/lib64 === /etc/ld.so.conf.d/99pipewire-jack-x86_64.conf === /usr/lib64/pipewire-0.3/jack/ app-eselect/eselect-blas and app-eselect/eselect-lapack were removed from the system some time ago, but these files were apparently left behind. I removed them manually and ran `env-update`. Now `catia` executes fine without `pw-jack`. Thank you for your help!
Ping. PipeWire is now capable of being a replacement for JACK 1/2, headers and libraries included. My understanding is that not everything is implemented yet, with jackdbus side of things being the least finished but in my testing everything I'm using builds and runs against PipeWire's JACK implementation (available via jack-sdk IUSE for the pipewire-9999.ebuild in the draft PR). Then again I'm just a hobbyist and not an audio professional, so a tinderbox testing every virtual/jack reverse dependency may or may not uncover issues. Not to mention that just building does not mean it will function as intended, so real humans dog-fooding this would be most welcome. ;) I have in my PR for now made media-video/pipewire[jack-sdk] the last on the list of viable RDEPENDS inside virtual/jack. I hope this is acceptable? The PR in question: https://github.com/gentoo/gentoo/pull/20454
Oh, and the way I tested this was by emerging media-video/pipewire[jack-sdk], verifying that there were no broken reverse dependencies by running revdep-rebuild and then ran a selection of JACK applications built against JACK 2 to see that replacing had not broken anything. Then I rebuilt all virtual/jack reverse dependencies and repeated the testing with JACK applications that I use. Users of JACK 1 will likely encounter broken reverse dependencies and need to rebuild at least some of their JACK ecosystem.
this is now part of jack-2: media-video/pipewire[${MULTILIB_USEDEP},jack-sdk(-)] so i suppose this bug can be closed.