elogind needed since 7 December 2020

You have a problem with Slackel? Post here and we'll do what we can to help.
Papasot
Posts: 231
Joined: 13 May 2016 22:32
Location: Patras, Greece

elogind needed since 7 December 2020

Post by Papasot »

According to Slackware-Current changelogs, ConsoleKit "is gone", and replaced by elogind (which, of course, takes over other packages as well). I cannot see why this was necessary and why I have to live with crapware extracted by systemd. Granted, elogind is not systemd, it's just a forked component of it, but still... I dislike the way Slackware goes. But that's a topic for another forum.

As far Slackel is concerned, I did the mistake to not read changelogs before updating the system today. As a result, everything else was updated, but elogind was not installed. This made my system unusable after reboot. I manually downloaded elogind from Slackware-Current repos, and installed it. This worked, I can now login as before. To be sure, I reinstalled elogind normally. However, the computer goes to suspend mode by itself, a few seconds after I login. I have to press the power button to bring it back, but it goes to suspend mode again every few seconds. It's very annoying, and makes the system still practically unusable. My best guess is elogind has a dependency I didn't install, or a configuration file is needed. I did not update my 64-bit Slackel system yet to avoid the problem, until I know what's going on.

I am pretty sure I am not the only person using Slackel without installing everything, so I guess this problem should happen to others once they update the system. Any ideas on how to fix it?
djemos
Site Admin
Posts: 675
Joined: 15 Apr 2016 06:03

Re: elogind needed since 7 December 2020

Post by djemos »

dbus, networkmanager have elogind as a dep. Also i removed from my system ConsoleKit2. As i suspect wm-logout could not run. So i completely changed wm-logout so now use only elogind, for shutdown,reboot,suspend hibernate.
Users who will upgrade, elogind will be installed as a dep of dbus and wm-logout.
About suspend. Look in powerkit there is a suspend setting there, to suspend after 15 minutes. Look if it is set to some seconds or can select 'None'
I don't have such a problem in my system. Or if you do not use powerkit look on cbatticon if you have set it to suspend very soon.
Papasot
Posts: 231
Joined: 13 May 2016 22:32
Location: Patras, Greece

Re: elogind needed since 7 December 2020

Post by Papasot »

djemos wrote:About suspend. Look in powerkit there is a suspend setting there, to suspend after 15 minutes. Look if it is set to some seconds or can select 'None'
I don't have such a problem in my system. Or if you do not use powerkit look on cbatticon if you have set it to suspend very soon.
powerkit is not installed on my system. The system goes to suspend mode before I even have time to login as a user in init3, so way before I startx and therefore cbatticon is not used. I didn't change anything, cbatticon and everything else worked fine before I updated today. Now it suspends every few seconds so I have little time to test anything.
However I managed to uninstall ConsoleKit2, cgmanager, and pm-utils, just in case. According to changelog those three packages are removed from Slackware-Current, in favor of elogind, which only brought problems. The system acts as if there is a setting to suspend immediately after boot, before even a user logins. But that's clearly because of the update, because like I said I did not change anything.

Of course wm-logout didn't work because it used ConsoleKit2. After your update it works again. That constant suspend prevents me from testing anything else though.
Papasot
Posts: 231
Joined: 13 May 2016 22:32
Location: Patras, Greece

Re: elogind needed since 7 December 2020

Post by Papasot »

After a long time dealing with this awful problem, I can tell the reason is clearly elogind. But I don't know how to fix it.
If I disable elogind from system services, the computer boots normally. No repeated suspends, no nothing. Everything works. Whenever the damn elogind has to be launched, the system goes to suspend immediately. After that I press the power button and the system comes back but after a few seconds it suspends again. For example, if I try to shutdown with wm-logout (which invokes elogind), the computer immediately suspends and once I press the power button it comes back then it shuts down. I updated my 64-bit system and I don't have that problem there. Only on 32-bit Slackel.

Now, I read about elogind, and this is another test that may help finding out what's going on. The command loginctl without parameters should list the current sessions. This is what I get:

On Slackel 64-bit:

Code: Select all

pap[~]$ loginctl
SESSION	UID	USER	SEAT	TTY
		1  1000   pap	 seat0  tty1
This is normal.

On Slackel 32-bit:

