﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc
16177	elogind not getting killed when dbus is killed	Joe Locash	pierre	"In sysvinit builds (obviously) elogind isn't getting killed in rc1 as it should. It's only a noticable problem when switching from a higher init level to 1 and then back to a higher level ie - booting into init 3, switching to 1, and then back to 3.

When switching back to a higher init level dbus will try to start elogind because of elogind's dbus service file.  Since elogind is already running it detects that and won't start another process.  Even though there is an elogind process running it isn't registered with the currently running dbus process so logins can take some time to process because dbus starts elogind and waits for it to register.

To reproduce:
  Boot to any init level and switch to init 1.  Do a ps and you will see that elogind is still running.  Switch back to a higher init level (for testing I would recommend 2 or 3 to take X/Wayland out of the picture).  On the console you should see a message that elogind is already running as PID xyz.  Trying to login will result in a 45 second pause because dbus is waiting for elogind to register, which it can't because it's already running.

I suggest starting/stopping elogind in the init system instead of having dbus starting it and nothing shutting it down.  The other distros do this.

I've attached a patch for blfs-bootscripts-20210826 that I use that has the init script  I made.  The elogind dbus service file should also be changed with this sed:
  sed -i ""s|^Exec=.*|Exec=/bin/true|"" src/login/org.freedesktop.login1.service.in
for a source build or just apply it to /usr/share/dbus-1/system-services/org.freedesktop.login1.service

I've tagged this for 11.2 since 11.1 is due out soon.
"	defect	closed	normal	11.2	BOOK	git	medium	fixed		
