Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: [SOLVED] elogind fails to start (Read 3338 times) previous topic - next topic
0 Members and 6 Guests are viewing this topic.

[SOLVED] elogind fails to start

Hi all,

I'm using runit as my init system, and it may be related to this.
Although I'm not experiencing any noticeable issues from it, when I've brought up my running services using rsm, I've noticed that elogind is down, I"m not sure why, and unfortunately I never created a custom logging daemon to determine what was going on.

Any advice on how to start troubleshooting this?

Thanks in advance for all advice/recommendations.

EDIT: And now it's up after a reboot... I'll keep you guys posted as this behavior I noticed on my laptop as well, but am unsure as to what the behavior issue is....gonna create a log script for it now...


Re: elogind fails to start (runit)

Reply #2
Ok, the classic sv status show that they are both up and running

Code: [Select]
run: dbus (pid 1139) 423s;  run: log: (pid 1135) 423s

And now that i've set up elogind running, looks similar as well

Code: [Select]
run: elogind: (pid 3279) 373s;; run: log: (pid 1143) 425s

The grepping of the /var/log/errors.log returns  something interesting related to a previous post of mine:

Code: [Select]
Apr 27 12:35:46 artix elogind[31522]: elogind is already running as PID 1316
Apr 27 12:35:47 artix elogind[31530]: elogind is already running as PID 1316
Apr 27 12:35:48 artix elogind[31533]: elogind is already running as PID 1316
Apr 27 12:35:49 artix elogind[31543]: elogind is already running as PID 1316
Apr 27 12:35:49 artix lightdm[1787]: pam_elogind(lightdm:session): Failed to connect to system bus: No such file or directory
Apr 27 12:36:30 artix lightdm[1755]: pam_elogind(lightdm-greeter:session): Failed to release session: No session 'c1' known
Apr 27 12:41:07 artix lightdm[1788]: pam_elogind(lightdm:session): Failed to connect to system bus: No such file or directory
Apr 27 12:41:48 artix lightdm[1771]: pam_elogind(lightdm-greeter:session): Failed to release session: No session 'c1' known
Apr 27 13:23:56 artix lightdm[1804]: pam_elogind(lightdm:session): Failed to connect to system bus: No such file or directory
Apr 27 13:24:37 artix lightdm[1765]: pam_elogind(lightdm-greeter:session): Failed to release session: No session 'c1' known

I'd like to keep lightdm if possible...

Re: elogind fails to start (runit)

Reply #3
In the future, please use code tags for code blocks/program output.

Have you upgraded your system recently? If not, execute (as root):
Code: [Select]
pacman -Syu
Next, check /etc/pam.d for *.pacnew files and merge (or move) them to their respective intended locations. Files /etc/pam.d/lightdm* are especially of interest here.

Edit: Also check /etc/pam.d/system-login for the lines (near the end of that file):
Code: [Select]
-session   optional   pam_elogind.so
session    required   pam_env.so           user_readenv=1
-session           optional   pam_rundir.so

Re: elogind fails to start (runit)

Reply #4
Sorry about that, in my rush, I forgot about the code tags.

I do regularly keep my system up to date (pacman -Syu on the daily). So I doubt that would be the issue.

I am unfamiliar with the /etc/pam.d directory but am looking at it now, I find no pacnew files using ls -liash in there but do see some lightdm files...

lightdm
Code: [Select]
#%PAM-1.0
auth        include     system-login
-auth       optional    pam_gnome_keyring.so
account     include     system-login
password    include     system-login
session     include     system-login
-session    optional    pam_gnome_keyring.so auto_start

lightdm-autologin
Code: [Select]
#%PAM-1.0
auth        required    pam_env.so
auth        required    pam_faillock.so preauth
auth        required    pam_shells.so
auth        required    pam_nologin.so
auth        [success=1 default=ignore]  pam_succeed_if.so user ingroup autologin
auth        required    pam_unix.so
auth        required    pam_permit.so
-auth       optional    pam_gnome_keyring.so
account     include     system-local-login
password    include     system-local-login
session     include     system-local-login
-session    optional    pam_gnome_keyring.so auto_start

lightdm-greeter
Code: [Select]
#%PAM-1.0

# Load environment from /etc/environment and ~/.pam_environment
auth      required pam_env.so

