mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
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.
(cherry picked from commit 2625983a23)
33 lines
1.2 KiB
Meson
33 lines
1.2 KiB
Meson
systemd_user_services_dir = systemd.get_variable('systemduserunitdir', pkgconfig_define : [ 'prefix', prefix])
|
|
if get_option('systemd-user-unit-dir') != ''
|
|
systemd_user_services_dir = get_option('systemd-user-unit-dir')
|
|
endif
|
|
|
|
install_data(
|
|
sources : ['pipewire.socket', 'pipewire-pulse.socket'],
|
|
install_dir : systemd_user_services_dir)
|
|
|
|
systemd_config = configuration_data()
|
|
systemd_config.set('PW_BINARY', pipewire_bindir / 'pipewire')
|
|
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',
|
|
output : 'pipewire.service',
|
|
configuration : systemd_config,
|
|
install_dir : systemd_user_services_dir)
|
|
|
|
configure_file(input : 'pipewire-pulse.service.in',
|
|
output : 'pipewire-pulse.service',
|
|
configuration : systemd_config,
|
|
install_dir : systemd_user_services_dir)
|
|
|
|
configure_file(input : 'filter-chain.service.in',
|
|
output : 'filter-chain.service',
|
|
configuration : systemd_config,
|
|
install_dir : systemd_user_services_dir)
|