Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: Help me review dinit configuration (Read 500 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Help me review dinit configuration

Hi, I have configured pipewire and wireplumber to run as user level services but I see some errors in the logs and if I exit the X session and restart it, wireplumber doesn't work without restarting the service (I am using Xlibre + i3).

I have used these dinit configuration files:
dinit files

pipewire.log
Code: [Select]
[E][17:33:27.966574] mod.rt       | [     module-rt.c:  294 pw_rtkit_bus_get()] Failed to connect to session bus: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
[W][17:33:27.966921] mod.rt       | [     module-rt.c:  330 translate_error()] RTKit error: org.freedesktop.DBus.Error.ServiceUnknown
[W][17:33:27.966929] mod.rt       | [     module-rt.c:  995 do_rtkit_setup()] RTKit does not give us MaxRealtimePriority, using 1
[W][17:33:27.966971] mod.rt       | [     module-rt.c:  330 translate_error()] RTKit error: org.freedesktop.DBus.Error.ServiceUnknown
[W][17:33:27.966973] mod.rt       | [     module-rt.c: 1000 do_rtkit_setup()] RTKit does not give us MinNiceLevel, using 0
[W][17:33:27.967006] mod.rt       | [     module-rt.c:  330 translate_error()] RTKit error: org.freedesktop.DBus.Error.ServiceUnknown
[W][17:33:27.967007] mod.rt       | [     module-rt.c: 1005 do_rtkit_setup()] RTKit does not give us RTTimeUSecMax, using -1
[E][17:33:27.968597] spa.dbus     | [          dbus.c:  333 impl_connection_get()] Failed to connect to session bus: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
[E][17:33:27.968630] mod.portal   | [ module-portal.c:  318 pipewire__module_init()] Failed to connect to session bus: Input/output error

pipewire-pulse.log
Code: [Select]
[E][17:33:27.966574] mod.rt       | [     module-rt.c:  294 pw_rtkit_bus_get()] Failed to connect to session bus: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
[W][17:33:27.966962] mod.rt       | [     module-rt.c:  330 translate_error()] RTKit error: org.freedesktop.DBus.Error.ServiceUnknown
[W][17:33:27.966972] mod.rt       | [     module-rt.c:  995 do_rtkit_setup()] RTKit does not give us MaxRealtimePriority, using 1
[W][17:33:27.967022] mod.rt       | [     module-rt.c:  330 translate_error()] RTKit error: org.freedesktop.DBus.Error.ServiceUnknown
[W][17:33:27.967024] mod.rt       | [     module-rt.c: 1000 do_rtkit_setup()] RTKit does not give us MinNiceLevel, using 0
[W][17:33:27.967055] mod.rt       | [     module-rt.c:  330 translate_error()] RTKit error: org.freedesktop.DBus.Error.ServiceUnknown
[W][17:33:27.967056] mod.rt       | [     module-rt.c: 1005 do_rtkit_setup()] RTKit does not give us RTTimeUSecMax, using -1
[E][17:33:27.970312] spa.dbus     | [          dbus.c:  333 impl_connection_get()] Failed to connect to session bus: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11

wireplumber.log
Code: [Select]
W 17:33:37.599128             mod.rt ../pipewire/src/modules/module-rt.c:330:translate_error: RTKit error: org.freedesktop.DBus.Error.ServiceUnknown
W 17:33:37.599156             mod.rt ../pipewire/src/modules/module-rt.c:995:do_rtkit_setup: RTKit does not give us MaxRealtimePriority, using 1
W 17:33:37.599195             mod.rt ../pipewire/src/modules/module-rt.c:330:translate_error: RTKit error: org.freedesktop.DBus.Error.ServiceUnknown
W 17:33:37.599197             mod.rt ../pipewire/src/modules/module-rt.c:1000:do_rtkit_setup: RTKit does not give us MinNiceLevel, using 0
W 17:33:37.599230             mod.rt ../pipewire/src/modules/module-rt.c:330:translate_error: RTKit error: org.freedesktop.DBus.Error.ServiceUnknown
W 17:33:37.599232             mod.rt ../pipewire/src/modules/module-rt.c:1005:do_rtkit_setup: RTKit does not give us RTTimeUSecMax, using -1
E 17:33:37.894792            default ../pipewire/spa/plugins/bluez5/upower.c:54:upower_get_percentage_properties_reply: Failed to get percentage from UPower: org.freedesktop.DBus.Error.NameHasNoOwner
N 17:33:37.898150          wp-device ../wireplumber/lib/wp/device.c:710:wp_spa_device_new_from_spa_factory: SPA handle 'api.libcamera.enum.manager' could not be loaded; is it installed?
N 17:33:37.898169 s-monitors-libcame enumerate-device.lua:30:chunk: PipeWire's libcamera SPA plugin is missing or broken. Some camera types may not be supported.
N 18:03:34.715672  m-dbus-connection ../wireplumber/modules/module-dbus-connection.c:138:on_connection_closed: <WpDBusConnection:0x5626312464c0> DBus connection closed: Underlying GIOStream returned 0 bytes on an async read
N 18:03:34.716619  m-dbus-connection ../wireplumber/modules/module-dbus-connection.c:146:on_connection_closed: <WpDBusConnection:0x5626312464c0> Trying to reconnect after core sync
N 18:03:34.849862  m-dbus-connection ../wireplumber/modules/module-dbus-connection.c:128:on_sync_reconnect: <WpDBusConnection:0x5626312464c0> Cannot reconnect: Error acquiring bus address: Error spawning command line “dbus-launch --autolaunch=eb9b05f2b77746be14fea779688e563b --binary-syntax --close-stderr”: Child process exited with code 1
W 18:07:01.151333            pw.core ../pipewire/src/pipewire/core.c:199:destroy_proxy: 0x5626312d0bb0: leaked proxy 0x56263151a3d0 id:6
W 18:07:01.154934             mod.rt ../pipewire/src/modules/module-rt.c:330:translate_error: RTKit error: org.freedesktop.DBus.Error.ServiceUnknown
W 18:07:01.154961             mod.rt ../pipewire/src/modules/module-rt.c:995:do_rtkit_setup: RTKit does not give us MaxRealtimePriority, using 1
W 18:07:01.155007             mod.rt ../pipewire/src/modules/module-rt.c:330:translate_error: RTKit error: org.freedesktop.DBus.Error.ServiceUnknown
W 18:07:01.155010             mod.rt ../pipewire/src/modules/module-rt.c:1000:do_rtkit_setup: RTKit does not give us MinNiceLevel, using 0
W 18:07:01.155055             mod.rt ../pipewire/src/modules/module-rt.c:330:translate_error: RTKit error: org.freedesktop.DBus.Error.ServiceUnknown
W 18:07:01.155058             mod.rt ../pipewire/src/modules/module-rt.c:1005:do_rtkit_setup: RTKit does not give us RTTimeUSecMax, using -1
E 18:07:01.448121            default ../pipewire/spa/plugins/bluez5/upower.c:54:upower_get_percentage_properties_reply: Failed to get percentage from UPower: org.freedesktop.DBus.Error.NameHasNoOwner
N 18:07:01.453238          wp-device ../wireplumber/lib/wp/device.c:710:wp_spa_device_new_from_spa_factory: SPA handle 'api.libcamera.enum.manager' could not be loaded; is it installed?
N 18:07:01.453257 s-monitors-libcame enumerate-device.lua:30:chunk: PipeWire's libcamera SPA plugin is missing or broken. Some camera types may not be supported.

Re: Help me review dinit configuration

Reply #1
Most of these error messages are harmless, they're essentially esoteric ways of saying optional dependencies weren't found.

Only thing that's related to your issue here are Failed to connect to the session bus and DBus connection closed. Your user services assume there's a user-level DBus outside dinit they can talk to, but this isn't always true; on your setup (in general, when a DBus user service is absent), user-level DBus is spawned by X11 in a random address, and when X11 exits (and DBus alongside it), they're left in a sort of limbo they can only leave by restarting and finding where the new X11 has placed the new DBus.

Either bring those dinit services down with X11 too, or make a DBus service. The latter, however, requires some knowledge on how D-Bus works to make it work properly with your other services. I'd recommend sticking with the distribution-provided dbus-dinit-user wireplumber-dinit pipewire-dinit pipewire-pulse-dinit, they deal with the nitty-gritty needed to survive the GUI session stopping.

Re: Help me review dinit configuration

Reply #2
Just create and enable this user service instead of your dbus-user-check:
Code: [Select]
type = process
command = /usr/bin/dbus-daemon --session --nofork --address unix:path=$XDG_RUNTIME_DIR/bus
smooth-recovery = true

Re: Help me review dinit configuration

Reply #3
This file is not as good as than the packaged one.

  • It doesn't wait for dbus-daemon to notify it is ready
  • It doesn't export DBUS_SESSION_BUS_ADDRESS to other dinit user services
  • smooth-recovery shouldn't be set to true because, as we can see through this user's report, when dbus-daemon crashes stuff that uses it should be restarted.

Re: Help me review dinit configuration

Reply #4
I installed the dbus-dinit-user as suggested and enabled it then I replaced on the wireplumber configuration the line
depends-on = user-dbus-check to depends-on = dbus.

It is working now when I restart X session. Thanks!