Artix Linux Forum

Init systems => runit => Topic started by: z3rOR0ne on 27 April 2022, 21:08:15

Title: [SOLVED] elogind fails to start
Post by: z3rOR0ne on 27 April 2022, 21:08:15
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...
Title: Re: elogind fails to start (runit)
Post by: strajder on 27 April 2022, 22:00:52
As root, what does
Code: [Select]
sv status elogind
sv status dbus
return? And
Code: [Select]
grep elogind /var/log/errors.log | tail
Title: Re: elogind fails to start (runit)
Post by: z3rOR0ne on 27 April 2022, 22:32:52
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...
Title: Re: elogind fails to start (runit)
Post by: strajder on 27 April 2022, 22:52:29
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
Title: Re: elogind fails to start (runit)
Post by: z3rOR0ne on 27 April 2022, 23:00:44
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.
Title: Re: elogind fails to start (runit)
Post by: strajder on 27 April 2022, 23:16:53
After a discussion with Artix team members, lightdm-runit (https://gitea.artixlinux.org/packagesL/lightdm-runit/src/commit/ac5e1bde84d0f9dd31ff8c0e35ba59acfcb1a849/trunk/lightdm.run#L2) 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.
Title: Re: elogind fails to start (runit)
Post by: z3rOR0ne on 27 April 2022, 23:26:01
After a discussion with Artix team members, lightdm-runit (https://gitea.artixlinux.org/packagesL/lightdm-runit/src/commit/ac5e1bde84d0f9dd31ff8c0e35ba59acfcb1a849/trunk/lightdm.run#L2) 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!!
Title: Re: elogind fails to start (runit)
Post by: qontinuum on 28 April 2022, 18:38:11
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.
Title: Re: elogind fails to start
Post by: z3rOR0ne on 29 April 2022, 21:31:15
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.

Title: Re: elogind fails to start
Post by: nous on 30 April 2022, 00:00:30
Code: [Select]
[testing] 
Include = /etc/pacman.d/mirrorlist-arch
Artix testing is named gremlins: https://wiki.artixlinux.org/Main/Repositories#Testing
Title: Re: elogind fails to start
Post by: conky60 on 30 April 2022, 12:34:29
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
Title: Re: elogind fails to start
Post by: z3rOR0ne on 01 May 2022, 01:02:37
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.
Title: Re: elogind fails to start
Post by: qontinuum on 01 May 2022, 12:27:58
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?
Title: Re: elogind fails to start
Post by: strajder on 01 May 2022, 13:12:23
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.
Title: Re: elogind fails to start
Post by: qontinuum on 01 May 2022, 13:24:53
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?
Title: Re: elogind fails to start
Post by: z3rOR0ne on 01 May 2022, 18:07:52
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.

Thank you for explaining how to disable the lightdm service from chrooting. This seems like it could be a good option in the situation I will need to edit some configuration files without a desktop environment.

In regards to my installation process, it has been about four or five months since I converted to Artix, and on my desktop in particular, I had no abnormalities, I simply installed using the calamares installer for xfce for both my laptop and desktop.

Only my laptop had issues when installing, which I documented here (although it appears the thread has been deleted). No worries, I also documented the process should it need to be repeated in a .txt file:

Code: [Select]
Use the live installation iso usb stick to boot into the live environment.

Mount the nvme01p2 (your installed home partition) to /mnt (must be root)
su
mount /dev/nvme0n1p2 /mnt

Chroot into it:
artix-chroot /mnt

Then we need to make some adjustments

nano /etc/default/grub
Change the GRUB_CMDLINE_LINUX_DEFAULT to "nvme_load=YES"
And update it:
sudo grub-mkconfig -o /boot/grub/grub.cfg

Then:
nano /etc/mkinitcpio.conf
Change the Modules from an empty string to "vmd"
And also the line that has autodetect and block in it. Make sure that block is listed before autodetect in the line up.
And update it:
mkinitcpio -P

And that's it, reboot, remove your installation media, and you're good.


A good thing to note is that these issues with lightdm did not start until a few weeks after I had decided to install multiple kernels on both my laptop and desktop. I made sure to install the proper kernels, headers, and also nvidia-dkms. I was able to install zen and regular linux kernels successfully on my desktop, and linux and linux-lts on my laptop (I saw significant performance issues with zen on my laptop).

At first I suspected this might be a nvidia related issue, as originally when I attempted to do this I was unaware of the existence of the  nvidia-dkms package, and tried to install multiple kernels without it. This resulted in a similar result, in which I would be presented with a black screen and a single cursor shortly after the GRUB menu displayed and the usual series of boot related logs/notifications popped up. Luckily, here on the forums, somebody brought my attention to the nvidia-dkms package, and after installing that along with reinstalling the kernels/headers, everything seemed to work just fine...for a couple weeks until this issue became a regular occurrence.

As an aside, about two weeks ago, I converted over from xfce to i3, but I don't believe that is related, as this issue started before that.

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?

Thank you for the detailed reply.

Yes, connmand starts and automatically connects to my wifi network. More out of curiosity than even a desire to resolve this issue, may I politely ask how this could possibly be related? Please don't take offense at this statement, this question is asked with the utmost sincerity and respect.
Title: Re: elogind fails to start
Post by: strajder on 01 May 2022, 18:30:19
See: https://forum.artixlinux.org/index.php/topic,3993.msg25735.html#msg25735 (under "Update 2" and "Update 3").
Title: Re: elogind fails to start
Post by: z3rOR0ne on 01 May 2022, 22:22:01
See: https://forum.artixlinux.org/index.php/topic,3993.msg25735.html#msg25735 (under "Update 2" and "Update 3").

Mmm. Well it appears that in converting over to i3, light-locker did remain. I have removed it simply using pacman, and searched throughout my system using locate for any remnants, of which there are none after running updatedb.

This could have been the problem strajdger! Only a bit of time and testing after rebooting and hard starting will tell. I"ll do this on my laptop as well and get back in a few days to let you know if this fixed it.

Thank you.
Title: Re: elogind fails to start
Post by: strajder on 01 May 2022, 23:06:24
The issue I linked is related to XFCE and resuming after suspend, so it might be the same issue that you had initially. One important detail about that issue is to both remove light-locker and install gnome-keyring to prevent black screen/system hang after resume from suspend or screen lock.
Title: Re: elogind fails to start
Post by: z3rOR0ne on 01 May 2022, 23:24:37
The issue I linked is related to XFCE and resuming after suspend, so it might be the same issue that you had initially. One important detail about that issue is to both remove light-locker and install gnome-keyring to prevent black screen/system hang after resume from suspend or screen lock.

Thank you. Yes, I forgot to mention I also installed gnome-keyring as well per your recommendation. I'll mark this as SOLVED if after say a week or so of daily use (I use both laptop and desktop more or less on a daily basis) the issue no longer occurs.

Again, thank you so much.
Title: Re: elogind fails to start
Post by: qontinuum on 02 May 2022, 10:15:19
Yes, connmand starts and automatically connects to my wifi network. More out of curiosity than even a desire to resolve this issue, may I politely ask how this could possibly be related?
For the simple reason that dbus is a joke.
When you connect to a network you most likely use DHCP, this protocol allows the DHCP server to give a specific hostname to your machine. Now the thing is that dbus depends on your hostname and if, while automatically connecting to a network, your hostname change between the launch of the system bus and lightdm, lightdm could be unable to start. Several people experienced issues with this and were unable to start any application after connecting to such a network.
So I thought it could be related with this.

Also I don't see how light-locker can interfere with lightdm at startup.
Title: Re: elogind fails to start
Post by: strajder on 02 May 2022, 11:14:49
Also I don't see how light-locker can interfere with lightdm at startup.
Yeah, sorry. I might have mixed up the topics. It is generally worth noting for XFCE users as one of the relevant issues with suspend/resume, though.
Title: Re: elogind fails to start
Post by: z3rOR0ne on 03 May 2022, 03:27:18
For the simple reason that dbus is a joke.
When you connect to a network you most likely use DHCP, this protocol allows the DHCP server to give a specific hostname to your machine. Now the thing is that dbus depends on your hostname and if, while automatically connecting to a network, your hostname change between the launch of the system bus and lightdm, lightdm could be unable to start. Several people experienced issues with this and were unable to start any application after connecting to such a network.
So I thought it could be related with this.

Also I don't see how light-locker can interfere with lightdm at startup.

Interesting, since this issue is related to my  simple home desktop machine and laptop, I can't imagine why my hostname would change in between the init process and then the lightdm process... or why that would happen in general? I'm not technically inclined, but if you could spare a moment to elaborate on why this might happen (like what is the reasoning behind changing the hostname like this)?

SIDE NOTE: Well, perhaps light-locker was the source of my issue.  As of right now, I've booted and restarted my computer a few times over as I've taken care of my various computer-related needs. But, it'll be a few more days of logging in and out/rebooting/shutting down/turning on to be sure, as this issue was inconsistent. Essentially, I'll need a bit more time to see if this issue reoccurs.

I know I sound like a broken record, but thanks strajder and qontinuum.
Title: Re: elogind fails to start
Post by: z3rOR0ne on 05 May 2022, 18:00:53
Ok, I'm going to call it as the new lightdm-runit package hit extra today. It had the same behavior as when I installed it from gremlins, where when lightdm was supposed to display, I simply was presented with a black screen.  I chrooted in using my installation medium and downgraded ligthdm-runit for now, and put it on my IgnorePkg list in my pacman.conf

The solution provided by stradjer regarding light-locker, however, seems to have worked, as for the last 5 days now, the problem of randomly being presented with a black screen on loading lightdm has not occurred even once.

Perhaps no one else will experience this issue, and it is somehow particular to my machines, but I thought I'd just document that the new lightdm-runit package has this effect on my system, but removing light-locker and adding gnome-keyring seemed to have resolved my issue. Admittedly, I haven't the faintest idea as to why.

Thank you all for the help and attention in regards to this issue. I will always be thankful to the Artix developers for this distro and the obviously painstaking work they put into maintaining it.
Title: Re: elogind fails to start
Post by: Dudemanguy on 05 May 2022, 19:10:08
Was it not possible to just simply switch to another tty when you get a black screen (ctrl+alt+f2)? If you could post a log from when lightdm-runit gives you a black screen, that would be helpful too. I think it makes them  in /var/log somewhere.
Title: Re: elogind fails to start
Post by: z3rOR0ne on 05 May 2022, 19:25:58
Was it not possible to just simply switch to another tty when you get a black screen (ctrl+alt+f2)? If you could post a log from when lightdm-runit gives you a black screen, that would be helpful too. I think it makes them  in /var/log somewhere.

I attempted to enter a tty using CTRL+ALT+F1 and F2, etc. to no avail.

Thanks to the new lightdm-runit package having a logging daemon set up, I was able to deduce from the /var/log/lightdm directory under the current file that an attempt to find the name org.freedesktop.Accounts was not found to be provided by any .service files

Code: [Select]
2022-05-05_15:52:15.55379 
2022-05-05_15:52:15.55383 ** (lightdm:1170): WARNING **: 08:52:15.553: Failed to get system bus: Could not connect: No such file or directory
2022-05-05_15:52:15.55536 Failed to get D-Bus connection
2022-05-05_15:52:16.56461
2022-05-05_15:52:16.56462 ** (lightdm:1468): WARNING **: 08:52:16.564: 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

But what this means, I am unsure.

Thank you for your further consideration Dudemanguy.
Title: Re: elogind fails to start
Post by: strajder on 05 May 2022, 22:21:04
Was it not possible to just simply switch to another tty when you get a black screen (ctrl+alt+f2)?
Unfortunately, if the issue is preventing the DM to start X properly, it enters an infinite black screen loop and it is virtually impossible to switch to a tty and use it effectively. This is a downside to using display managers in general, and one of the reasons that I prefer logging through getty and starting X from $HOME/.profile.

What's more, the issue with light-locker made it so the input devices were unresponsive. I could only restart QEMU guest the "hard way".
Title: Re: elogind fails to start
Post by: z3rOR0ne on 05 May 2022, 22:55:19
Unfortunately, if the issue is preventing the DM to start X properly, it enters an infinite black screen loop and it is virtually impossible to switch to a tty and use it effectively. This is a downside to using display managers in general, and one of the reasons that I prefer logging through getty and starting X from $HOME/.profile.

What's more, the issue with light-locker made it so the input devices were unresponsive. I could only restart QEMU guest the "hard way".

Interesting. Is that done more or less as it is covered here?: https://wiki.archlinux.org/title/Xprofile

Or are there some caveats to this Display Manager-less way of logging into your X session?
Title: Re: elogind fails to start
Post by: strajder on 05 May 2022, 22:58:23
$HOME/.xprofile is only sourced by display managers. I am using Autostart X at login (https://wiki.archlinux.org/title/Xinit#Autostart_X_at_login) instead.

Since I'm using mksh instead of bash as a login shell, and both shells source $HOME/.profile, I use that instead of bash-specific $HOME/.bash_profile.
Title: Re: elogind fails to start
Post by: z3rOR0ne on 06 May 2022, 18:23:17
$HOME/.xprofile is only sourced by display managers. I am using Autostart X at login (https://wiki.archlinux.org/title/Xinit#Autostart_X_at_login) instead.

Since I'm using mksh instead of bash as a login shell, and both shells source $HOME/.profile, I use that instead of bash-specific $HOME/.bash_profile.

Very curious indeed. Sorry, I know this is all probably all old hat to you, but I'm slowly but surely learning bits and bits more about linux, so each new piece of information is fresh and novel to me at this time.

Based off of my understanding as it stands currently, it appears that startx is a native command to Xorg, and in your setup, you utilize the korn shell to act as your default login shell in a tty session. When you login, Xorg, looks for a file within your home directory called .profile, which I'm guessing sources the startx command....and also your window manager?

Forgive my lack of understanding, but could you please affirm or deny my above interpretation/assumption? And clarify a bit. I know the manual is very helpful, but I can't shake the feeling I'm missing something. Thank you.

SIDE NOTE: I have marked this thread as SOLVED, albeit in a way that was rather unexpected, as it appears to have been an issue with light-locker. Should the continued questioning for educational purposes be needed to be relegated to a different thread of the forum , please let me know where I should start a new thread regarding the topic that has arisen out of conversations about Display Managers. Thank you.