Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pipewire audio support #6358

Closed
DemiMarie opened this issue Jan 22, 2021 · 9 comments · Fixed by QubesOS/qubes-gui-agent-linux#157
Closed

Pipewire audio support #6358

DemiMarie opened this issue Jan 22, 2021 · 9 comments · Fixed by QubesOS/qubes-gui-agent-linux#157
Assignees
Labels
C: audio P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. release notes This issue should be mentioned in the release notes. T: enhancement Type: enhancement. A new feature that does not yet exist or improvement of existing functionality.
Milestone

Comments

@DemiMarie
Copy link

The problem you're addressing (if any)
Fedora 34 [will be switching to PipeWire], which brings security and functionality improvements. PipeWire is API and ABI compatible with PulseAudio, but I do not believe this compatibility extends to PipeWire plugins.

Fortunately, PipeWire has a multiprocess architecture, so we may be able to implement sinks and sources out of process. PipeWire also handles video input, meaning that we may be able to implement a paravirtualized camera system.

Describe the solution you'd like
PipeWire should be supported

Where is the value to a user, and who might that user be?
Fedora 34 users will have working audio.

Describe alternatives you've considered
We can force Fedora 34 to use PulseAudio, assuming it is still supported.

Additional context

Relevant documentation you've consulted

Related, non-duplicate issues

@DemiMarie DemiMarie added T: enhancement Type: enhancement. A new feature that does not yet exist or improvement of existing functionality. P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. labels Jan 22, 2021
@andrewdavidwong andrewdavidwong added this to the TBD milestone Jan 22, 2021
marmarek added a commit to marmarek/qubes-builder-rpm that referenced this issue Feb 14, 2021
@0spinboson
Copy link

0spinboson commented Dec 29, 2021

It looks like pipewire either doesn't like my usb microphone with headphone output, or there is an issue with the usb device forwarding in fedora-35, because when I connect my usb device, firefox / youtube refuses to playback any video because it seems to have problems outputting it to the audio device. (When I disconnect the usb device, video playback instantly resumes, after giving vague error messages. Playback via VLC works fine, although the volume scaling is terrible -- even volume set to 1/100 using alsamixer is pretty loud, 5/100 is almost unbearable, distortion starts quickly.)

Using journalctl -xe-t kernel, I also see a constant stream of "usb usb1: not yet implemented" multiple times each second, and "vhci_get_frame_number: 2570 callbacks suppressed" every 5 seconds. This is not an issue in a fedora-32-based qube, so I assume this is all related to the switch to pipewire.

(Running Qubes 4.1 up to date with current-testing, qubes-vm-kernel 5.10, 5.15.x in dom0.)

@DemiMarie DemiMarie modified the milestones: Release TBD, Release 4.2 Apr 18, 2022
@DemiMarie DemiMarie self-assigned this Apr 18, 2022
@DemiMarie
Copy link
Author

Good news: PipeWire has a stable ABI for plugins!

@DemiMarie DemiMarie added the S: blocked Status: blocked. Work on this issue is currently blocked. label May 1, 2022
@DemiMarie
Copy link
Author

Bad news: the documentation is not sufficient for me to be able to create something that works. I will be filing some issues.

marmarek added a commit to marmarek/qubes-core-agent-linux that referenced this issue May 2, 2022
We don't have pipewire plugin yet, and it conflicts with pulseaudio when
accessing physical audio cards (sys-audio case).

Fixes QubesOS/qubes-issues#7485
Related to QubesOS/qubes-issues#6358
marmarek added a commit to marmarek/qubes-core-agent-linux that referenced this issue May 2, 2022
We don't have pipewire plugin yet, and it conflicts with pulseaudio when
accessing physical audio cards (sys-audio case).

Fixes QubesOS/qubes-issues#7485
Related to QubesOS/qubes-issues#6358
marmarek added a commit to marmarek/qubes-core-agent-linux that referenced this issue May 3, 2022
We don't have pipewire plugin yet, and it conflicts with pulseaudio when
accessing physical audio cards (sys-audio case).

Fixes QubesOS/qubes-issues#7485
Related to QubesOS/qubes-issues#6358
marmarek added a commit to marmarek/qubes-core-agent-linux that referenced this issue May 3, 2022
We don't have pipewire plugin yet, and it conflicts with pulseaudio when
accessing physical audio cards (sys-audio case).

