It turned out that wireplumber was disabled due to my prior ALSA testing setup - after enabling that service, everything worked as described in the docs.
To test the docker setup, I logged in as user aura and repeated the installation. (I was surprised that liquidsoap and related ocaml-stuff needed to be downloaded and installed again for this user but it succeeded.)
I made sure to enable pipewire and wireplumber aura and to stop these services for the previous user, but the audio device couldn't be discovered:
I needed to install some components which were missing for user aura; but not sure if it was ocaml/liquidsoap by itself - I just repeated the installation procedure as dome before for user fro.
I think we need to execute the docker file with user aura because of the shared pipewire-file (?); otherwise we must adapt docker-compose.yaml. So pipewire must be started with this user too.
My first try was indeed to execute the docker container with my "regular" fro-user:
➜ engine-core git:(feat-jack-support) whofro pts/0 Jan 30 23:36 (fe80::8fd:2149:2c77:5a4b%enp3s0)➜ engine-core git:(feat-jack-support) docker compose up[+] Running 1/0 ✔ Container engine-core Created 0.0sAttaching to engine-coreengine-core | Auto connecting PipeWire ports...engine-core | Starting pw-jack...engine-core | Failed to connect to PipeWireengine-core exited with code 69➜ engine-core git:(feat-jack-support)
The reason might be the shared pipewire-file - this worked in the testing repo where I ran and shared fro's file. In the deployment, we're using the aura uid (docker-compose.yaml#64):
So I tried the same by logging in as aura and repeated the setup steps. Most packages were already installed, except ocaml/liquidsoap. But that was part of the dev setup and not required by docker.
I couldn't get the docker setup running neither as the fro-, nor aura-user.
As said, @Loxbie 's pw-jack test setup works if it's executed by the current user (1000) and I'm not sure how/if the shared pipewire socket file can be passed between fro and aura / the container in this scenario (or if there's a permission error I'm not aware of, etc.).
NB: I enabled/disabled pipewire, wireplumber and alsa-related stuff many times due to my prior testing, so I'm not sure if I broke something and if I ran into a special edge case.
The control to the PipeWire server is handled by mapping the socket into the container. This needs the current user id because the socket is located unter /run/user/${uid}/pipewire-0. I will rename the current AURA_USER_ID to something which makes clear that this is the user running the pipewire server. I will also add a hint in the README.
@chrizz please check if there is a pipewire socket for the user you want to run the docker setup with. Set the AURA_USER_ID to that uid and see if it works.
I already tried to change the AURA_USER_ID to 1000, which worked during the pw-jack testing sessions; but there's no socket file in /run/user/${uid}/pipewire-0. So it really looks like a special issue due to turning on/off pipewire multiple times.
I think pipewire can/must be ran using the systemctl --user flag, while wireplumber needs the --global flag.
But again, there's usually no need to configure that and it worked out-of-the-box after a fresh installation. So apt remove ... && apt install ... might be a quick fix for that - trying to recover...
As said, the docker setup works but the lua-script which handles the connections must be located on the host machine (or the connection must be done manually via pw-link). For me, that's a sufficient solution; but it might be preferrable to find a way to handle this via docker as well.
The docs are clear to me but note I'm already familiar with this topic.
I noticed a typo in the .env Settings at the bottom of the readme - "playback" and "capture" seem to be mixed-up.
The only confusing point is the device naming - there are some "_" and ":" in the name string and it's not fully clear how to derive the config from that; e.g.: "alsa_output.usb-Focusrite_Scarlett_2i2_USB_Y854J11063A637-00.analog-stereo:playback_FL". Since pw-link and the lua script report different names, I needed to research and play around a while to find the correct strings.
So I think we can go with this but I'd really appreciate a confirmation and further testing on a different machine.
@martina Could you verify this or any news on that?
Yeah I got playback and capture mixed up. I will fix this.
The only confusing point is the device naming - there are some "_" and ":" in the name string and it's not fully clear how to derive the config from that; e.g.: "alsa_output.usb-Focusrite_Scarlett_2i2_USB_Y854J11063A637-00.analog-stereo:playback_FL". Since pw-link and the lua script report different names, I needed to research and play around a while to find the correct strings.
Did you use the docker command for the auto connect solution?
docker compose run engine-core wpexec /etc/wireplumber/scripts/ls-ports.lua
But I do agree, the setup is not that easy and simple as I would like it to be.
Currently the script that dumps the information, including the device name, is very simple. Maybe we could improve the way we print the device information. I don't have much experience with lua and the wireplumber api, sadly the documentation is spare.
Another possibility could be to move away from device names (strings) and move to node ids. These are uniformly across pw-link and wireplumber but the downside is that you don't know which device is behind a node id.
The device names are a bit confusing (a lot of information is printed, I agree with maybe simplifying it by reducing the lines printed because most are unnecessary), but I managed to get it running so it's a win for me and I think the example in the README is sufficient.
Sure, I think we can simplify/clarify the device/node connection stage.
The reason for the lua-script was that I needed to use a graphical desktop environment in order to run pw-link (which does the same but with easier usage, such as simplified device names). So the script might be obsolete on desktops anyhow.
Since @Loxbie integrated pw-jack into engine-core, pw-link works also via ssh. But I need to verify this during testing alpha3...