port from pulseaudio to pipewire for audio support

This is now in the testers repository.

1 Like

There is a small problem with this change: pipewire-qubes only Recommends: pipewire-pulse, which technically is correct (one can have a system with just pipewire and no pulseaudio). But such system is not very useful in practice - most applications connect to pulseaudio (either real one, or pipewire-pulse). And since Whonix packages are installed with --no-install-recommends, pipewire-pulse isnā€™t installed in the end.

So, Iā€™d recommend adding pipewire-pulse to the list in qubes-whonix-workstation-packages-recommended too.

2 Likes

Thank you!

Done.

1 Like

The upgrade isnā€™t cleanā€¦ When updating a template that had pulseaudio (and pulseaudio-qubes) installed, apt dist-upgrade skips updating qubes-whonix-workstation-packages-recommended, I assume because that requires removing pulseaudio-qubes. But when doing explicit apt install qubes-whonix-workstation-packages-recommended, it does offer an update and removal of pulseaudio-qubes.

Honestly, Iā€™m not sure how to handle this situation best. TBH, Iā€™m not sure why it wasnā€™t an issue in release upgrade R4.1 ā†’ R4.2. We did need explicit pulseaudio-pipewire step in the upgrade tool for Fedora templates, but not for Debian. Maybe itā€™s due to which package has those dependencies (pipewire-qubes has Conflicts: pulseaudio-qubes and Recommends: pipewire-pulse - so, itā€™s the same package pulling one and removing the other, while on Whonix, due to --no-install-recommends itā€™s a different package pulling in pipewire-pulse than removing pulseaudio-qubes). I donā€™t fully understand this, could be something else. One thing to try might be adding Conflicts: pulseaudio-qubes to qubes-whonix-workstation-packages-recommended, but see below.

And to make things worse, pipewire-qubes isnā€™t a thing on R4.1 yet, which leads to another dependency issueā€¦ This issue is relevant only for a little less than 3 months (until R4.1 EOL), but still.

Maybe, for the time being, the better approach would be a less strict migration, like Depends: pipewire-qubes | pulseaudio-qubes, so it would choose pipewire for new builds, but not switch to it if pulseaudio is already installed? But in that case, Iā€™m not sure what to do about pipewire-pulse requirement, does Debian support grouping in dependencies like Depends: (pipewire-qubes, pipewire-pulse) | pulseaudio-qubes ? If not, I guess it can be written as Depends: pipewire-qubes | pulseaudio-qubes, pipewire-pulse | pulseaudio-qubes. As for the conflict with pulseaudio, Iā€™m not sure how to do it. Adding Conflicts: pulseaudio-qubes will break audio on R4.1. Maybe some Conflicts: pulseaudio-qubes | pipewire-qubes would work? Probably notā€¦

The underlying issue with this migration is that pipewire and pulseaudio cannot run at the same time - there can be only one audio daemon connecting to dom0 (or other audiovm). Currently itā€™s achieved with package conflict. Maybe a more robust solution would be to avoid package conflict and add some runtime detection (if pulseaudio-qubes detects pipewire installed/enabled, it will not start)?

Any preference?

I do have R4.1 and R4.2 test systems, with Whonix Workstation 17 template from before this change, so I can test various options, for example if you upload some package to try to some repository (developers one?).

1 Like

This is probably good. As far as I know, the first named package in the line pipewire-qubes gets preferred, if available.

Right. I guess it wonā€™t switch automatically then.

Hard to speak with certainty about these things. Not really well documented anywhere.

What makes this hard is that package upgrades are hard to test. I am not aware of any way to simulate this without actually attempting such upgrades. Weā€™re kinda doing a learning by doing / reverse engineering / tinkering based approach.

No, I donā€™t think so. From all the debian/control files I looked at during my lifetime, I donā€™t remember seeing something like that. There are versioned Depends: but that looks difficult, speak error-prone. One solution might be to create a meta package qubes-audio-support-pipewire to avoid the non-existing grouping syntax support.

But a simpler solution perhapsā€¦

 pipewire-qubes | pulseaudio-qubes,
 pipewire-pulse | pulseaudio-qubes,

Meaning:

  • If pipewire-qubes is available, prefer it. Otherwise fall back to pulseaudio-qubes.
  • If pipewire-pulse is available, prefer it. Otherwise fall back to pulseaudio-qubes.
  • The fact that pulseaudio-qubes is mentioned twice as a dependency shouldnā€™t cause any issues.

I am not sure but that sounds like a higher likelihood of introducing regressions. Happy to avoid if we can avoid it at the meta package level.

This is now in the developers repository.

Please let me know if that looks good enough and is functional.

Looks to work good:

  • R4.1: update is clean, pulseaudio-qubes remain installed
  • R4.2 that still has pulseaudio-qubes: update is clean, pulseaudio-qubes remain installed
  • R4.2 that has pipewire-qubes installed already: update is clean, pipewire-pulse is pulled in too

And then, if one would like to migrate:
R4.2 that still has pulseaudio-qubes: apt install pipewire-qubes pulls in pipewire-pulse too, and removes pulseaudio-qubes

1 Like

Excellent. So thatā€™s resolved. :slight_smile:

1 Like

I see this update is still only in the developers repository. Is it time to push it to testers or maybe stable?

1 Like

Done.