# Always let the greeter start without authentication
auth      required pam_permit.so

# No action required for account management
account   required pam_permit.so

# Can't change password
password  required pam_deny.so

# Setup session
session   required pam_unix.so
session   optional pam_elogind.so

In all honesty I don't know what to look for within each of these files. Any help would again, be greatly appreciated. And thank you for everything thus far!

EDIT:
Quote
Edit: Also check /etc/pam.d/system-login for the lines (near the end of that file):
Code: [Select]
-session   optional   pam_elogind.so
session    required   pam_env.so           user_readenv=1
-session           optional   pam_rundir.so

Thanks, just checked it and yes, I have those as my last three lines in the system-login file.

NOTE: Everything works fine now technically (elogind is up, and there's no explanation as to why it went down in the first place).

But I have been having issues with lightdm-greeter not showing up and instead bringing me to a blank black screen with a cursor, but no input allowed. I was able to temporarily solve this by simply reinitializing my initramfs and updating grub. The problem persists, however, usually after a few hours of leaving the computer completely shut off. nous suggested in another thread that I simply remove lightdm, but I'd like to avoid that if at all possible.


Re: elogind fails to start (runit)

Reply #6
After a discussion with Artix team members, lightdm-runit needs to be updated to wait for elogind instead of dbus. elogind service already waits on dbus, and lightdm doesn't wait on elogind.

Thanks for the report and your patience and stay tuned for the update.

Oh wow, I didn't realize this was something that needed to be updated by the team.

Thank you so much for the help! You're all the best!!

Re: elogind fails to start (runit)

Reply #7
I just pushed a new version of lightdm-runit to testing that now depends on elogind service and has a log service, it will be moved to extra in a week if no one complains so download and install it manually if you want to try it right now.

Re: elogind fails to start

Reply #8
I just pushed a new version of lightdm-runit to testing that now depends on elogind service and has a log service, it will be moved to extra in a week if no one complains so download and install it manually if you want to try it right now.

Nice! Thank you. I'm having trouble getting pacman to find it though.

I've uncommented the testing repos  in my pacman.conf.

Code: [Select]
[testing] 
Include = /etc/pacman.d/mirrorlist-arch

But when I invoke:

sudo pacman -S lightdm-runit

I only get the world version of it (which is the one I have installed).

Code: [Select]
warning: lightdm-runit-20180226-4 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Package (1)          Old Version  New Version  Net Change  Download Size

world/lightdm-runit  20180226-4   20180226-4     0.00 MiB       0.00 MiB

Total Download Size:   0.00 MiB
Total Installed Size:  0.00 MiB
Net Upgrade Size:      0.00 MiB

I also have tried:

sudo pacman -S testing/lightdm-runit

And it says the target not found.

Code: [Select]
error: target not found: lightdm-runit

Am I doing something wrong? Sorry...still a total noob.




Re: elogind fails to start

Reply #11
Download from gremlins repo here: https://mirrors.dotsrc.org/artix-linux/repos/gremlins/os/x86_64/lightdm-runit-20220428-1-any.pkg.tar.zst

Then open a terminal in the containing folder and issue this command:
Code: [Select]
sudo pacman -U lightdm-runit-20220428-1-any.pkg.tar.zst


Thank you, I installed it, but when I rebooted even my initramfs wasn't able to start lightdm. I had to use a live-installation media and artix-chroot to downgrade my packages .  The /var/log created by the lightdm service is still on my system, here's what it reads:

Code: [Select]
2022-04-30_22:45:22.31144 
2022-04-30_22:45:22.31149 ** (lightdm:1186): WARNING **: 15:45:22.311: Failed to get system bus: Could not connect: No such file or directory
2022-04-30_22:45:22.31331 Failed to get D-Bus connection
2022-04-30_22:45:23.35293
2022-04-30_22:45:23.35293 ** (lightdm:1488): WARNING **: 15:45:23.352: Error getting user list from org.freedesktop.Accounts: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Accounts was not provided by any .service files
2022-04-30_22:45:24.45324
2022-04-30_22:45:24.45324 ** (lightdm:1773): WARNING **: 15:45:24.452: Error getting user list from org.freedesktop.Accounts: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Accounts was not provided by any .service files
2022-04-30_22:45:25.52550
2022-04-30_22:45:25.52550 ** (lightdm:1843): WARNING **: 15:45:25.525: Error getting user list from org.freedesktop.Accounts: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Accounts was not provided by any .service files
2022-04-30_22:45:26.55933
2022-04-30_22:45:26.55933 ** (lightdm:1852): WARNING **: 15:45:26.559: Error getting user list from org.freedesktop.Accounts: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Accounts was not provided by any .service files
2022-04-30_22:45:27.59475
2022-04-30_22:45:27.59475 ** (lightdm:1861): WARNING **: 15:45:27.594: Error getting user list from org.freedesktop.Accounts: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Accounts was not provided by any .service files
2022-04-30_22:45:28.63011
2022-04-30_22:45:28.63012 ** (lightdm:1870): WARNING **: 15:45:28.629: Error getting user list from org.freedesktop.Accounts: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Accounts was not provided by any .service files
2022-04-30_22:45:29.66617
2022-04-30_22:45:29.66618 ** (lightdm:1879): WARNING **: 15:45:29.665: Error getting user list from org.freedesktop.Accounts: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Accounts was not provided by any .service files
2022-04-30_22:45:30.70214
2022-04-30_22:45:30.70214 ** (lightdm:1888): WARNING **: 15:45:30.701: Error getting user list from org.freedesktop.Accounts: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Accounts was not provided by any .service files
2022-04-30_22:45:31.73827
2022-04-30_22:45:31.73827 ** (lightdm:1905): WARNING **: 15:45:31.737: Error getting user list from org.freedesktop.Accounts: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Accounts was not provided by any .service files
2022-04-30_22:45:32.77422
2022-04-30_22:45:32.77422 ** (lightdm:1915): WARNING **: 15:45:32.773: Error getting user list from org.freedesktop.Accounts: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Accounts was not provided by any .service files
2022-04-30_22:45:33.83602
2022-04-30_22:45:33.83602 ** (lightdm:1941): WARNING **: 15:45:33.835: Error getting user list from org.freedesktop.Accounts: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Accounts was not provided by any .service files
2022-04-30_22:45:34.87289
2022-04-30_22:45:34.87290 ** (lightdm:1950): WARNING **: 15:45:34.872: Error getting user list from org.freedesktop.Accounts: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Accounts was not provided by any .service files
2022-04-30_22:45:35.90902
2022-04-30_22:45:35.90903 ** (lightdm:1959): WARNING **: 15:45:35.908: Error getting user list from org.freedesktop.Accounts: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Accounts was not provided by any .service files
2022-04-30_22:45:36.94495
2022-04-30_22:45:36.94496 ** (lightdm:1968): WARNING **: 15:45:36.944: Error getting user list from org.freedesktop.Accounts: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Accounts was not provided by any .service files
2022-04-30_22:45:37.98103
2022-04-30_22:45:37.98103 ** (lightdm:1977): WARNING **: 15:45:37.980: Error getting user list from org.freedesktop.Accounts: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Accounts was not provided by any .service files
2022-04-30_22:45:39.01710
2022-04-30_22:45:39.01710 ** (lightdm:1986): WARNING **: 15:45:39.016: Error getting user list from org.freedesktop.Accounts: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Accounts was not provided by any .service files
2022-04-30_22:45:40.05277
2022-04-30_22:45:40.05277 ** (lightdm:2003): WARNING **: 15:45:40.052: Error getting user list from org.freedesktop.Accounts: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Accounts was not provided by any .service files
2022-04-30_22:45:41.08889
2022-04-30_22:45:41.08890 ** (lightdm:2013): WARNING **: 15:45:41.088: Error getting user list from org.freedesktop.Accounts: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Accounts was not provided by any .service files
2022-04-30_22:45:42.12486
2022-04-30_22:45:42.12487 ** (lightdm:2039): WARNING **: 15:45:42.124: Error getting user list from org.freedesktop.Accounts: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Accounts was not provided by any .service files
2022-04-30_22:45:43.16066
2022-04-30_22:45:43.16067 ** (lightdm:2048): WARNING **: 15:45:43.160: Error getting user list from org.freedesktop.Accounts: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Accounts was not provided by any .service files
2022-04-30_22:45:44.19664
2022-04-30_22:45:44.19664 ** (lightdm:2057): WARNING **: 15:45:44.196: Error getting user list from org.freedesktop.Accounts: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Accounts was not provided by any .service files
2022-04-30_22:45:45.23257
2022-04-30_22:45:45.23258 ** (lightdm:2066): WARNING **: 15:45:45.232: Error getting user list from org.freedesktop.Accounts: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Accounts was not provided by any .service files
2022-04-30_22:45:46.26854
2022-04-30_22:45:46.26855 ** (lightdm:2075): WARNING **: 15:45:46.268: Error getting user list from org.freedesktop.Accounts: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Accounts was not provided by any .service files
2022-04-30_22:45:47.30449
2022-04-30_22:45:47.30450 ** (lightdm:2084): WARNING **: 15:45:47.304: Error getting user list from org.freedesktop.Accounts: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Accounts was not provided by any .service files
2022-04-30_22:45:48.33979
2022-04-30_22:45:48.33980 ** (lightdm:2101): WARNING **: 15:45:48.339: Error getting user list from org.freedesktop.Accounts: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Accounts was not provided by any .service files
2022-04-30_22:45:49.37582
2022-04-30_22:45:49.37582 ** (lightdm:2128): WARNING **: 15:45:49.375: Error getting user list from org.freedesktop.Accounts: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Accounts was not provided by any .service files
2022-04-30_22:45:50.41152
2022-04-30_22:45:50.41153 ** (lightdm:2137): WARNING **: 15:45:50.411: Error getting user list from org.freedesktop.Accounts: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Accounts was not provided by any .service files
2022-04-30_22:45:51.44782
2022-04-30_22:45:51.44782 ** (lightdm:2146): WARNING **: 15:45:51.447: Error getting user list from org.freedesktop.Accounts: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Accounts was not provided by any .service files
2022-04-30_22:45:52.48427
2022-04-30_22:45:52.48428 ** (lightdm:2155): WARNING **: 15:45:52.483:


I know this is an obviously very new package, and am very grateful that this was looked into, but it appears this particular package doesn't work, at least for me.

Side note: Is there a way I can access a tty before my system attempts to start lightdm so I won't have to do this? I believe I read that you can do this in GRUB somewhere...

Again, thanks to all for the help.

Re: elogind fails to start

Reply #12
my initramfs wasn't able to start lightdm.
You start lightdm in your initramfs? O.o

The way the lightdm service didn't actually change, only the "dependency management" changes in the way it waits and what it is waiting for.

Have you changed anything in the services you installed?

 

Re: elogind fails to start

Reply #13
I installed it, but when I rebooted even my initramfs wasn't able to start lightdm.

https://www.kernel.org/doc/html/latest/filesystems/ramfs-rootfs-initramfs.html#what-is-initramfs
Quote
All 2.6 Linux kernels contain a gzipped “cpio” format archive, which is extracted into rootfs when the kernel boots up. After extracting, the kernel checks to see if rootfs contains a file “init”, and if so it executes it as PID 1. If found, this init process is responsible for bringing the system the rest of the way up, including locating and mounting the real root device (if any). If rootfs does not contain an init program after the embedded cpio archive is extracted into it, the kernel will fall through to the older code to locate and mount a root partition, then exec some variant of /sbin/init out of that.

initramfs doesn't start services. That is done by the init system. initramfs only starts the init.

I had to use a live-installation media and artix-chroot to downgrade my packages .
[...]
Side note: Is there a way I can access a tty before my system attempts to start lightdm so I won't have to do this? I believe I read that you can do this in GRUB somewhere...
You can disable the lightdm service from LiveISO chroot, then reboot and login through getty.

It would be most beneficial if you recalled whether you have taken any non-ordinary step when you installed your system, set any custom/nonstandard configuration or setting. Especially regarding mkinitcpio.

Re: elogind fails to start

Reply #14
Okay so there is definitely a race condition that causes the elogind service to fail to start but it should not actually create any issue:
when you launch an X session it starts its own elogind-daemon if there isn't already one running but it seems the one that is started by lightdm's X instance is faster to start than the one from the elogind service. So the service is fails to start and is shown as down but you still have elogind running.

I don't have a way to fix the race condition right now but it shouldn't be an actual issue even if it has to be fixed for determinism purposes.

The errors produced in the lightdm logs most likely don't come from this.

By any chance do you have a network manager service that starts at boot and autoconnects to a network?