mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
systemd: Depend on dbus.service
Solution suggested by Xi Ruoyao. The dbus user service is required for various features - the summary says: 'dbus (Bluetooth, rt, portal, pw-reserve)' On session logout the dbus service gets shut down while the Pipewire one relies on a timeout. If a user logs in again before PW timed out, the later stays alive but doesn't handle re-connecting to the dbus service of the new session, breaking the camera portal and potentially other features. Thus hard-depend on the dbus service (if enabled at build time) and thus shut down together with it.
This commit is contained in:
parent
923b8b48ec
commit
2625983a23
2 changed files with 7 additions and 1 deletions
|
|
@ -11,6 +11,12 @@ systemd_config = configuration_data()
|
||||||
systemd_config.set('PW_BINARY', pipewire_bindir / 'pipewire')
|
systemd_config.set('PW_BINARY', pipewire_bindir / 'pipewire')
|
||||||
systemd_config.set('PW_PULSE_BINARY', pipewire_bindir / 'pipewire-pulse')
|
systemd_config.set('PW_PULSE_BINARY', pipewire_bindir / 'pipewire-pulse')
|
||||||
|
|
||||||
|
pw_service_reqs = ''
|
||||||
|
if get_option('dbus').enabled()
|
||||||
|
pw_service_reqs += 'dbus.service '
|
||||||
|
endif
|
||||||
|
systemd_config.set('PW_SERVICE_REQS', pw_service_reqs)
|
||||||
|
|
||||||
configure_file(input : 'pipewire.service.in',
|
configure_file(input : 'pipewire.service.in',
|
||||||
output : 'pipewire.service',
|
output : 'pipewire.service',
|
||||||
configuration : systemd_config,
|
configuration : systemd_config,
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ Description=PipeWire Multimedia Service
|
||||||
#
|
#
|
||||||
# After=pipewire.socket is not needed, as it is already implicit in the
|
# After=pipewire.socket is not needed, as it is already implicit in the
|
||||||
# socket-service relationship, see systemd.socket(5).
|
# socket-service relationship, see systemd.socket(5).
|
||||||
Requires=pipewire.socket
|
Requires=pipewire.socket @PW_SERVICE_REQS@
|
||||||
ConditionUser=!root
|
ConditionUser=!root
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue