Forum › Forums › Official Releases › antiX-21/22 “Grup Yorum” › service elogind not always started on boot
- This topic has 20 replies, 4 voices, and was last updated Dec 23-9:01 am by Xecure.
-
AuthorPosts
-
December 9, 2021 at 9:05 am #72605Member
seriousness
Hello, from time to time I have this issue in my installed antiX-21 runit (updated daily).
In the logs, I can’t find any hint what inhibits the start of elogind.
December 9, 2021 at 6:01 pm #72649Member
Xecure
::Runit just tries to load all services at once at startup, without following any order, so services that require other ones to start before hand sometimes fail, (even if the “dependency” start call runs from inside this service configuration.
I created a library script that should be included in runit-antix package to load or force-load a runit service that is required by other services. I use it myself, but it hasn’t been tested much by others, and I was planing on improving it, but, well, things happen and it gets put on hold.
I have the display manager (slimski) start elogind before is starts itself, so that I don’t care much about the race between services. This is my /etc/sv/slimski/run script:
#!/usr/bin/env /lib/runit/invoke-run set -e NAME="slimski" DAEMON=/usr/bin/slimski DEFAULT_DISPLAY_MANAGER_FILE=/etc/X11/default-display-manager DEFAULT_DISPLAY_MANAGER=$(cat $DEFAULT_DISPLAY_MANAGER_FILE) # Exit service if DAEMON is not installed if [ ! -x $DAEMON ]; then exit 161 fi # start only if slimski is the default DM if [ "$DEFAULT_DISPLAY_MANAGER" != "$DAEMON" ]; then exit 161 fi # Start elogind first (optional) if [ -r /lib/runit/invoke-depend ]; then . /lib/runit/invoke-depend start_dependency elogind start_dependency seatd else sv start elogind && sv check elogind || true sv start seatd && sv check seatd || true fi # Load language code . /etc/default/locale export LANG=$LANG bl=$(awk -F= -v RS=" " '/^lang=/ {print $2}' /proc/cmdline) export BLANG=$bl exec 2>&1 exec $DAEMONIt will start elogind or seatd if any (or both) are available services, before it starts itself. Try it out yourself (no need to backup the run script, the original is in /usr/share/runit/sv/slimski), and see of future reboots still experience the same issue.
If you are using a different login manager or you use a service to login without the need of a display manager, let me know and I will try to recommend a different method.
antiX Live system enthusiast.
General Live Boot Parameters for antiX.December 10, 2021 at 8:01 am #72688Member
seriousness
::Hi Xecure,
I use the defaults – elogind and slimski. Now I uncommented the line
# sv start elogind && sv check elogind || truein /etc/sv/slimski/run and it seems to work.
Does runit allow to keep a renamed copy of the original run file in the service directory?
- This reply was modified 1 year, 4 months ago by seriousness.
December 11, 2021 at 8:01 am #72736Member
seriousness
::Now again: elogind not running. After entering my password, it takes about 2 minutes until desktop appears resp. to get a prompt on tty.
December 11, 2021 at 11:24 am #72746Forum Admin
anticapitalista
::Post output of
pstreeandls -la /etc/service/Philosophers have interpreted the world in many ways; the point is to change it.
antiX with runit - leaner and meaner.
December 11, 2021 at 12:24 pm #72748Member
Xecure
::Does runit allow to keep a renamed copy of the original run file in the service directory?
You can make a backup and name it however you like. runit will only load the run and finish scripts (and maybe some other config and check files).
Replace /etc/sv/elogind/run with:
#!/usr/bin/env /lib/runit/invoke-run set -e NAME="elogind" DAEMON=/usr/lib/elogind/elogind # Exit service if DAEMON is not installed if [ ! -x $DAEMON ]; then exit 161 fi # Start dbus first if [ -r /lib/runit/invoke-depend ]; then . /lib/runit/invoke-depend force_dependency dbus else sv start dbus && sv check dbus || exit 170 fi exec 2>&1 exec $DAEMONSince using this force_dependency function, I never had any problems anymore with hard dependencies (for both connman and elogind)
antiX Live system enthusiast.
General Live Boot Parameters for antiX.December 11, 2021 at 1:09 pm #72752Member
seriousness
::@anti:
$ pstree runit─┬─claws-mail───{claws-mail} ├─conky───6*[{conky}] ├─dbus-daemon ├─dbus-launch ├─devmon───udevil ├─gconfd-2 ├─palemoon───46*[{palemoon}] ├─roxterm─┬─bash───bash─┬─grep │ │ ├─mpg123───mpg123 │ │ └─sed │ ├─bash───pstree │ └─{roxterm} ├─runsvdir─┬─runsv─┬─connmand │ │ └─svlogd │ ├─runsv───slimski─┬─Xorg───6*[{Xorg}] │ │ └─desktop-session───jwm │ ├─runsv───elogind │ ├─6*[runsv] │ ├─runsv───rpcbind │ ├─6*[runsv───getty] │ ├─runsv───avahi-daemon───avahi-daemon │ ├─runsv───gpm │ ├─runsv───cupsd │ ├─runsv───rsyslogd───3*[{rsyslogd}] │ ├─runsv───dbus-daemon │ ├─runsv───saned │ ├─runsv───haveged │ ├─runsv───sshd │ ├─runsv───udevd │ ├─runsv───bluetoothd │ ├─runsv───cron │ └─runsv───acpid ├─volumeicon └─wpa_supplicantDecember 11, 2021 at 1:19 pm #72753Member
seriousness
::I can’t post the output of ls -la /etc/service/
A potentially unsafe operation has been detected in your request to this site
Your access to this service has been limited. (HTTP response code 403)
If you think you have been blocked in error, contact the owner of this site for assistance.
Block Technical Data
Block Reason: A potentially unsafe operation has been detected in your request to this siteDecember 11, 2021 at 1:22 pm #72754Member
seriousness
December 11, 2021 at 1:24 pm #72755Forum Admin
anticapitalista
::Ok, pstree seems ok. Try what Xecure suggested.
Philosophers have interpreted the world in many ways; the point is to change it.
antiX with runit - leaner and meaner.
December 15, 2021 at 8:29 am #72962Member
seriousness
December 15, 2021 at 5:26 pm #73015Member
Xecure
::Change the slimski service to force depend on elogind to force it to start. Edit the run script for slimski I shared earlier and change:
start_dependency elogind
for:
force_dependency elogindantiX Live system enthusiast.
General Live Boot Parameters for antiX.December 16, 2021 at 10:45 am #73033Member
seriousness
::Done – looks good so far.
But now I have these in dmesg:
[ 15.262850] loginctl[1480]: Failed to connect to bus: No such file or directory [ 15.723447] loginctl[1531]: Failed to connect to bus: No such file or directory [ 16.154749] loginctl[1548]: Failed to connect to bus: No such file or directoryShould I worry?
December 20, 2021 at 10:06 am #73310Member
seriousness
December 20, 2021 at 3:39 pm #73335Member
Xecure
::Use runit-service-manager.sh GUI to enable logs for dbus, connman, elogind and slimski.
Next time elogind doesn’t start, check the logs in /var/log/runit/ and share with us any clue you see there.I have been running runit since antiX 21b1 and tweaked the services that required dependencies until what I shared above.
My hypothesis for your problem is that dbus takes too long to start or fails when called by elogind, which also fails to start, and that leads to this result. It is strange because something similar (connman not starting because f dbus failing to start and then having to manually start it) use to happen to me at the beginning of the beta testing. I no longer have this issue myself.
Could you share
grep -i " elogind\| dbus" /etc/service/*/run
and also
cat /lib/runit/invoke-dependantiX Live system enthusiast.
General Live Boot Parameters for antiX. -
AuthorPosts
- You must be logged in to reply to this topic.