Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 669558 - sys-auth/elogind: loginctl list-sessions: No user sessions
Summary: sys-auth/elogind: loginctl list-sessions: No user sessions
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Sven Eden
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: elogind-support
  Show dependency tree
 
Reported: 2018-10-25 08:01 UTC by Mathy Vanvoorden
Modified: 2018-10-29 08:56 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mathy Vanvoorden 2018-10-25 08:01:57 UTC
I currently have elogind on my system pulled in as a dependency for networkmanager-qt, I don't have it configured in boot level, it auto-starts and runs.

Recently my screen locker broke while doing an update so I got a message to unlock  from the console.

Previously I could do this with ck-unlock-sessions but that's not installed anymore as kscreenlocker's CMake detects the loginctl command now.

However, loginctl is not working properly, if I do loginctl list, I get 0 sessions found.

I guess this is a problem of elogind, but I'm not sure.

Note that this system briefly had systemd installed but I reverted it back to openrc.
Comment 1 Sven Eden 2018-10-25 15:19:18 UTC
If the session list is empty, the daemon is either not running, or pam_elogind.so is not loaded.

- Which USE flags did you use to build elogind? 
- What happens when you add elogind to boot runlevel?
Comment 2 Alex 2018-10-25 17:52:35 UTC
I had the 'loginctl reports 0 sessions' part of the problem too (at least for the past few days), but it has magically fixed itself just now) 
Either newer openrc (unlikely) or rebuilding pam (more likely) and also elogind (may not be necessary) has helped.
Hm.
Gonna test with my friend that has 0 sessions in loginctl output too tomorrow.

---
Digging a bit deeper
---

I had these in auth.log since 5th of October:

sddm-helper: PAM unable to dlopen(/usr/lib64/security/pam_elogind.so): /usr/lib64/security/pam_elogind.so: cannot open shared object file: No such file or directory
sddm-helper: PAM adding faulty module: /usr/lib64/security/pam_elogind.so

The path used /usr/lib64/... when it should have used /lib64/.. I think
Comment 3 Sven Eden 2018-10-25 18:18:04 UTC
Thank you for your feedback!

At least it confirms my suspicion that pam_elogind.so is not loaded.

Your auth.log messages are weird. Why is PAM looking in the wrong directory? At least I haven't found any possibility, neither in PAM nor SDDM, to change the module search path from its /lib64/security.

I am completely at sea here and need some time to research this.

@Mathy : Could you try to re-emerge pam and see whether this remedies your situation with the empty session list?
Comment 4 Alex 2018-10-26 07:17:18 UTC
A quick follow-up

I've tested with a friend

Before rebuild pam there were a lot of its libraries at /usr/lib64/security (dated from October, 2nd), but not the pam_elogind.so one. 
loginctl reported 0 sessions.

After rebuilding pam they all have moved to /lib64/security. pam_elogind.so is there too.
loginctl reported user session after reboot.

Dunno where path change come from.
Comment 5 Mathy Vanvoorden 2018-10-26 08:06:49 UTC
elogind is definitely running, it was the first thing I checked, I will try to reinstall pam
Comment 6 Mathy Vanvoorden 2018-10-26 19:25:59 UTC
I reinstalled pam, no joy.

Then I noticed in my auth.log that sddm was trying to load pam_systemd, apparently it was still in the pam.d config file, while investigating I also noticed that sddm was built without elogind use flag, so I enabled that and reinstalled. Now list-sessions give me this:

# loginctl
   SESSION        UID USER             SEAT             TTY
        c1        111 sddm             seat0

And pam.d/sddm correctly lists elogind now.

Still no session or possibility to unlock for my plasma login though.

I also noticed that actually my auth.log hasn't been updated since 29 September, might be related?

These are the packages that were installed around that date (my system stays up for several days at a time but I always reboot after nvidia-drivers installation):