Code: Select all

pap[~]$ loginctl
No sessions.
This is clearly wrong.

So, the problem is, for some weird reason, on my Slackel 32-bit computer elogind thinks there are no sessions, therefore the system has to suspend. All that while a user is logged in and should have a seat and a session. Not even root has a session, according to loginctl.
If elogind is active, it suspends the computer immediately no matter what; it does this before I have time to login as a user; it does the same after I login as any user, including root.
djemos
Site Admin
Posts: 675
Joined: 15 Apr 2016 06:03

Re: elogind needed since 7 December 2020

Post by djemos »

On init 4 level on both 64 and 32 bit slackel (32bit is running in vmware) loginctl in lxterminal gives "no sessions"
Going to init 3 or reboot to init 3 login in console with my user name and password then loginctl gives on both 64 and 32 bit slackel.

Code: Select all

SESSION   UID   USER   SEAT   TTY
      1  1000   djemos    seat0  tty1
Take a look at /etc/elogind/logind.conf in both 64 and 32bit slackel and see if there are differences.
or play with what is there.
Mine

Code: Select all

#  This file is part of elogind.
#
#  elogind is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the License, or
#  (at your option) any later version.
#
# Entries in this file show the compile time defaults.
# You can change settings by editing this file.
# Defaults can be restored by simply deleting this file.
#
# See logind.conf(5) for details.
[Login]
#KillUserProcesses=no
#KillOnlyUsers=
#KillExcludeUsers=root
#InhibitDelayMaxSec=5
#HandlePowerKey=poweroff
#HandleSuspendKey=suspend
#HandleHibernateKey=hibernate
#HandleLidSwitch=suspend
#HandleLidSwitchExternalPower=suspend
#HandleLidSwitchDocked=ignore
#PowerKeyIgnoreInhibited=no
#SuspendKeyIgnoreInhibited=no
#HibernateKeyIgnoreInhibited=no
#LidSwitchIgnoreInhibited=yes
#HoldoffTimeoutSec=30s
#IdleAction=ignore
#IdleActionSec=30min
#RuntimeDirectorySize=10%
#RemoveIPC=yes
#InhibitorsMax=8192
#SessionsMax=8192

[Sleep]
#AllowSuspend=yes
#AllowHibernation=yes
#AllowSuspendThenHibernate=yes
#AllowHybridSleep=yes
#AllowPowerOffInterrupts=no
#AllowSuspendInterrupts=no
#SuspendState=mem standby freeze
#SuspendMode=
#HibernateState=disk
#HibernateMode=platform shutdown
#HybridSleepState=disk
#HybridSleepMode=suspend platform shutdown
#HibernateDelaySec=10800
Papasot
Posts: 231
Joined: 13 May 2016 22:32
Location: Patras, Greece

Re: elogind needed since 7 December 2020

Post by Papasot »

djemos wrote:On init 4 level on both 64 and 32 bit slackel (32bit is running in vmware) loginctl in lxterminal gives "no sessions"
Going to init3 or reboot to init 3 login in console with my user name and password then loginctl gives on both 64 and 32 bit slackel.

Code: Select all

SESSION   UID   USER   SEAT   TTY
      1  1000   djemos    seat0  tty1
What you said seems weird to me. I always boot at init3. On my 64-bit system, loginctl always gives a session for the user, no matter what init I am: I get the same answer at init3 or by running loginctl from lxterminal. However, on my 32-bit system, I always get "No sessions" - again, no matter the init mode.
djemos wrote:Take a look at /etc/elogind/logind.conf in both 64 and 32bit slackel and see if there are differences.
or play with what is there.
I already did that. The file is the same as yours. And it couldn't be different because it was installed the same way and I didn't touch it.
In the beginning, I thought that something was wrong with the settings IdleAction and IdleActionSec in logind.conf. But that can't be the case, because those settings control how the system will react if it is idle. The problem on my 32-bit system is that loginctl thinks there are no sessions, even if a user is logged in, so it thinks the system is idle, although it's not. However, notice the documentation of logind.conf for the IdleAction setting. It says "Note that this requires that user sessions correctly report the idle status to the system." This is clearly not the case in my 32-bit system.

