LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 06-04-2020, 01:40 AM   #1
Ipolit
Member
 
Registered: Nov 2003
Location: Bulgaria
Distribution: Vector Linux, Morphix
Posts: 321

Rep: Reputation: 33
Ubuntu 16.04 extremely slow login - systemd issue


Hello,
I have a problem with login in Ubuntu 16.04.
When I try to log in or when logged in try to execute su, sudo it takes at least 30 seconds. It is same if I try to connect with ssh from remote machine.
I believe the problem is related to systemd.
When I execute
Code:
apt-get install systemd --reinstall
or
Code:
dpkg-reconfigure systemd
the problem is solved until next boot.
Also the computer is booting extremely slow.

Please advice.
 
Old 06-04-2020, 02:21 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 24,678

Rep: Reputation: 8108Reputation: 8108Reputation: 8108Reputation: 8108Reputation: 8108Reputation: 8108Reputation: 8108Reputation: 8108Reputation: 8108Reputation: 8108Reputation: 8108
I'm sure it is not systemd, but login related. Would be nice to check the logs, probably you will find some details. What you posted is not really enough to go further.
 
Old 06-04-2020, 02:30 AM   #3
Ipolit
Member
 
Registered: Nov 2003
Location: Bulgaria
Distribution: Vector Linux, Morphix
Posts: 321

Original Poster
Rep: Reputation: 33
Thank you for your reply
Here is the a log related to the issue:

Code:
Jun  4 10:24:02 77Ubuntu1604LIvanova dbus[720]: [system] Activating systemd to hand-off: service name='org.freedesktop.login1' unit='dbus-org.freedesktop.login1.service'
Jun  4 10:24:03 77Ubuntu1604LIvanova systemd[1]: systemd-logind.service: Main process exited, code=exited, status=1/FAILURE
Jun  4 10:24:03 77Ubuntu1604LIvanova systemd[1]: Failed to start Login Service.
Jun  4 10:24:03 77Ubuntu1604LIvanova systemd[1]: systemd-logind.service: Unit entered failed state.
Jun  4 10:24:03 77Ubuntu1604LIvanova systemd[1]: systemd-logind.service: Failed with result 'exit-code'.
Jun  4 10:24:03 77Ubuntu1604LIvanova systemd[1]: systemd-logind.service: Service has no hold-off time, scheduling restart.
Jun  4 10:24:03 77Ubuntu1604LIvanova systemd[1]: Stopped Login Service.
Jun  4 10:24:03 77Ubuntu1604LIvanova systemd[1]: Starting Login Service...
Jun  4 10:24:18 77Ubuntu1604LIvanova systemd[1]: Reexecuting.
Jun  4 10:24:18 77Ubuntu1604LIvanova systemd[1]: systemd 229 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ -LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN)
Jun  4 10:24:18 77Ubuntu1604LIvanova systemd[1]: Detected architecture x86.
Jun  4 10:24:18 77Ubuntu1604LIvanova dbus[720]: [system] Successfully activated service 'org.freedesktop.systemd1'
Jun  4 10:24:18 77Ubuntu1604LIvanova dbus[720]: [system] Successfully activated service 'org.freedesktop.login1'
Jun  4 10:24:18 77Ubuntu1604LIvanova systemd[1]: Started Login Service.
Jun  4 10:24:18 77Ubuntu1604LIvanova systemd[1]: Created slice User Slice of root.
Jun  4 10:24:18 77Ubuntu1604LIvanova systemd[1]: Starting User Manager for UID 0...
As you can see, the time is more than 15 seconds.
After executing dpkg-reconfigure systemd, the login takes no time.
 
Old 06-04-2020, 04:41 AM   #4
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 24,678

Rep: Reputation: 8108Reputation: 8108Reputation: 8108Reputation: 8108Reputation: 8108Reputation: 8108Reputation: 8108Reputation: 8108Reputation: 8108Reputation: 8108Reputation: 8108
ok, so we need to know why it was not able to start the login service first. probably it was tried to start too early
 
Old 06-04-2020, 07:59 AM   #5
Ipolit
Member
 
Registered: Nov 2003
Location: Bulgaria
Distribution: Vector Linux, Morphix
Posts: 321

Original Poster
Rep: Reputation: 33
No, doesnt work

I think I found the issue and it is not related with the systemd-logind.service.
When I checked the time for loading each service, I found out the network.service took more than 4 minutes.
I changed the wait time to 10 seconds and now the login works as it should. I will observe it since the computer is given to home office user and I cannot experiment with it.

Code:
systemctl edit networking.service


TimeoutStartSec=10sec

Last edited by Ipolit; 06-05-2020 at 01:47 AM.
 
Old 06-05-2020, 01:47 AM   #6
Ipolit
Member
 
Registered: Nov 2003
Location: Bulgaria
Distribution: Vector Linux, Morphix
Posts: 321

Original Poster
Rep: Reputation: 33
No, same

Code:
root@77Ubuntu1604LIvanova:~# systemd-analyze blame
      3min 280ms avahi-daemon.service
    2min 18.309s apt-daily.service
    1min 30.675s ModemManager.service
    1min 30.640s accounts-daemon.service
    1min 30.328s thermald.service
         36.930s networking.service
         25.294s click-system-hooks.service
         25.281s apport.service
         25.255s lightdm.service
         25.243s irqbalance.service
         25.227s ondemand.service
         25.210s nfs-kernel-server.service
         25.205s rsyslog.service
         25.197s pppd-dns.service
         25.196s xdm.service
         25.187s nscd.service
          2.900s systemd-logind.service
          1.872s dev-sdb1.device
          1.461s epoptes.service
          1.434s motd-news.service
          1.035s apt-daily-upgrade.service
           603ms apparmor.service
           541ms snapd.seeded.service
lines 1-23...skipping...
      3min 280ms avahi-daemon.service
    2min 18.309s apt-daily.service
    1min 30.675s ModemManager.service
    1min 30.640s accounts-daemon.service
    1min 30.328s thermald.service
         36.930s networking.service
         25.294s click-system-hooks.service
         25.281s apport.service
         25.255s lightdm.service
         25.243s irqbalance.service
         25.227s ondemand.service
         25.210s nfs-kernel-server.service
         25.205s rsyslog.service
         25.197s pppd-dns.service
         25.196s xdm.service
         25.187s nscd.service
          2.900s systemd-logind.service
          1.872s dev-sdb1.device
          1.461s epoptes.service
          1.434s motd-news.service
          1.035s apt-daily-upgrade.service
           603ms apparmor.service
           541ms snapd.seeded.service
           522ms console-setup.service
           475ms virtualbox.service
           395ms nagios-nrpe-server.service
           317ms systemd-journald.service
lines 1-27...skipping...
      3min 280ms avahi-daemon.service
    2min 18.309s apt-daily.service
    1min 30.675s ModemManager.service
    1min 30.640s accounts-daemon.service
    1min 30.328s thermald.service
         36.930s networking.service
         25.294s click-system-hooks.service
         25.281s apport.service
         25.255s lightdm.service
         25.243s irqbalance.service
         25.227s ondemand.service
         25.210s nfs-kernel-server.service
         25.205s rsyslog.service
         25.197s pppd-dns.service
         25.196s xdm.service
         25.187s nscd.service
          2.900s systemd-logind.service
          1.872s dev-sdb1.device
          1.461s epoptes.service
          1.434s motd-news.service
          1.035s apt-daily-upgrade.service
           603ms apparmor.service
           541ms snapd.seeded.service
           522ms console-setup.service
           475ms virtualbox.service
           395ms nagios-nrpe-server.service
           317ms systemd-journald.service
           316ms tftpd-hpa.service
lines 1-28...skipping...
      3min 280ms avahi-daemon.service
    2min 18.309s apt-daily.service
    1min 30.675s ModemManager.service
    1min 30.640s accounts-daemon.service
    1min 30.328s thermald.service
         36.930s networking.service
         25.294s click-system-hooks.service
         25.281s apport.service
         25.255s lightdm.service
         25.243s irqbalance.service
         25.227s ondemand.service
         25.210s nfs-kernel-server.service
         25.205s rsyslog.service
         25.197s pppd-dns.service
         25.196s xdm.service
         25.187s nscd.service
          2.900s systemd-logind.service
          1.872s dev-sdb1.device
          1.461s epoptes.service
          1.434s motd-news.service
          1.035s apt-daily-upgrade.service
           603ms apparmor.service
           541ms snapd.seeded.service
           522ms console-setup.service
           475ms virtualbox.service
           395ms nagios-nrpe-server.service
           317ms systemd-journald.service
           316ms tftpd-hpa.service
           311ms cpufrequtils.service
lines 1-29...skipping...
      3min 280ms avahi-daemon.service
    2min 18.309s apt-daily.service
    1min 30.675s ModemManager.service
    1min 30.640s accounts-daemon.service
    1min 30.328s thermald.service
         36.930s networking.service
         25.294s click-system-hooks.service
         25.281s apport.service
         25.255s lightdm.service
         25.243s irqbalance.service
         25.227s ondemand.service
         25.210s nfs-kernel-server.service
         25.205s rsyslog.service
         25.197s pppd-dns.service
         25.196s xdm.service
         25.187s nscd.service
          2.900s systemd-logind.service
          1.872s dev-sdb1.device
          1.461s epoptes.service
          1.434s motd-news.service
          1.035s apt-daily-upgrade.service
           603ms apparmor.service
           541ms snapd.seeded.service
           522ms console-setup.service
           475ms virtualbox.service
           395ms nagios-nrpe-server.service
           317ms systemd-journald.service
           316ms tftpd-hpa.service
           311ms cpufrequtils.service
           285ms snapd.service
lines 1-30...skipping...
      3min 280ms avahi-daemon.service
    2min 18.309s apt-daily.service
    1min 30.675s ModemManager.service
    1min 30.640s accounts-daemon.service
    1min 30.328s thermald.service
         36.930s networking.service
         25.294s click-system-hooks.service
         25.281s apport.service
         25.255s lightdm.service
         25.243s irqbalance.service
         25.227s ondemand.service
         25.210s nfs-kernel-server.service
         25.205s rsyslog.service
         25.197s pppd-dns.service
         25.196s xdm.service
         25.187s nscd.service
          2.900s systemd-logind.service
          1.872s dev-sdb1.device
          1.461s epoptes.service
          1.434s motd-news.service
          1.035s apt-daily-upgrade.service
           603ms apparmor.service
           541ms snapd.seeded.service
           522ms console-setup.service
           475ms virtualbox.service
           395ms nagios-nrpe-server.service
           317ms systemd-journald.service
           316ms tftpd-hpa.service
           311ms cpufrequtils.service
           285ms snapd.service
           282ms loadcpufreq.service
lines 1-31...skipping...
      3min 280ms avahi-daemon.service
    2min 18.309s apt-daily.service
    1min 30.675s ModemManager.service
    1min 30.640s accounts-daemon.service
    1min 30.328s thermald.service
         36.930s networking.service
         25.294s click-system-hooks.service
         25.281s apport.service
         25.255s lightdm.service
         25.243s irqbalance.service
         25.227s ondemand.service
         25.210s nfs-kernel-server.service
         25.205s rsyslog.service
         25.197s pppd-dns.service
         25.196s xdm.service
         25.187s nscd.service
          2.900s systemd-logind.service
          1.872s dev-sdb1.device
          1.461s epoptes.service
          1.434s motd-news.service
          1.035s apt-daily-upgrade.service
           603ms apparmor.service
           541ms snapd.seeded.service
           522ms console-setup.service
           475ms virtualbox.service
           395ms nagios-nrpe-server.service
           317ms systemd-journald.service
           316ms tftpd-hpa.service
           311ms cpufrequtils.service
           285ms snapd.service
           282ms loadcpufreq.service
           274ms systemd-udevd.service
lines 1-32...skipping...
      3min 280ms avahi-daemon.service
    2min 18.309s apt-daily.service
    1min 30.675s ModemManager.service
    1min 30.640s accounts-daemon.service
    1min 30.328s thermald.service
         36.930s networking.service
         25.294s click-system-hooks.service
         25.281s apport.service
         25.255s lightdm.service
         25.243s irqbalance.service
         25.227s ondemand.service
         25.210s nfs-kernel-server.service
         25.205s rsyslog.service
         25.197s pppd-dns.service
         25.196s xdm.service
         25.187s nscd.service
          2.900s systemd-logind.service
          1.872s dev-sdb1.device
          1.461s epoptes.service
          1.434s motd-news.service
          1.035s apt-daily-upgrade.service
           603ms apparmor.service
           541ms snapd.seeded.service
           522ms console-setup.service
           475ms virtualbox.service
           395ms nagios-nrpe-server.service
           317ms systemd-journald.service
           316ms tftpd-hpa.service
           311ms cpufrequtils.service
           285ms snapd.service
           282ms loadcpufreq.service
           274ms systemd-udevd.service
           267ms snmpd.service
lines 1-33...skipping...
      3min 280ms avahi-daemon.service
    2min 18.309s apt-daily.service
    1min 30.675s ModemManager.service
    1min 30.640s accounts-daemon.service
    1min 30.328s thermald.service
         36.930s networking.service
         25.294s click-system-hooks.service
         25.281s apport.service
         25.255s lightdm.service
         25.243s irqbalance.service
         25.227s ondemand.service
         25.210s nfs-kernel-server.service
         25.205s rsyslog.service
         25.197s pppd-dns.service
         25.196s xdm.service
         25.187s nscd.service
          2.900s systemd-logind.service
          1.872s dev-sdb1.device
          1.461s epoptes.service
          1.434s motd-news.service
          1.035s apt-daily-upgrade.service
           603ms apparmor.service
           541ms snapd.seeded.service
           522ms console-setup.service
           475ms virtualbox.service
           395ms nagios-nrpe-server.service
           317ms systemd-journald.service
           316ms tftpd-hpa.service
           311ms cpufrequtils.service
           285ms snapd.service
           282ms loadcpufreq.service
           274ms systemd-udevd.service
           267ms snmpd.service
           261ms ssh.service
