Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: [SOLVED] 🍇 elogind-runit shows error if it starts before dbus (Read 1013 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

[SOLVED] 🍇 elogind-runit shows error if it starts before dbus

Hi everyone. I am started to use runit and stumbled upon little visual issue. Sometimes during boot appears "bus-manager: could not connect to the system bus (Could not connect: No such file or directory)". As far as I know it's just a noise because after half a second elogind tries to start again. After adding little delay of 1 sec issue seems gone. Since package elogind-runit could be updated I just added simple shell script(with sleep 1 and +x permission ofc) to /etc/runit/sv/elogind/control/u. I think it worth a change because most display managers have delay of 1 sec anyway.

I hope package maintainer will see it. Cheers.

Re: 🍇 elogind-runit shows error if it starts before dbus

Reply #1
Adding random sleeps to init scripts is one of those things everyone (rightfully) hates. :P Runit doesn't really have service management capabilities so races like this aren't exactly solvable. That said, it does check if dbus is up before trying to start elogind but there's a bit of a delay between when the dbus daemon starts and when it is actually ready to receive messages. Hence why you get that message.

Re: 🍇 elogind-runit shows error if it starts before dbus

Reply #2
Adding random sleeps to init scripts is one of those things everyone (rightfully) hates. :P Runit doesn't really have service management capabilities so races like this aren't exactly solvable. That said, it does check if dbus is up before trying to start elogind but there's a bit of a delay between when the dbus daemon starts and when it is actually ready to receive messages. Hence why you get that message.

Makes sense. I found why it doesn't work right. There mistake in dbus check script(/etc/runit/sv/dbus/check).

            There: exec dbus-send --system / org.desktop.DBus.Peer.Ping >/dev/null 2>&1
It should be: exec dbus-send --system / org.freedesktop.DBus.Peer.Ping >/dev/null 2>&1

Otherwise: "Error org.freedesktop.DBus.Error.UnknownMethod: Method "Ping" with signature "" on interface "org.desktop.DBus.Peer" doesn't exist"

I don't see elogind errors anymore. Now everything as it should and without any sleep.

Re: 🍇 elogind-runit shows error if it starts before dbus

Reply #3
Alright. I've fixed the DBus check script, it should be in [system] now.
now only the dinit guy in artix