Fixes QubesOS/qubes-issues#7485
Related to QubesOS/qubes-issues#6358
marmarek added a commit to QubesOS/qubes-core-agent-linux that referenced this issue May 4, 2022
We don't have pipewire plugin yet, and it conflicts with pulseaudio when
accessing physical audio cards (sys-audio case).

Fixes QubesOS/qubes-issues#7485
Related to QubesOS/qubes-issues#6358

(cherry picked from commit b717d1e)
@Nurmagoz
Copy link

Nurmagoz commented Jun 29, 2022

pulseaudio-qubes package not installable inside fedora-36-minimal: (unless i use --allowrasing)

pulseaudio-qubes

Which is what have been used in fedora-36:

pulseaudio-qubes2


Effected documentation section:

Audio: pulseaudio-qubes

https://www.qubes-os.org/doc/templates/minimal/#fedora

@marmarek marmarek added the release notes This issue should be mentioned in the release notes. label Dec 12, 2022
@DemiMarie DemiMarie added S: in progress Status: in progress. The assignee is currently working on this issue. and removed S: blocked Status: blocked. Work on this issue is currently blocked. labels Feb 7, 2023
marmarek added a commit to QubesOS/qubes-meta-packages that referenced this issue Jul 12, 2023
Use exclude list to make it easier for future versions.

QubesOS/qubes-issues#6358
marmarek added a commit to marmarek/qubes-builder-rpm that referenced this issue Jul 14, 2023
marmarek added a commit to marmarek/qubes-builder-rpm that referenced this issue Jul 14, 2023
marmarek added a commit to marmarek/qubes-gui-agent-linux that referenced this issue Jul 17, 2023
Do the same as in RPM package, to disable/enable pipewire (that would
otherwise conflict with pulseaudio).

QubesOS/qubes-issues#6358
marmarek added a commit to marmarek/qubes-gui-agent-linux that referenced this issue Jul 17, 2023
Avoid conflict on listening socket if pulseaudio-qubes is installed.

QubesOS/qubes-issues#6358
marmarek added a commit to marmarek/qubes-gui-agent-linux that referenced this issue Jul 17, 2023
Since pipewire units are getting disabled on pulseaudio-qubes install,
reverse the action when pulseaudio-qubes is getting removed (and usually
replaced with pipewire-qubes). Note the %postun is called on the upgrade
too, so use 'preset' (which will DTRT once 75-pulseaudio-qubes.preset is
gone) instead of 'disable' directly.

QubesOS/qubes-issues#6358
marmarek added a commit to marmarek/qubes-gui-agent-linux that referenced this issue Jul 17, 2023
marmarek added a commit to marmarek/qubes-gui-agent-linux that referenced this issue Jul 21, 2023
Do the same as in RPM package, to disable/enable pipewire (that would
otherwise conflict with pulseaudio).

QubesOS/qubes-issues#6358
marmarek added a commit to marmarek/qubes-gui-agent-linux that referenced this issue Jul 21, 2023
Avoid conflict on listening socket if pulseaudio-qubes is installed.

QubesOS/qubes-issues#6358
marmarek added a commit to marmarek/qubes-gui-agent-linux that referenced this issue Jul 21, 2023
Since pipewire units are getting disabled on pulseaudio-qubes install,
reverse the action when pulseaudio-qubes is getting removed (and usually
replaced with pipewire-qubes). Note the %postun is called on the upgrade
too, so use 'preset' (which will DTRT once 75-pulseaudio-qubes.preset is
gone) instead of 'disable' directly.

QubesOS/qubes-issues#6358
marmarek added a commit to marmarek/qubes-gui-agent-linux that referenced this issue Jul 21, 2023
marmarek added a commit to QubesOS/qubes-gui-agent-linux that referenced this issue Jul 21, 2023
Do the same as in RPM package, to disable/enable pipewire (that would
otherwise conflict with pulseaudio).

QubesOS/qubes-issues#6358

(cherry picked from commit f4ea6d1)
marmarek added a commit to QubesOS/qubes-gui-agent-linux that referenced this issue Jul 21, 2023
When both pipewire and pulseaudio are installed, let pulseaudio-qubes
disable pipewire, so audio in the VM will actually work.

