From Fedora Project Wiki
m (→‎Documentation: Fixing Markdown-style links to be real wiki hyperlinks)
(→‎Upgrade/compatibility impact: Add revert details)
 
(10 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{admon/tip | Guidance | For details on how to fill out this form, see the [https://docs.fedoraproject.org/en-US/program_management/changes_guide/ documentation].}}
<!-- The actual name of your proposed change page should look something like: Changes/Your_Change_Proposal_Name.  This keeps all change proposals in the same namespace -->
<!-- The actual name of your proposed change page should look something like: Changes/Your_Change_Proposal_Name.  This keeps all change proposals in the same namespace -->


Line 28: Line 26:


== Current status ==
== Current status ==
[[Category:ChangeAnnounced]]
[[Category:ChangeAcceptedF34]]
<!-- When your change proposal page is completed and ready for review and announcement -->
<!-- When your change proposal page is completed and ready for review and announcement -->
<!-- remove Category:ChangePageIncomplete and change it to Category:ChangeReadyForWrangler -->
<!-- remove Category:ChangePageIncomplete and change it to Category:ChangeReadyForWrangler -->
Line 47: Line 45:
CLOSED as NEXTRELEASE -> change is completed and verified and will be delivered in next release under development
CLOSED as NEXTRELEASE -> change is completed and verified and will be delivered in next release under development
-->
-->
* FESCo issue: <will be assigned by the Wrangler>
* FESCo issue: [https://pagure.io/fesco/issue/2508 #2508]
* Tracker bug: <will be assigned by the Wrangler>
* Tracker bug: [https://bugzilla.redhat.com/show_bug.cgi?id=1906086 #1906086]
* Release notes tracker: <will be assigned by the Wrangler>
* Release notes tracker: [https://pagure.io/fedora-docs/release-notes/issue/611 #611]


== Detailed Description ==
== Detailed Description ==
<!-- Expand on the summary, if appropriate.  A couple sentences suffices to explain the goal, but the more details you can provide the better. -->
<!-- Expand on the summary, if appropriate.  A couple sentences suffices to explain the goal, but the more details you can provide the better. -->


Line 77: Line 74:


== Feedback ==
== Feedback ==
<!-- Summarize the feedback from the community and address why you chose not to accept proposed alternatives. This section is optional for all change proposals but is strongly suggested. Incorporating feedback here as it is raised gives FESCo a clearer view of your proposal and leaves a good record for the future. If you get no feedback, that is useful to note in this section as well. For innovative or possibly controversial ideas, consider collecting feedback before you file the change proposal. -->
<!-- Summarize the feedback from the community and address why you chose not to accept proposed alternatives. This section is optional for all change proposals but is strongly suggested. Incorporating feedback here as it is raised gives FESCo a clearer view of your proposal and leaves a good record for the future. If you get no feedback, that is useful to note in this section as well. For innovative or possibly controversial ideas, consider collecting feedback before you file the change proposal. -->


Line 118: Line 114:
Some of the benefits that PipeWire will bring:
Some of the benefits that PipeWire will bring:


* PRO Audio features
===PRO Audio features===
 
PipeWire can support both Desktop and PRO Audio use cases. PRO Audio application tend to use
the JACK API and JACK daemon, which is hard to setup and integrates poorly with the rest of
the system (and PulseAudio in particular).
 
With a replacement libjack library, PRO Audio application can run directly on PipeWire and
integrate seamlessly with other ALSA and PulseAudio applications. This would bring Fedora
closer to the experience of other operating systems.


  PipeWire can support both Desktop and PRO Audio use cases. PRO Audio application tend to use
===Flexibility/Integration===
  the JACK API and JACK daemon, which is hard to setup and integrates poorly with the rest of
  the system (and PulseAudio in particular).


  With a replacement libjack library, PRO Audio application can run directly on PipeWire and
PipeWire is designed to be multiprocess. It separates the processing of the multimedia graph
  integrate seamlessly with other ALSA and PulseAudio applications. This would bring Fedora
and the management into separate processes. This makes it possible to better integrate with
  closer to the experience of other operating systems.
the other system components or swap out the default policy for a highly customized one (such as
for automotive or embedded). This is in contrast to PulseAudio, which has all logic embedded
into the daemon with limited configuration options.


* Flexibility/Integration
In the next phase we expect to greatly expand the user experience and configuration of the
 
audio infrastructure with better integration throughout the system.
  PipeWire is designed to be multiprocess. It separates the processing of the multimedia graph
  and the management into separate processes. This makes it possible to better integrate with
  the other system components or swap out the default policy for a highly customized one (such as
  for automotive or embedded). This is in contrast to PulseAudio, which has all logic embedded
  into the daemon with limited configuration options.


  In the next phase we expect to greatly expand the user experience and configuration of the
===Performance===
  audio infrastructure with better integration throughout the system.


* Performance
PipeWire was designed for high performance and low-latency, using much of the same design as
 
JACK. JACK application should run with comparable performance even in low-latency situations.
  PipeWire was designed for high performance and low-latency, using much of the same design as
  JACK. JACK application should run with comparable performance even in low-latency situations.


* Security
===Security===


  PipeWire enforces per client security. Object visibility and the actions on them can be
PipeWire enforces per client security. Object visibility and the actions on them can be
  configured independently per client. This makes it possible to enforce a security policy for
configured independently per client. This makes it possible to enforce a security policy for
  sandboxed applications (Flatpak) such as denying access to certain audio capture devices or
sandboxed applications (Flatpak) such as denying access to certain audio capture devices or
  block them from interfering with other applications.
block them from interfering with other applications.


* Maintainability
===Maintainability===


  Both PulseAudio and JACK have very slow development cycles with few new features. The more
Both PulseAudio and JACK have very slow development cycles with few new features. The more
  flexible and distributed nature of the design of PipeWire should encourage more new features
flexible and distributed nature of the design of PipeWire should encourage more new features
  and use-cases.  
and use-cases.  


== Scope ==
== Scope ==
Line 161: Line 157:
<!-- What work do the feature owners have to accomplish to complete the feature in time for release?  Is it a large change affecting many parts of the distribution or is it a very isolated change? What are those changes?-->
<!-- What work do the feature owners have to accomplish to complete the feature in time for release?  Is it a large change affecting many parts of the distribution or is it a very isolated change? What are those changes?-->


We would make a pipewire-pulse package that provides the same features as the pulseaudio (daemon) package.
We would make a pipewire-pulseaudio package that provides the same features as the pulseaudio (daemon) package.
We would only provide a drop-in replacement daemon, the pulseaudio client libraries will remain unchanged.
We would only provide a drop-in replacement daemon, the pulseaudio client libraries will remain unchanged.


The idea is that when installing pipewire-pulse, only the pulseaudio package is removed and replaced by the
The idea is that when installing pipewire-pulseaudio, only the pulseaudio package is removed and replaced by the pipewire-pulseaudio implementation. In the same way, installing the pulseaudio package would remove the pipewire-pulseaudio package, making it possible to switch between implementations. This will also allow for an easy rollback.
pipewire-pulse implementation. In the same way, installing the pulseaudio package would remove the pipewire-pulse
package, making it possible to switch between implementations. This will also allow for an easy rollback.


We also need to check and correct the dependencies of other packages. As of this writing, some packages do
We also need to check and correct the dependencies of other packages. As of this writing, some packages do not state their dependencies correctly and get removed when pulseaudio is removed. We also need to check the JACK to make sure they still install with the replacement JACK client library.
not state their dependencies correctly and get removed when pulseaudio is removed. We also need to check the
JACK to make sure they still install with the replacement JACK client library.


The JACK client libraries will be installed in the same way, removing the old JACK client libraries.
The JACK client libraries will be installed in the same way, removing the old JACK client libraries.
Line 177: Line 169:
<!-- What work do other developers have to accomplish to complete the feature in time for release?  Is it a large change affecting many parts of the distribution or is it a very isolated change? What are those changes?-->
<!-- What work do other developers have to accomplish to complete the feature in time for release?  Is it a large change affecting many parts of the distribution or is it a very isolated change? What are those changes?-->


The distribution needs to default to the pipewire-pulse package instead of pulseaudio.  
The distribution needs to default to the pipewire-pulseaudio package instead of pulseaudio.  


JACK applications need to install the pipewire-libjack client library.
JACK applications need to install the pipewire-libjack client library.
Line 185: Line 177:
The issue is required to be filed prior to feature submission, to ensure that someone is on board to do any process development work and testing and that all changes make it into the pipeline; a bullet point in a change is not sufficient communication -->
The issue is required to be filed prior to feature submission, to ensure that someone is on board to do any process development work and testing and that all changes make it into the pipeline; a bullet point in a change is not sufficient communication -->


The distribution needs to default to the pipewire-pulse package instead of pulseaudio.
The distribution needs to default to the pipewire-pulseaudio package instead of pulseaudio.


JACK applications need to install the pipewire-libjack client library.
JACK applications need to install the pipewire-libjack client library.
Line 202: Line 194:
<!-- What happens to systems that have had a previous versions of Fedora installed and are updated to the version containing this change? Will anything require manual configuration or data migration? Will any existing functionality be no longer supported? -->
<!-- What happens to systems that have had a previous versions of Fedora installed and are updated to the version containing this change? Will anything require manual configuration or data migration? Will any existing functionality be no longer supported? -->


The pulseaudio package will be uninstalled and pipewire-pulse will be installed.
The pulseaudio package will be uninstalled and pipewire-pulseaudio will be installed.


pipewire-pulse does not yet implement all the features of pulseaudio but it is expected that
pipewire-pulseaudio does not yet implement all the features of pulseaudio but it is expected that
comparable functionality will be implemented later. Most notable features that are likely
comparable functionality will be implemented later. Most notable features that are likely
not going to be available for fedora 34
not going to be available for fedora 34


* avahi network discovery and audio routing. This is not enabled by default but can be activated
* avahi network discovery and audio routing. This is not enabled by default but can be activated with paprefs. this includes TCP and RTP transport of audio.
  with paprefs. this includes TCP and RTP transport of audio.
* make devices available as UPNP media servers. Not enabled by default, paprefs can be used.
* make devices available as UPNP media servers. Not enabled by default, paprefs can be used.
* easy configuration of combining all sinks. Questionable feature but possible via paprefs.
* easy configuration of combining all sinks. Questionable feature but possible via paprefs.


User scripts will still work but custom configurations of the pulseaudio daemon will not be used
User scripts will still work but custom configurations of the pulseaudio daemon will not be used
Line 220: Line 211:
we hope to implement them before fedora 34:
we hope to implement them before fedora 34:


* latency reporting: useful to align streams
* latency reporting: useful to align streams
* freewheeling: used when rendering a project
* freewheeling: used when rendering a project
* jackdbus: used by some tools to manage the graph
* jackdbus: used by some tools to manage the graph


If users wish to switch back to PulseAudio for audio, this can be done by running the following command:
<code>
$ sudo dnf swap --allowerasing pipewire-pulseaudio pulseaudio
</code>
Then reboot to complete the transition.


== How To Test ==
== How To Test ==
Line 243: Line 241:
applies here as with PulseAudio.
applies here as with PulseAudio.


To test, one needs to install the pipewire-pulse library (which removes the pulseaudio package).
To test, one needs to install the pipewire-pulseaudio library (which removes the pulseaudio package):
 
<code>
$ sudo dnf install --allowerasing pipewire-pulseaudio
</code>


To test the JACK support, one needs to install pipewire-libjack, which removes the original
To test the JACK support, one needs to install pipewire-libjack, which removes the original
JACK client and server.
JACK client and server.


After these changes, a restart is needed to make sure the new pipewire-pulse daemon is running.
After these changes, a restart is needed to make sure the new pipewire-pulseaudio daemon is running.


Audio functionality should be like it was before with the Pulseaudio daemon. Some things to verify:
Audio functionality should be like it was before with the Pulseaudio daemon. Some things to verify:


- patcl info should now list: Server Name: PulseAudio (on PipeWire 0.3.x)
* '''pactl info should now list''': Server Name: PulseAudio (on PipeWire 0.3.x)
- gnome-control-center: check the audio tab, check the volume sliders and do the audio channel
* '''gnome-control-center''': check the audio tab, check the volume sliders and do the audio channel test. Change the card profile, plug/unplug headphones and observe correct switch.
                        test. Change the card profile, plug/unplug headphones and observe correct
* '''pavucontrol''': check volumes in the input devices tabs and check the microphone volumes
                        switch.
* '''firefox''': check out a website with audio/video such as youtube and verify that audio works as usual. Check out a website with a video chat test page (bluejeans.com/111).
- pavucontrol: check volumes in the input devices tabs and check the microphone volumes
* '''rhythmbox''': check if playback works as expected
- firefox: check out a website with audio/video such as youtube and verify that audio works as
* bluetooth devices, connect as usual and verify working behaviour with PipeWire. Check volume changes etc.
            usual. Check out a website with a video chat test page (bluejeans.com/111).
* Regular system usage and performance should not change.
- rhythmbox: check if playback works as expected
* JACK tools such as catia, carla should run and can be used to inspect the graph.
- bluetooth devices, connect as usual and verify working behaviour with PipeWire. Check volume
                      changes etc.
- Regular system usage and performance should not change.
- JACK tools such as catia, carla should run and can be used to inspect the graph.
 


== User Experience ==
== User Experience ==
Line 282: Line 279:
The big change is when using JACK application:
The big change is when using JACK application:
   
   
- They will start without having to configure and start the daemon. this includes
* They will start without having to configure and start the daemon. this includes the period size and sample rates.
  the period size and sample rates.
* All devices will be visible in the graph with meaningful names. Devices will be automatically slaved when needed without needing any configuration.
- All devices will be visible in the graph with meaningful names. Devices will
* bluetooth devices will be usable as well.
  be automatically slaved when needed without needing any configuration.
- bluetooth devices will be usable as well.


== Dependencies ==
== Dependencies ==
Line 299: Line 294:
* Contingency mechanism: Keep existing pulseaudio and JACK client libraries as defaults
* Contingency mechanism: Keep existing pulseaudio and JACK client libraries as defaults
<!-- When is the last time the contingency mechanism can be put in place?  This will typically be the beta freeze. -->
<!-- When is the last time the contingency mechanism can be put in place?  This will typically be the beta freeze. -->
* Contingency deadline: beta freeze
* Contingency deadline: 2021-02-16 (one week before beta freeze)
<!-- Does finishing this feature block the release, or can we ship with the feature in incomplete state? -->
<!-- Does finishing this feature block the release, or can we ship with the feature in incomplete state? -->
* Blocks release? No
* Blocks release? No
* Blocks product? No
* Blocks product? No


== Documentation ==
== Documentation ==
Line 319: Line 313:
Release Notes are not required for initial draft of the Change Proposal but has to be completed by the Change Freeze.  
Release Notes are not required for initial draft of the Change Proposal but has to be completed by the Change Freeze.  
-->
-->
Fedora has switched to a unified audio routing subsystem using PipeWire. There should be no significant impact to the user experience, though if users wish to switch back to PulseAudio for audio, this can be done by running the following command:
<code>
$ sudo dnf swap --allowerasing pipewire-pulseaudio pulseaudio
</code>
Then reboot to complete the transition.

Latest revision as of 15:20, 17 February 2021


Route all Audio to PipeWire

Summary

This change proposal is to route all audio from PulseAudio and JACK to the PipeWire Audio daemon by default.

Owner

Current status

Detailed Description

Currently, all desktop audio is handled by the PulseAudio daemon. Applications make use of the PulseAudio client library to communicate with the PulseAudio daemon that mixes and manages the audio streams from the clients.

The desktop shell (gnome-shell) and the control panel (gnome-control-panel) both use the Pulseaudio client libraries to manage the volume and configuration of the PulseAudio daemon.

This proposal is to replace the PulseAudio daemon with a functionally compatible implementation based on PipeWire. This means that all existing clients using the PulseAudio client library will continue to work as before, as well as applications shipped as Flatpak.

All PRO audio is handled with the JACK client library, which talks to the JACK server. This proposal will install a JACK client library replacement that talks directly to PipeWire. All existing PRO audio jack applications will then work on top of PipeWire.

For legacy ALSA clients, we will install an ALSA plugin that routes the audio directly to PipeWire.

With these 3 changes, all audio will be routed to PipeWire. There will then be no more need to install the PulseAudio and JACK daemons.

Feedback

The owner of this proposal has been in context with both the PulseAudio and JACK maintainers and community. PipeWire is considered to be the successor of both projects.

Benefit to Fedora

The end goal is to end up with one audio infrastructure for both Desktop and Pro audio use cases. This will end the fragmentation of the audio landscape.

Some of the benefits that PipeWire will bring:

PRO Audio features

PipeWire can support both Desktop and PRO Audio use cases. PRO Audio application tend to use the JACK API and JACK daemon, which is hard to setup and integrates poorly with the rest of the system (and PulseAudio in particular).

With a replacement libjack library, PRO Audio application can run directly on PipeWire and integrate seamlessly with other ALSA and PulseAudio applications. This would bring Fedora closer to the experience of other operating systems.

Flexibility/Integration

PipeWire is designed to be multiprocess. It separates the processing of the multimedia graph and the management into separate processes. This makes it possible to better integrate with the other system components or swap out the default policy for a highly customized one (such as for automotive or embedded). This is in contrast to PulseAudio, which has all logic embedded into the daemon with limited configuration options.

In the next phase we expect to greatly expand the user experience and configuration of the audio infrastructure with better integration throughout the system.

Performance

PipeWire was designed for high performance and low-latency, using much of the same design as JACK. JACK application should run with comparable performance even in low-latency situations.

Security

PipeWire enforces per client security. Object visibility and the actions on them can be configured independently per client. This makes it possible to enforce a security policy for sandboxed applications (Flatpak) such as denying access to certain audio capture devices or block them from interfering with other applications.

Maintainability

Both PulseAudio and JACK have very slow development cycles with few new features. The more flexible and distributed nature of the design of PipeWire should encourage more new features and use-cases.

Scope

  • Proposal owners:

We would make a pipewire-pulseaudio package that provides the same features as the pulseaudio (daemon) package. We would only provide a drop-in replacement daemon, the pulseaudio client libraries will remain unchanged.

The idea is that when installing pipewire-pulseaudio, only the pulseaudio package is removed and replaced by the pipewire-pulseaudio implementation. In the same way, installing the pulseaudio package would remove the pipewire-pulseaudio package, making it possible to switch between implementations. This will also allow for an easy rollback.

We also need to check and correct the dependencies of other packages. As of this writing, some packages do not state their dependencies correctly and get removed when pulseaudio is removed. We also need to check the JACK to make sure they still install with the replacement JACK client library.

The JACK client libraries will be installed in the same way, removing the old JACK client libraries.

  • Other developers:

The distribution needs to default to the pipewire-pulseaudio package instead of pulseaudio.

JACK applications need to install the pipewire-libjack client library.

The distribution needs to default to the pipewire-pulseaudio package instead of pulseaudio.

JACK applications need to install the pipewire-libjack client library.

  • Policies and guidelines:
  • Trademark approval: N/A (not needed for this Change)
  • Alignment with Objectives:


Upgrade/compatibility impact

The pulseaudio package will be uninstalled and pipewire-pulseaudio will be installed.

pipewire-pulseaudio does not yet implement all the features of pulseaudio but it is expected that comparable functionality will be implemented later. Most notable features that are likely not going to be available for fedora 34

  • avahi network discovery and audio routing. This is not enabled by default but can be activated with paprefs. this includes TCP and RTP transport of audio.
  • make devices available as UPNP media servers. Not enabled by default, paprefs can be used.
  • easy configuration of combining all sinks. Questionable feature but possible via paprefs.

User scripts will still work but custom configurations of the pulseaudio daemon will not be used anymore.

Most of the JACK workflow of managing the JACK daemon is not going to be needed anymore as things will work out-of-the-box. As of this writing, these things are missing from the JACK implementation, we hope to implement them before fedora 34:

  • latency reporting: useful to align streams
  • freewheeling: used when rendering a project
  • jackdbus: used by some tools to manage the graph

If users wish to switch back to PulseAudio for audio, this can be done by running the following command:

$ sudo dnf swap --allowerasing pipewire-pulseaudio pulseaudio

Then reboot to complete the transition.

How To Test

This change needs to be tested on as many different audio cards as possible. The same test plan applies here as with PulseAudio.

To test, one needs to install the pipewire-pulseaudio library (which removes the pulseaudio package):

$ sudo dnf install --allowerasing pipewire-pulseaudio

To test the JACK support, one needs to install pipewire-libjack, which removes the original JACK client and server.

After these changes, a restart is needed to make sure the new pipewire-pulseaudio daemon is running.

Audio functionality should be like it was before with the Pulseaudio daemon. Some things to verify:

  • pactl info should now list: Server Name: PulseAudio (on PipeWire 0.3.x)
  • gnome-control-center: check the audio tab, check the volume sliders and do the audio channel test. Change the card profile, plug/unplug headphones and observe correct switch.
  • pavucontrol: check volumes in the input devices tabs and check the microphone volumes
  • firefox: check out a website with audio/video such as youtube and verify that audio works as usual. Check out a website with a video chat test page (bluejeans.com/111).
  • rhythmbox: check if playback works as expected
  • bluetooth devices, connect as usual and verify working behaviour with PipeWire. Check volume changes etc.
  • Regular system usage and performance should not change.
  • JACK tools such as catia, carla should run and can be used to inspect the graph.

User Experience

In general, users should not be able to see any change when using PulseAudio applications.

The big change is when using JACK application:

  • They will start without having to configure and start the daemon. this includes the period size and sample rates.
  • All devices will be visible in the graph with meaningful names. Devices will be automatically slaved when needed without needing any configuration.
  • bluetooth devices will be usable as well.

Dependencies

Other packages might need to have their requirements fixed to work with the replacement packages but this is under our control.

Contingency Plan

  • Contingency mechanism: Keep existing pulseaudio and JACK client libraries as defaults
  • Contingency deadline: 2021-02-16 (one week before beta freeze)
  • Blocks release? No
  • Blocks product? No

Documentation

Release Notes

Fedora has switched to a unified audio routing subsystem using PipeWire. There should be no significant impact to the user experience, though if users wish to switch back to PulseAudio for audio, this can be done by running the following command:

$ sudo dnf swap --allowerasing pipewire-pulseaudio pulseaudio

Then reboot to complete the transition.