Slow login, seems to be caused by systemd-logind.service failing

dmpm

Member
Dec 29, 2023
60
2
8
When I access the Shell via the GUI, or SSH in, it takes ages to get to the prompt.

I ran 'systemctl status sshd' and it shows

pam_systemd(sshd:session): Failed to create session: Failed to activate service 'org.freedesktop.login1': timed out (service_start_timeout=2500>
May 26 06:56:12 pbs sshd[5099]: pam_systemd(sshd:session): Failed to create session: Failed to activate service 'org.freedesktop.login1': timed out (service_start_timeout=2500>

and 'systemctl status dbus' shows

May 26 06:59:41 pbs (d-logind)[6416]: systemd-logind.service: Failed to set up mount namespacing: Permission denied
May 26 06:59:41 pbs (d-logind)[6416]: systemd-logind.service: Failed at step NAMESPACE spawning /lib/systemd/systemd-logind: Permission denied
-- Subject: Process /lib/systemd/systemd-logind could not be executed

and systemctl --failed shows

UNIT LOAD ACTIVE SUB DESCRIPTION
* logrotate.service loaded failed failed Rotate log files
* man-db.service loaded failed failed Daily man-db regeneration
* nftables.service loaded failed failed nftables
* systemd-logind.service loaded failed failed User Login Management
* systemd-networkd.service loaded failed failed Network Configuration
* systemd-sysctl.service loaded failed failed Apply Kernel Variables
* systemd-sysusers.service loaded failed failed Create System Users
* systemd-tmpfiles-clean.service loaded failed failed Cleanup of Temporary Directories
* systemd-tmpfiles-setup-dev.service loaded failed failed Create Static Device Nodes in /dev
* systemd-tmpfiles-setup.service loaded failed failed Create System Files and Directories
* zfs-mount.service loaded failed failed Mount ZFS filesystems
* zfs-share.service loaded failed failed ZFS file system shares
* systemd-networkd.socket loaded failed failed Network Service Netlink Socket

which seems a bit wrong but maybe those services are just not needed or being used.

Is there anything I can do to fix the slow login issue at least?
 
  • Like
Reactions: dmpm
Hi,
this is my PBS machine, which is running as a LXC under PVE. I don't think I've done anything special when I installed it from the ISO,

Thanks for the link to that thread. I'm running PBS in a privileged LXC but enabling Nesting has fixed the slow login problem, and the errors shown in my post are gone. The only things that now show when I do 'systemctl --failed' are

UNIT LOAD ACTIVE SUB DESCRIPTION
* zfs-mount.service loaded failed failed Mount ZFS filesystems
* zfs-share.service loaded failed failed ZFS file system shares

but I'm not using ZFS for PVE or PBS, so that's probably normal.