This is part of 5effd4b "Let systemd manage PulseAudio" in the main
branch.

QubesOS/qubes-issues#6358
marmarek added a commit to QubesOS/qubes-gui-agent-linux that referenced this issue Jul 21, 2023
Since pipewire units are getting disabled on pulseaudio-qubes install,
reverse the action when pulseaudio-qubes is getting removed (and usually
replaced with pipewire-qubes). Note the %postun is called on the upgrade
too, so use 'preset' (which will DTRT once 75-pulseaudio-qubes.preset is
gone) instead of 'disable' directly.

QubesOS/qubes-issues#6358

(cherry picked from commit cf8328e)
marmarek added a commit to QubesOS/qubes-gui-agent-linux that referenced this issue Jul 21, 2023
Avoid conflict on listening socket if pulseaudio-qubes is installed.

QubesOS/qubes-issues#6358

(cherry picked from commit aa43702)
@andrewdavidwong andrewdavidwong removed this from the Release 4.2 milestone Aug 13, 2023
@jamke
Copy link

jamke commented Sep 8, 2023

The release notes of R4.2 (rc3 currently) state that PipeWire is already supported in Qubes OS.
What does it mean? Why this ticket is not closed as solved then?

It is not obvious what is the current situation with pipewire and pulseaudio in the R4.2.

  • Is there any documentation about the current situation?
  • What should user use in dom0 and what in templates in R4.2?
  • If pipewire then does it have problems with sys-audio and audio qube approach? Or should user still stick to pulseaudio manually solving the packaging conflicts as it is in R4.1?
  • If pipewire should be used in dom0, than will it work with existing user’s templates (e.g. migrated from backup) that use pulseaudio?

@DemiMarie
Copy link
Author

@jamke It means that the Qubes developers forgot to close the issue. To answer your questions:

  • I am not sure what the documentation status is.
  • PipeWire in dom0 is not officially supported. Audio playback and recording are known to work, but features such as sound volume save & restore don’t.
  • PipeWire in sys-audio and in qubes that connect to sys-audio is fully supported, at least to the extent that sys-audio is supported at all.

@jamke
Copy link

jamke commented Sep 9, 2023

@jamke To answer your questions

Thank you @DemiMarie , I will re-post your answers on forum, because people do no understand the situation with pipewire.

@andrewdavidwong andrewdavidwong added this to the Release 4.2 milestone Sep 9, 2023
@andrewdavidwong andrewdavidwong removed the S: in progress Status: in progress. The assignee is currently working on this issue. label Sep 9, 2023
@SaswatPadhi
Copy link

Using journalctl -xe-t kernel, I also see a constant stream of "usb usb1: not yet implemented" multiple times each second, and "vhci_get_frame_number: 2570 callbacks suppressed" every 5 seconds. This is not an issue in a fedora-32-based qube, so I assume this is all related to the switch to pipewire.

I still see this issue with my USB headphones.

I am running a Fedora 40 sys-audio qube on Qubes R4.2 with kernel-latest.

@0spinboson: Was this issue ever resolved for you? Were you able to figure out any workarounds?

@andrewdavidwong
Copy link
Member

Using journalctl -xe-t kernel, I also see a constant stream of "usb usb1: not yet implemented" multiple times each second, and "vhci_get_frame_number: 2570 callbacks suppressed" every 5 seconds. This is not an issue in a fedora-32-based qube, so I assume this is all related to the switch to pipewire.

I still see this issue with my USB headphones.

I am running a Fedora 40 sys-audio qube on Qubes R4.2 with kernel-latest.

@0spinboson: Was this issue ever resolved for you? Were you able to figure out any workarounds?

I'm not sure, but after reviewing this issue's history, it sounds like you should probably open a separate issue for this. (In particular, it sounds like this is an enhancement request that the devs believe has been implemented, whereas you're experiencing a bug. Since this issue isn't a bug report for your bug, you should probably open an actual bug report for it, unless one already exists.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: audio P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. release notes This issue should be mentioned in the release notes. T: enhancement Type: enhancement. A new feature that does not yet exist or improvement of existing functionality.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants