Description
I am attempting to resolve the issue of an extremely slow login process following the boot on my Ubuntu 22.04 system. While the booting time is relatively fast and does not pose any issues, logging in as a user for the first time is taking several minutes to complete the process. Even after successfully logging in, it takes a while for the desktop to fully load and become usable.
Has anyone else experienced a similar issue on Ubuntu 22.04, and if so, do you know of any potential solutions?
Logs
uname output
$ uname -r
5.19.0-38-generic
systemd-analyze output
$ systemd-analyze
Startup finished in 9.888s (firmware) + 5.299s (loader) + 51.270s (kernel) + 20.436s (userspace) = 1min 26.896s
graphical.target reached after 20.397s in userspace
systemd-analyze critical-chain output
$ systemd-analyze critical-chain
The time when unit became active or started is printed after the "@" character.
The time the unit took to start is printed after the "+" character.
graphical.target @20.397s
└─multi-user.target @20.396s
└─plymouth-quit-wait.service @2.518s +17.875s
└─systemd-user-sessions.service @2.449s +44ms
└─nss-user-lookup.target @2.395s
└─sssd.service @1.468s +925ms
└─basic.target @1.422s
└─sockets.target @1.422s
└─cups.socket @1.984s
└─sysinit.target @1.412s
└─systemd-backlight@leds:dell::kbd_backlight.service @3.364s +1.263s
└─system-systemd\x2dbacklight.slice @631ms
└─system.slice @176ms
└─-.slice @176ms
systemd-analyze blame output
$ systemd-analyze blame
17.875s plymouth-quit-wait.service
10.618s NetworkManager-wait-online.service
5.897s snapd.service
4.929s systemd-rfkill.service
4.729s fwupd.service
2.131s logrotate.service
1.263s systemd-backlight@leds:dell::kbd_backlight.service
1.151s cups.service
1.009s dev-mapper-vgubuntu\x2droot.device
.
.
.
#Edit# I updated the kernel version according to this site: https://itsfoss.com/upgrade-linux-kernel-ubuntu/ to the v6.2.10 and it slightly helped but the logging time is too slow.
New logs
uname output
$ uname -r
6.2.10-060210-generic
systemd-analyze output
$ systemd-analyze
Startup finished in 10.400s (firmware) + 5.395s (loader) + 17.545s (kernel) + 32.571s (userspace) = 1min 5.912s
graphical.target reached after 32.512s in userspace
systemd-analyze critical-chain output
$ systemd-analyze critical-chain
The time when unit became active or started is printed after the "@" character.
The time the unit took to start is printed after the "+" character.
graphical.target @32.512s
└─multi-user.target @32.511s
└─plymouth-quit-wait.service @13.856s +18.652s
└─systemd-user-sessions.service @13.810s +33ms
└─nss-user-lookup.target @13.708s
└─sssd.service @12.861s +839ms
└─basic.target @12.793s
└─sockets.target @12.793s
└─snapd.socket @12.767s +25ms
└─sysinit.target @12.752s
└─snapd.apparmor.service @7.875s +4.876s
└─apparmor.service @1.147s +6.701s
└─local-fs.target @1.108s
└─run-snapd-ns-snapd\x2ddesktop\x2dintegration.mnt.mount @31.438s
└─run-snapd-ns.mount @29.809s
└─swap.target @1.647s
└─dev-mapper-vgubuntu\x2dswap_1.swap @1.591s +46ms
└─dev-mapper-vgubuntu\x2dswap_1.device @1.572s
systemd-analyze blame output
$ systemd-analyze blame
18.652s plymouth-quit-wait.service
16.314s snapd.service
7.026s NetworkManager-wait-online.service
6.701s apparmor.service
4.876s snapd.apparmor.service
4.612s fwupd.service
1.407s systemd-rfkill.service
1.369s dev-mapper-vgubuntu\x2droot.device
995ms cups.service
865ms dev-loop6.device
839ms sssd.service
772ms dev-loop5.device
769ms dev-loop4.device
768ms dev-loop3.device
768ms dev-loop7.device
767ms dev-loop2.device
766ms dev-loop1.device
765ms dev-loop0.device
713ms user@1000.service
706ms networkd-dispatcher.service
669ms udisks2.service
655ms accounts-daemon.service
612ms snapd.seeded.service
.
.
.
~/.bashrc
and more, readman bash
). Check which processes are getting started in~/.config/autostart/*
. – waltinator Apr 14 '23 at 03:11