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 3427 times) previous topic - next topic
0 Members and 2 Guests are viewing this topic.

Re: elogind fails to start

Reply #15
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.


Re: elogind fails to start

Reply #17

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.

Re: elogind fails to start

Reply #18
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.

Re: elogind fails to start

Reply #19
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.

Re: elogind fails to start

Reply #20
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.


Re: elogind fails to start

Reply #22
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.

Re: elogind fails to start

Reply #23
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.

Re: elogind fails to start

Reply #24
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.

Re: elogind fails to start

Reply #25
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.

Re: elogind fails to start

Reply #26
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".

Re: elogind fails to start

Reply #27
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?

 

Re: elogind fails to start

Reply #29
$HOME/.xprofile is only sourced by display managers. I am using 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.