Tue Sep 25 13:12:45 2018 >>> dev-libs/libbsd-0.9.1
Tue Sep 25 13:12:56 2018 >>> sys-apps/help2man-1.47.6
Tue Sep 25 13:13:18 2018 >>> app-misc/tmux-2.7
Tue Sep 25 16:27:12 2018 >>> sys-auth/elogind-238.1
Wed Sep 26 21:52:39 2018 >>> app-crypt/kbfs-2.6.0
Wed Sep 26 21:53:09 2018 >>> app-crypt/keybase-2.6.0
Sat Sep 29 11:07:15 2018 >>> net-analyzer/traceroute-2.1.0
Sat Sep 29 11:07:27 2018 >>> dev-python/pyyaml-3.13
Sat Sep 29 11:07:38 2018 >>> dev-python/websocket-client-0.48.0
Sat Sep 29 11:07:47 2018 >>> sys-apps/lsb-release-1.4-r3
Sat Sep 29 11:08:47 2018 >>> dev-libs/libtasn1-4.13
Sat Sep 29 11:09:00 2018 >>> x11-misc/shared-mime-info-1.10
Sat Sep 29 11:09:50 2018 >>> x11-libs/libxcb-1.13.1
Sat Sep 29 11:10:30 2018 >>> dev-libs/redland-1.0.17-r1
Sat Sep 29 11:10:57 2018 >>> dev-libs/dbus-glib-0.110
Sat Sep 29 11:11:17 2018 >>> sys-power/upower-0.99.8
Sat Sep 29 11:11:38 2018 >>> app-text/libspectre-0.2.8
Sat Sep 29 11:12:00 2018 >>> app-crypt/pinentry-1.1.0-r2
Sun Sep 30 23:41:03 2018 >>> dev-libs/botan-1.10.17-r2
Sun Sep 30 23:44:45 2018 >>> media-libs/mesa-18.1.9
Sun Sep 30 23:47:05 2018 >>> x11-drivers/nvidia-drivers-410.57-r1

With the obvious entry being elogind being merged for the very first time.
Comment 7 Mathy Vanvoorden 2018-10-26 19:26:31 UTC
Oh, I also tried adding elogind to boot runlevel, still no joy.
Comment 8 Andreas Sturmlechner gentoo-dev 2018-10-28 10:12:06 UTC
(In reply to Mathy Vanvoorden from comment #6)
> Then I noticed in my auth.log that sddm was trying to load pam_systemd,
> apparently it was still in the pam.d config file, while investigating I also
> noticed that sddm was built without elogind use flag, so I enabled that and
> reinstalled.
Please make sure USE=elogind is set *globally*.
Comment 9 Andreas Sturmlechner gentoo-dev 2018-10-28 10:18:38 UTC
elogind is not simply pulled in by something, it is a major configuration choice (over consolekit and systemd).

Make sure you accurately followed https://wiki.gentoo.org/wiki/KDE#Services
Comment 10 Mathy Vanvoorden 2018-10-28 18:09:50 UTC
I didn't "choose" elogind, it was initially pulled in as a dependency by skypeforlinux apparently.

As I have a need for Skype I'll do a proper elogind setup and report back.

Perhaps it is a good idea to add some information to pkg_postinst of elogind that you might have a confliect, or even block installation, if consolekit is installed?
Comment 11 Mathy Vanvoorden 2018-10-28 18:31:27 UTC
On reflection, I actually installed elogind myself manually when I bumped into the problem that Skype segfaults if it's not available, the dependency was only added later.

I figured I'd only install it for Skype but not actually use it, but that doesn't seem possible in combination with Plasma.

My comment on a message in the ebuild remains valid though, especially since it will now be installed on unsuspecting users their systems if they have Skype installed.
Comment 12 Mathy Vanvoorden 2018-10-28 18:32:29 UTC
After installing elogind "properly" the issues have been fixed for me.
Comment 13 Sven Eden 2018-10-29 08:56:16 UTC
@Mathy : All ebuilds making a choice between consolekit, elogind and systemd have a constraint that only one can be selected via USE flags at a time.

As I can see, net-im/skypeforlinux doesn't even have any USE flags for choosing either, it just depends on eithere elogind or systemd to be installed.
That ebuilds might need improvement then, but that's a separate issue.

I set this to "WONTFIX", to make it stand out when searching for closed issues. Well, and because I haven't "fixed" anything.