Please enable the user unit pipewire-media-session.service by default. pipewire-media-session is a session manager for pipewire. The dependency tree is: - pipewire.socket (default: enabled, see bug 1592434) - pipewire.service - pipewire-media-session Pipewire currently starts pipewire-media-session through exec, our goal is to have pipewire-media-session started through a systemd user unit as a dependency of pipewire.service. For that it needs to be enabled by default. * Does the service require post-rpm-installation configuration in order to be useful (for example, does it need manual edits to a configuration file)? No * Does the service listen on a network socket for connections originating on a separate physical or virtual machine? No * Is the service non-persistent (i.e. run once at startup and exit)? It is persistent for the user session * What is the exact name (or names) of the systemd unit files to be enabled? pipewire-media-session.service * Is this request for all Fedora deliverables or only for some Editions (list them)? It needs to match the pipewire defaults in 90-default-user.preset (unsure which editions apply here but I guess all of them?)
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.
https://src.fedoraproject.org/rpms/fedora-release/pull-request/186
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.