I checked everything I could think of, and compared it to my Slackel 64-bit (which works correctly). Everything is the same: logind.conf, enabled system services, user groups, are all the same. And yet Slackel 32 suspends again and again every time I use anything related to loginctl. The only way to use the 32-bit computer right now is to disable elogind service and avoid anything that involves loginctl (this includes trying to shutdown with wm-logout).
Papasot
Posts: 231
Joined: 13 May 2016 22:32
Location: Patras, Greece

Re: elogind needed since 7 December 2020

Post by Papasot »

The problem persists and I am out of ideas what to do to solve it. There is, however, one thing I didn't try Since I installed elogind before dependency resolution was added, maybe there is a package needed for elogind which I don't have installed. However like I said I tried to relinstall elogind, so I guess if there was such a missing package, reinstalling elogind should fix it. Nevertheless it is worth a try. Is there any way to get a complete list of elogind dependencies?
djemos
Site Admin
Posts: 675
Joined: 15 Apr 2016 06:03

Re: elogind needed since 7 December 2020

Post by djemos »

I have created a dep file of elogind. It is on repos.
uninstall it and then install it again. To pull all dep packages.
sudo spi --show elogind will give all dep packages.
sudo slapt-get -u
sudo slapt-get -i sysvinit-scripts

sudo spkg -d elogind
sudo slapt-get -i elogind
sudo slapt-get -i /var/slapt-get/slackware/a/elogind-243.7-x86_64-2.txz to create the dep file.
When creating a dep file if a dep package is missing, the dep file cannot created and report the missing package/packages.
This is the dep file.
aaa_elflibs|acl,aaa_elflibs|attr,aaa_elflibs|libcap,pam

also look in /varlog/packages if there is an remaining upgraded file which not removed.
ls -l /var/log/packages/*upgraded*
if so remove it with sudo removepkg /var/log/packages/*upgraded*
Do not remove package with same name without upgraded in its name
e.g. /var/log/packages/xev-1.2.3-x86_64-1-upgraded-2020-07-22,13:43:38 previous version of package which is not removed, for some reason.
/var/log/packages/xev-1.2.4-x86_64-1 the new package version. will not remove this.

Also delete these left files if you did not/
sudo spkg -d ConsoleKit2 cgmanager
sudo rm /etc/rc.d/rc.consolekit
sudo rm /etc/rc.d/rc.cgmanager
Papasot
Posts: 231
Joined: 13 May 2016 22:32
Location: Patras, Greece

Re: elogind needed since 7 December 2020

Post by Papasot »

I totally forgot about spkg -d, which uninstalls a package without uninstalling packages depending on it. I did uninstall elogind that way, and installed it again. Installing elogind again should pull any missing dependencies. But it did not. So I guess there are no missing packages.
After rebooting elogind keeps putting the system in suspend mode every few seconds - no matter who the user is, it even starts doing that before any user logins. The only way to use this computer without constant suspends is to disable elogind from System Services, and avoid using anything that will enable it, such as loginctl or wm-logout.

This is very intriguing... Transition to elogind worked smoothly on my 64-bit Slackel - no problems whatsoever. In this 32-bit system it is still annoying and problematic. The two computers are otherwise very similar. The only real difference I can think of is that I updated the 32-bit system before elogind was a dependency for other packages. Slackel 64-bit system was updated after you added dependencies for packages depending on elogind, so elogind was pulled as a dependency.

I have no idea what to do next. I looked it up on the internet, I did find several problems concerning logind but all of them were on systemd-infected distributions, where logind is just part of that plague called systemd.
Papasot
Posts: 231
Joined: 13 May 2016 22:32
Location: Patras, Greece

Re: elogind needed since 7 December 2020

Post by Papasot »

This is what I get:

Code: Select all

pap[~]$ ls -l /var/log/packages/*upgraded*
-rw-r--r-- 1 root root 49592 Apr 30  2017 /var/log/packages/kernel-firmware-20161211git-noarch-1-upgraded-2020-06-07,12:19:25
-rw-r--r-- 1 root root  7700 Sep  7  2018 /var/log/packages/mozilla-firefox-62.0-i686-1dj-upgraded-2018-11-04,20:58:26
Those are very old and I doubt they have anything to do with this problem. I deleted them anyway. ConsoleKit2 and cgmanager were uninstalled already.
Post Reply