lines 1-34...skipping...
      3min 280ms avahi-daemon.service
    2min 18.309s apt-daily.service
    1min 30.675s ModemManager.service
    1min 30.640s accounts-daemon.service
    1min 30.328s thermald.service
         36.930s networking.service
         25.294s click-system-hooks.service
         25.281s apport.service
         25.255s lightdm.service
         25.243s irqbalance.service
         25.227s ondemand.service
         25.210s nfs-kernel-server.service
         25.205s rsyslog.service
         25.197s pppd-dns.service
         25.196s xdm.service
         25.187s nscd.service
          2.900s systemd-logind.service
          1.872s dev-sdb1.device
          1.461s epoptes.service
          1.434s motd-news.service
          1.035s apt-daily-upgrade.service
           603ms apparmor.service
           541ms snapd.seeded.service
           522ms console-setup.service
           475ms virtualbox.service
           395ms nagios-nrpe-server.service
           317ms systemd-journald.service
           316ms tftpd-hpa.service
           311ms cpufrequtils.service
           285ms snapd.service
           282ms loadcpufreq.service
           274ms systemd-udevd.service
           267ms snmpd.service
           261ms ssh.service
           249ms systemd-udev-trigger.service
lines 1-35...skipping...
      3min 280ms avahi-daemon.service
    2min 18.309s apt-daily.service
    1min 30.675s ModemManager.service
    1min 30.640s accounts-daemon.service
    1min 30.328s thermald.service
         36.930s networking.service
         25.294s click-system-hooks.service
         25.281s apport.service
         25.255s lightdm.service
         25.243s irqbalance.service
         25.227s ondemand.service
         25.210s nfs-kernel-server.service
         25.205s rsyslog.service
         25.197s pppd-dns.service
         25.196s xdm.service
         25.187s nscd.service
          2.900s systemd-logind.service
          1.872s dev-sdb1.device
          1.461s epoptes.service
          1.434s motd-news.service
          1.035s apt-daily-upgrade.service
           603ms apparmor.service
           541ms snapd.seeded.service
           522ms console-setup.service
           475ms virtualbox.service
           395ms nagios-nrpe-server.service
           317ms systemd-journald.service
           316ms tftpd-hpa.service
           311ms cpufrequtils.service
           285ms snapd.service
           282ms loadcpufreq.service
           274ms systemd-udevd.service
           267ms snmpd.service
           261ms ssh.service
           249ms systemd-udev-trigger.service
           213ms grub-common.service
It continuosly reloads all the services until I execute dpkg-reconfigure systemd
 
Old 06-05-2020, 02:04 AM   #7
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 24,678

Rep: Reputation: 8108Reputation: 8108Reputation: 8108Reputation: 8108Reputation: 8108Reputation: 8108Reputation: 8108Reputation: 8108Reputation: 8108Reputation: 8108Reputation: 8108
what you posted is just confusing. How is that systemd-analyze blame related to the login problem? How do you know the services were continuosly reloaded?
 
Old 06-05-2020, 02:49 AM   #8
Ipolit
Member
 
Registered: Nov 2003
Location: Bulgaria
Distribution: Vector Linux, Morphix
Posts: 321

Original Poster
Rep: Reputation: 33
When the computer has booted I login into it with ssh.
When I execute
systemd-analyze blame

I don't receive output - it says loading services hasn't finished yet.
Until I execute dpkg-reconfigure systemd.

And I put in /etc/rc.local
dpkg-reconfigure systemd

Now the computer boots for 5 minutes, but afterwards works normal.
I can't find what happens.
 
  


Reply

Tags
login, slow, systemd


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] nfs root extremely slow... ubuntu 16.04 server jmgibson1981 Linux - Newbie 8 08-10-2016 08:00 PM
Successfully build kernel 3.4.2, but now, Ubuntu 12.04 GUI is extremely slow. jiapei100 Linux - Kernel 10 06-17-2012 04:12 PM
IBM T42 "Extremely, EXTREMELY Slow" alwayslearning Linux - Laptop and Netbook 5 10-11-2009 03:34 AM
Ubuntu installer extremely slow... bastawhiz Ubuntu 7 06-18-2006 11:04 AM
sdl games are slow extremely slow linksocc Linux - Software 7 01-17-2004 03:53 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 07:22 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration