Bug 1976006
| Summary: | systemd presets request - pipewire-media-session.service | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Peter Hutterer <peter.hutterer> |
| Component: | fedora-release | Assignee: | Mohan Boddu <mboddu> |
| Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | rawhide | CC: | dennis, fedoraproject, jkeating, kellin, kevin, mboddu, pbrobinson, sgallagh, thrcka, wtaymans, zbyszek |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2021-07-05 07:05:22 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Peter Hutterer
2021-06-24 23:59:27 UTC
Hmm, right now pipewire is socket activated lazily. Enabling pipewire-media-session.service would make this non-lazy. > our goal is to have pipewire-media-session started through a systemd user unit as a dependency of pipewire.service. Why not just add Wants=pipewire-media-session.service (or Requires= if necessary) to pipewire.service? > For that it needs to be enabled by default. Not necessarily. Does something else apart from pipewire.service require pipewire-media-session.service to be running before pipewire.service is started? (I can open a pull request to add the preset, but let's clarify the needs first.) FTR, I'm open to any suggestion that lets us handle this, I just thought the preset is the only option. > Why not just add Wants=pipewire-media-session.service (or Requires= if necessary) to pipewire.service? The long-term goal is to have the session manager exchangeable. Right now, that's pipewire-media-session.service, long term it's going to be wireplumber.service with the option to swap. All my experiments with WantedBy in the service files required a manual systemctl enable for that service - that's where this request comes from. Maybe this works with an explicit Wants but then we'd have pipewire wanting every possible session manager in the hope that one of them is installed. That doesn't seem right. Goal for wireplumber and media-session is to Conflicts each other, so only one is installed. I tried with a virtual pipewire-session-manager.service that both provide but that didn't work either. > Not necessarily. Does something else apart from pipewire.service require pipewire-media-session.service to be running before pipewire.service is started? It's actually the other way round, pipewire starts first, then pipewire-media-session which connects to said pipewire daemon to manage it. Pipewire can run without a session manager, it's just not very useful. If you can think of a better way to fix all this, you may just become my favourite person this month :) OK, I think we want something similar to how dbus-broker and dbus-daemon are set up: pipewire-media-session.service has [Install] Alias=pipewire-session-manager.service, wireplumber.service has the same Alias, pipewire.service has [Unit] Wants=pipewire-session-manager.service, and then presets are used to pick either pipewire-media-session.service or wireplumber.service as the actual implementation. I can confirm that (locally) this works as you suggested above. I've done this with pipewire-media-session and wireplumber locally (the latter two are virtually identical in changes): Added to pipewire.service: [Unit] Wants=pipewire-session-manager.service Added to wireplumber.service: [Install] Alias=pipewire-session-manager.service And after the manual systemctl --user enable wireplumber.service, it starts up correctly on restarting pipewire.service. $ systemctl --user list-dependencies pipewire.service pipewire.service ● ├─pipewire.socket ● ├─session.slice ● ├─wireplumber.service ... $ systemctl --user status pipewire-session-manager.service ● wireplumber.service - Multimedia Service Session Manager Loaded: loaded (/usr/lib/systemd/user/wireplumber.service; enabled; vendor preset: disabled) ... As said, the above is also true when wireplumber is swapped for pipewire-media-session. Let's do this then. I merged my pull request so we have 'enable pipewire-media-session.service' in presets. The rest needs to happen in the packages. |