From Fedora Project Wiki
No edit summary
(Add note about rebooting when switching, this was needed for someone in the Fedora Matrix channel)
 
(9 intermediate revisions by 4 users not shown)
Line 25: Line 25:


== Current status ==
== Current status ==
[[Category:ChangePageIncomplete]]
[[Category:ChangeAcceptedF35]]
<!-- 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 43: Line 43:
ON_QA -> change is fully code complete
ON_QA -> change is fully code complete
-->
-->
* FESCo issue: <will be assigned by the Wrangler>
* FESCo issue: [https://pagure.io/fesco/issue/2653 #2653]
* Tracker bug: <will be assigned by the Wrangler>
* Tracker bug: [https://bugzilla.redhat.com/show_bug.cgi?id=1989959 #1989959]
* Release notes tracker: <will be assigned by the Wrangler>
* Release notes tracker: [https://pagure.io/fedora-docs/release-notes/issue/734 #734]


== 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. -->


PipeWire uses a simple example session manager with limited features and configuration option. The proposal is to
PipeWire requires a session manager that at least needs to implements the following features:
move to WirePlumber, which is more advanced.
 
* create and configure detected devices in the system. This includes audio cards, video and bluetooth devices.
* configure applications and route audio/video to/from them to the devices and filters.
* keep track of prefered devices and volumes.
* move audio/video streams when devices appear and disappear.
 
PipeWire uses a simple example session manager with limited features and configuration options. The proposal is to
move to WirePlumber.
 
WirePlumber is built on GNOME (GObject) technologies and has bindings for most languages using GObject introspection.
 
WirePlumber allows one to implement many of the rules for setup and configuration using small LUA scripts, which are
easier to maintain and customize. These are some of the functions that are scriptable in LUA:
 
* setup and configuration of the devices and streams. This includes deciding if devices and streams need to operate in 5.1 or stereo mode, depending on the available devices.
* routing of the streams based on metadata of the streams (Roles) and overall state of the system.
* volume/mute restore of devices and streams




Line 72: Line 88:
and rules. Initially we aim for feature parity with the current solution and work on more features
and rules. Initially we aim for feature parity with the current solution and work on more features
in the next releases.
in the next releases.


<!-- What is the benefit to the distribution?  Will the software we generate be improved? How will the process of creating Fedora releases be improved?
<!-- What is the benefit to the distribution?  Will the software we generate be improved? How will the process of creating Fedora releases be improved?
Line 116: Line 131:
None. This is an isolated PipeWire change.
None. This is an isolated PipeWire change.


* Release engineering: [https://pagure.io/releng/issues #Releng issue number] <!-- REQUIRED FOR SYSTEM WIDE CHANGES -->
* Release engineering: A new systemd service will need to be activated in the default install.
<!-- Does this feature require coordination with release engineering (e.g. changes to installer image generation or update package delivery)?  Is a mass rebuild required?  include a link to the releng issue.
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 -->
 
A new systemd service will need to be activated in the default install.


* Policies and guidelines: N/A (not needed for this Change) <!-- REQUIRED FOR SYSTEM WIDE CHANGES -->
* Policies and guidelines: N/A (not needed for this Change) <!-- REQUIRED FOR SYSTEM WIDE CHANGES -->
Line 129: Line 140:


* Alignment with Objectives:  
* Alignment with Objectives:  
<!-- Does your proposal align with the current Fedora Objectives: https://docs.fedoraproject.org/en-US/project/objectives/ ? It's okay if it doesn't, but it's something to consider -->
A more configurable and adaptable session manager will make it easier to adapt to the Audio and Video requirements
and policy of the target use-case. We could more easily write desktop, PRO audio or mobile configurations.


== Upgrade/compatibility impact ==
== Upgrade/compatibility impact ==
Line 142: Line 149:




== How To Test ==
== How To Switch ==
 
To switch between WirePlumber and pipewire-media-session, use the following dnf command:
 
  dnf swap wireplumber pipewire-media-session
 
On rpm-ostree based systems:
 
  rpm-ostree override remove wireplumber --install pipewire-media-session
 
Ensure to reboot so all relevant services are correctly restarted.


Experience should be the same as before. Retest all audio testcases.
Experience should be the same as before. Retest all audio testcases.
Line 187: Line 204:


== Contingency Plan ==
== Contingency Plan ==
If the feature can not be completed we continue using the existing pipewire-media-session.
<!-- If you cannot complete your feature by the final development freeze, what is the backup plan?  This might be as simple as "Revert the shipped configuration".  Or it might not (e.g. rebuilding a number of dependent packages).  If you feature is not completed in time we want to assure others that other parts of Fedora will not be in jeopardy.  -->
<!-- If you cannot complete your feature by the final development freeze, what is the backup plan?  This might be as simple as "Revert the shipped configuration".  Or it might not (e.g. rebuilding a number of dependent packages).  If you feature is not completed in time we want to assure others that other parts of Fedora will not be in jeopardy.  -->
* Contingency mechanism: (What to do?  Who will do it?) N/A (not a System Wide Change)  <!-- REQUIRED FOR SYSTEM WIDE CHANGES -->
* Contingency mechanism: (What to do?  Who will do it?): If the feature can not be completed we continue using the existing pipewire-media-session.
<!-- 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: N/A (not a System Wide Change)  <!-- REQUIRED FOR SYSTEM WIDE CHANGES -->
* Contingency deadline: N/A (not a System Wide Change)  <!-- REQUIRED FOR SYSTEM WIDE CHANGES -->
Line 201: Line 215:
<!-- Is there upstream documentation on this change, or notes you have written yourself?  Link to that material here so other interested developers can get involved. -->
<!-- Is there upstream documentation on this change, or notes you have written yourself?  Link to that material here so other interested developers can get involved. -->


[WirePlumber](https://gitlab.freedesktop.org/pipewire/wireplumber)
[https://gitlab.freedesktop.org/pipewire/wireplumber WirePlumber]
 
<!-- REQUIRED FOR SYSTEM WIDE CHANGES -->
N/A (not a System Wide Change)


== Release Notes ==
== Release Notes ==

Latest revision as of 06:22, 21 October 2021


Switch to WirePlumber as the PipeWire session manager

Summary

PipeWire currently uses a simple example session manager. This proposal is to move to the more powerful WirePlumber session manager.


Owner


Current status

Detailed Description

PipeWire requires a session manager that at least needs to implements the following features:

  • create and configure detected devices in the system. This includes audio cards, video and bluetooth devices.
  • configure applications and route audio/video to/from them to the devices and filters.
  • keep track of prefered devices and volumes.
  • move audio/video streams when devices appear and disappear.

PipeWire uses a simple example session manager with limited features and configuration options. The proposal is to move to WirePlumber.

WirePlumber is built on GNOME (GObject) technologies and has bindings for most languages using GObject introspection.

WirePlumber allows one to implement many of the rules for setup and configuration using small LUA scripts, which are easier to maintain and customize. These are some of the functions that are scriptable in LUA:

  • setup and configuration of the devices and streams. This includes deciding if devices and streams need to operate in 5.1 or stereo mode, depending on the available devices.
  • routing of the streams based on metadata of the streams (Roles) and overall state of the system.
  • volume/mute restore of devices and streams


Feedback

Benefit to Fedora

PipeWire currently uses a simple example session manager with mostly hardcoded logic and rules. This proposal wants to replace the session manager with a more advanced session manager, called WirePlumber.

WirePlumber brings to following improvements

  • Drop-in replacement session manager for PipeWire, implements the exact same features as the example session manager
  • built with GObject, which provides a richer development experience and adds bindings for most languages
  • extensible with loadable modules
  • scriptable policy using small lua scripts
  • better integration with desktop settings

The main benefits will be that this session manager would allow for more customization of the policy and rules. Initially we aim for feature parity with the current solution and work on more features in the next releases.


Scope

  • Proposal owners:

This is a rather isolated changed. Instead of starting the pipewire-media-session executable we would need to package and start WirePlumber instead.

WirePlumber has been kept up to data with the features in the example session manager and would need testing.

  • Other developers:

None. This is an isolated PipeWire change.

  • Release engineering: A new systemd service will need to be activated in the default install.
  • Policies and guidelines: N/A (not needed for this Change)
  • Trademark approval: N/A (not needed for this Change)
  • Alignment with Objectives:

Upgrade/compatibility impact

Should not cause any change.


How To Switch

To switch between WirePlumber and pipewire-media-session, use the following dnf command:

 dnf swap wireplumber pipewire-media-session

On rpm-ostree based systems:

 rpm-ostree override remove wireplumber --install pipewire-media-session

Ensure to reboot so all relevant services are correctly restarted.

Experience should be the same as before. Retest all audio testcases.



User Experience

Should not cause any visible change.


Dependencies

None.


Contingency Plan

  • Contingency mechanism: (What to do? Who will do it?): If the feature can not be completed we continue using the existing pipewire-media-session.
  • Contingency deadline: N/A (not a System Wide Change)
  • Blocks release? N/A (not a System Wide Change), Yes/No


Documentation

WirePlumber

Release Notes