systemd-logind.service fails to start (when attempting to return from rescue.target to graphical.target). How do I fix it?
I ended up in the same situation after restarting D-Bus daemon in Ubuntu 16.04.
I guess cycling through rescue target causes basically the same problem, a fresh D-Bus daemon is running, but somewhere in the system there is a reference to the old one.
I recovered from the login manager restart loop by "restarting" systemd
# systemctl daemon-reexec
(Note: Officially restarting D-Bus daemon is unsupported, because all D-Bus services running need to be restarted too, in order to make them register with the fresh D-Bus daemon. This needs to be done manually. Command busctl
shows you all registered D-Bus services, so if you run it advance you have a list of services you need to restart.)
Related videos on Youtube
Kumar
Updated on September 18, 2022Comments
-
Kumar over 1 year
I am using Debian 8 ("jessie"). I need to run some services in maintenance mode, So changed from Graphical to rescue mode using ,
systemctl isolate rescue.target
But When I tried to move back to default mode using,
systemctl isolate graphical.target
it fails to move back with the following errors.
Syslog:
Sep 20 05:24:22 test systemd[1]: Starting Login Service... Sep 20 05:24:22 test systemd[1]: systemd-logind.service: Start operation timed out. Terminating. Sep 20 05:24:22 test systemd[1]: Failed to start Login Service. Sep 20 05:24:22 test systemd[1]: systemd-logind.service: Unit entered failed state. Sep 20 05:24:22 test systemd[1]: systemd-logind.service: Failed with result 'timeout'. Sep 20 05:24:22 test systemd[1]: systemd-logind.service: Service has no hold-off time, scheduling restart. Sep 20 05:24:22 test systemd[1]: Stopped Login Service. Sep 20 05:24:22 test systemd[1]: Starting Login Service...
It loops on infinitely. Am I working wrongly ? please anyone guide me on this to proceed.
-
0xSheepdog over 6 yearsNot a definitive answer to the original question. Might be better as a comment to gather further details from the OP.
-
UdonN00dle over 6 yearsYes I agree, I wanted to post as a comment, but didn't have enough reputation to do so. My apologies. @0xSheepdog
-
0xSheepdog over 6 yearsAh, makes sense. If you edit your answer (just indicate 'comment' or something) I will undo the -1 (won't let me undo it until it has been edited.)
-
UdonN00dle over 6 yearsI'll edit my answer to mention comment, thank you! @0xSheepdog
-
JdeBP over 6 yearsForget about runlevels. They are "obsolete" in systemd.