iansixx
February 10, 2021, 4:54pm
1
Hi, newbie here, i’ve been using ubuntu and windows 10 with a mechanical hard drive for the past few years and i never had trouble with long boot times so this issue is new for me, i did a little search before posting but i couldn’t figure out what is causing this issue.
its a rather fresh installation, no apps on autostart, no compositing, nothing major.
any help would be appreciated
systemd-analyze blame
output :
6.465s polkit.service
6.354s lvm2-monitor.service
6.079s snapd.service
5.718s udisks2.service
3.866s avahi-daemon.service
3.858s NetworkManager.service
3.729s systemd-logind.service
3.693s cups.service
3.642s dev-sda1.device
2.264s systemd-journal-flush.service
1.490s apparmor.service
1.328s ldconfig.service
1.248s user@1000.service
1.234s ModemManager.service
1.095s systemd-sysusers.service
968ms upower.service
906ms systemd-udevd.service
811ms systemd-fsck-root.service
647ms tlp.service
574ms systemd-journal-catalog-update.service
524ms systemd-timesyncd.service
489ms systemd-tmpfiles-setup-dev.service
379ms dev-hugepages.mount
378ms dev-mqueue.mount
378ms sys-kernel-debug.mount
377ms sys-kernel-tracing.mount
375ms kmod-static-nodes.service
374ms modprobe@configfs.service
374ms modprobe@drm.service
373ms modprobe@fuse.service
356ms systemd-modules-load.service
311ms linux-module-cleanup.service
310ms snapd.apparmor.service
306ms systemd-binfmt.service
303ms systemd-random-seed.service
276ms systemd-journald.service
241ms systemd-tmpfiles-setup.service
198ms systemd-udev-trigger.service
178ms dev-disk-by\x2duuid-1454278d\x2d26af\x2d4ec4\x2d8f0e\x2d38e5356bd9fd.swap
166ms systemd-sysctl.service
114ms systemd-update-utmp.service
94ms rtkit-daemon.service
90ms systemd-remount-fs.service
75ms systemd-tmpfiles-clean.service
39ms sys-fs-fuse-connections.mount
38ms sys-kernel-config.mount
32ms systemd-user-sessions.service
32ms systemd-update-done.service
25ms user-runtime-dir@1000.service
13ms tmp.mount
3ms proc-sys-fs-binfmt_misc.mount
1ms snapd.socket
systemd-analyze critical-chain
output :
graphical.target @18.810s
└─multi-user.target @18.809s
└─ModemManager.service @17.574s +1.234s
└─polkit.service @11.106s +6.465s
└─basic.target @11.087s
└─sockets.target @11.087s
└─snapd.socket @11.086s +1ms
└─sysinit.target @11.056s
└─systemd-update-done.service @11.023s +32ms
└─ldconfig.service @9.692s +1.328s
└─local-fs.target @9.690s
└─local-fs-pre.target @9.689s
└─lvm2-monitor.service @3.334s +6.354s
└─lvm2-lvmetad.service @6.851s
└─systemd-udevd.service @5.944s +906ms
└─systemd-tmpfiles-setup-dev.service @5.452s +489ms
└─systemd-sysusers.service @4.356s +1.095s
└─systemd-remount-fs.service @4.242s +90ms
└─systemd-fsck-root.service @3.430s +811ms
└─systemd-journald.socket @3.308s
└─-.mount @3.213s
└─-.slice @3.213s
you can remove
sudo systemctl mask lvm2-monitor.service
sudo systemctl mask l ModemManager.service
2 Likes
iansixx
February 12, 2021, 3:31pm
3
thank you for your reply.
That “l” on sudo systemctl mask l ModemManager.service
is a typo, right?
Since I am here, removing these services would brush off some of the time from the booting process, any tips for the kde starting up part?
again, thanks !
If you don’t use snaps etc packages, you can also include it in the list
sudo systemctl mask lvm2-monitor.service
sudo systemctl mask ModemManager.service
sudo systemctl mask snapd.service
1 Like
iansixx
February 12, 2021, 6:33pm
5
thank you, i was thinking about it since i’m running on a small partition and i don’t use snap since it uses so much space.
Alfy
February 12, 2021, 6:39pm
6
if you run systemd-analyze plot > boot.svg
and then open boot.svg in a browser you will see many of those startup items run in parallel, it’s also a nice visual map of the where the time passes.
1 Like
iansixx
February 12, 2021, 6:45pm
7
Manjaro Linux ian-pc (Linux 5.9.16-1-MANJARO #1 SMP PREEMPT Mon Dec 21 22:00:46 UTC 2020) x86-64
Startup finished in 3.296s (kernel) + 4min 12.052s (userspace) = 4min 15.348s graphical.target reached after 21.117s in userspace
0.0s 1.0s 2.0s 3.0s 4.0s 5.0s 6.0s 7.0s 8.0s 9.0s 10.0s 11.0s 12.0s 13.0s 14.0s 15.0s 16.0s 17.0s 18.0s 19.0s 20.0s 21.0s 22.0s 23.0s 24.0s 25.0s 26.0s 27.0s 28.0s 29.0s 30.0s 31.0s 32.0s 33.0s 34.0s 35.0s 36.0s 37.0s 38.0s 39.0s 40.0s 41.0s 42.0s 43.0s 44.0s 45.0s 46.0s 47.0s 48.0s 49.0s 50.0s 51.0s 52.0s 53.0s 54.0s 55.0s 56.0s 57.0s 58.0s 59.0s 60.0s 61.0s 62.0s 63.0s 64.0s 65.0s 66.0s 67.0s 68.0s 69.0s 70.0s 71.0s 72.0s 73.0s 74.0s 75.0s 76.0s 77.0s 78.0s 79.0s 80.0s 81.0s 82.0s 83.0s 84.0s 85.0s 86.0s 87.0s 88.0s 89.0s 90.0s 91.0s 92.0s 93.0s 94.0s 95.0s 96.0s 97.0s 98.0s 99.0s 100.0s 101.0s 102.0s 103.0s 104.0s 105.0s 106.0s 107.0s 108.0s 109.0s 110.0s 111.0s 112.0s 113.0s 114.0s 115.0s 116.0s 117.0s 118.0s 119.0s 120.0s 121.0s 122.0s 123.0s 124.0s 125.0s 126.0s 127.0s 128.0s 129.0s 130.0s 131.0s 132.0s 133.0s 134.0s 135.0s 136.0s 137.0s 138.0s 139.0s 140.0s 141.0s 142.0s 143.0s 144.0s 145.0s 146.0s 147.0s 148.0s 149.0s 150.0s 151.0s 152.0s 153.0s 154.0s 155.0s 156.0s 157.0s 158.0s 159.0s 160.0s 161.0s 162.0s 163.0s 164.0s 165.0s 166.0s 167.0s 168.0s 169.0s 170.0s 171.0s 172.0s 173.0s 174.0s 175.0s 176.0s 177.0s 178.0s 179.0s 180.0s 181.0s 182.0s 183.0s 184.0s 185.0s 186.0s 187.0s 188.0s 189.0s 190.0s 191.0s 192.0s 193.0s 194.0s 195.0s 196.0s 197.0s 198.0s 199.0s 200.0s 201.0s 202.0s 203.0s 204.0s 205.0s 206.0s 207.0s 208.0s 209.0s 210.0s 211.0s 212.0s 213.0s 214.0s 215.0s 216.0s 217.0s 218.0s 219.0s 220.0s 221.0s 222.0s 223.0s 224.0s 225.0s 226.0s 227.0s 228.0s 229.0s 230.0s 231.0s 232.0s 233.0s 234.0s 235.0s 236.0s 237.0s 238.0s 239.0s 240.0s 241.0s 242.0s 243.0s 244.0s 245.0s 246.0s 247.0s 248.0s 249.0s 250.0s 251.0s 252.0s 253.0s 254.0s 255.0s
kernel
systemd
init.scope
-.slice
system.slice
-.mount
system-getty.slice
system-modprobe.slice
user.slice
systemd-ask-password-console.path
systemd-ask-password-wall.path
proc-sys-fs-binfmt_misc.automount
cryptsetup.target
getty.target
remote-fs.target
slices.target
dm-event.socket
lvm2-lvmetad.socket
lvm2-lvmpolld.socket
systemd-coredump.socket
systemd-journald-audit.socket
systemd-journald-dev-log.socket
systemd-journald.socket
systemd-udevd-control.socket
systemd-udevd-kernel.socket
dev-hugepages.mount (145ms)
dev-mqueue.mount (144ms)
sys-kernel-debug.mount (143ms)
sys-kernel-tracing.mount (142ms)
apparmor.service (1.175s)
kmod-static-nodes.service (141ms)
lvm2-monitor.service (6.375s)
modprobe@configfs.service (209ms)
modprobe@drm.service (488ms)
modprobe@fuse.service (269ms)
systemd-binfmt.service (81ms)
systemd-fsck-root.service (653ms)
systemd-journald.service (259ms)
systemd-modules-load.service (981ms)
systemd-udev-trigger.service (163ms)
dev-sda1.device (3.902s)
proc-sys-fs-binfmt_misc.mount (1ms)
sys-kernel-config.mount (24ms)
sys-fs-fuse-connections.mount (2ms)
systemd-remount-fs.service (116ms)
systemd-journal-flush.service (2.752s)
systemd-random-seed.service (324ms)
systemd-sysusers.service (1.024s)
systemd-sysctl.service (174ms)
snapd.apparmor.service (250ms)
systemd-tmpfiles-setup-dev.service (323ms)
systemd-udevd.service (915ms)
lvm2-lvmetad.service
sys-module-configfs.device
sys-module-fuse.device
dev-disk-by\x2dpath-pci\x2d0000:00:11.0\x2data\x2d4.0.device
dev-disk-by\x2did-wwn\x2d0x5000c5003d95a986.device
dev-disk-by\x2dpath-pci\x2d0000:00:11.0\x2data\x2d4.device
dev-disk-by\x2did-ata\x2dST500DM002\x2d1BC142_W2A1DL5J.device
dev-sdb.device
sys-devices-pci0000:00-0000:00:11.0-ata4-host3-target3:0:0-3:0:0:0-block-sdb.device
dev-ttyS1.device
sys-devices-platform-serial8250-tty-ttyS1.device
dev-ttyS2.device
sys-devices-platform-serial8250-tty-ttyS2.device
dev-ttyS3.device
sys-devices-platform-serial8250-tty-ttyS3.device
dev-disk-by\x2did-wwn\x2d0x5000c5003d95a986\x2dpart1.device
dev-disk-by\x2dpath-pci\x2d0000:00:11.0\x2data\x2d4.0\x2dpart1.device
dev-disk-by\x2did-ata\x2dST500DM002\x2d1BC142_W2A1DL5J\x2dpart1.device
dev-disk-by\x2dlabel-Files.device
dev-disk-by\x2dpartuuid-6a656b0a\x2d01.device
dev-disk-by\x2dpath-pci\x2d0000:00:11.0\x2data\x2d4\x2dpart1.device
dev-disk-by\x2duuid-0AE8D2BCE8D2A4EB.device
dev-sdb1.device
sys-devices-pci0000:00-0000:00:11.0-ata4-host3-target3:0:0-3:0:0:0-block-sdb-sdb1.device
dev-ttyS0.device
sys-devices-pnp0-00:03-tty-ttyS0.device
dev-disk-by\x2did-wwn\x2d0x50014ee00146201b.device
dev-disk-by\x2dpath-pci\x2d0000:00:11.0\x2data\x2d2.device
dev-disk-by\x2did-ata\x2dWDC_WD1600AAJS\x2d00L7A0_WD\x2dWMAV35552788.device
dev-disk-by\x2dpath-pci\x2d0000:00:11.0\x2data\x2d2.0.device
dev-sda.device
sys-devices-pci0000:00-0000:00:11.0-ata2-host1-target1:0:0-1:0:0:0-block-sda.device
dev-disk-by\x2dpath-pci\x2d0000:00:11.0\x2data\x2d2\x2dpart1.device
dev-disk-by\x2dpartuuid-53cb4d8c\x2d01.device
dev-disk-by\x2did-wwn\x2d0x50014ee00146201b\x2dpart1.device
dev-disk-by\x2did-ata\x2dWDC_WD1600AAJS\x2d00L7A0_WD\x2dWMAV35552788\x2dpart1.device
dev-disk-by\x2dpath-pci\x2d0000:00:11.0\x2data\x2d2.0\x2dpart1.device
dev-disk-by\x2duuid-bde0acb2\x2dc174\x2d4646\x2da9c0\x2dd39784e349c8.device
sys-devices-pci0000:00-0000:00:11.0-ata2-host1-target1:0:0-1:0:0:0-block-sda-sda1.device
sys-subsystem-net-devices-enp2s0.device
sys-devices-pci0000:00-0000:00:04.0-0000:02:00.0-net-enp2s0.device
dev-disk-by\x2did-wwn\x2d0x50014ee00146201b\x2dpart2.device
dev-disk-by\x2did-ata\x2dWDC_WD1600AAJS\x2d00L7A0_WD\x2dWMAV35552788\x2dpart2.device
dev-disk-by\x2duuid-1454278d\x2d26af\x2d4ec4\x2d8f0e\x2d38e5356bd9fd.device
dev-disk-by\x2dpath-pci\x2d0000:00:11.0\x2data\x2d2.0\x2dpart2.device
dev-disk-by\x2dpath-pci\x2d0000:00:11.0\x2data\x2d2\x2dpart2.device
dev-disk-by\x2dpartuuid-53cb4d8c\x2d02.device
dev-sda2.device
sys-devices-pci0000:00-0000:00:11.0-ata2-host1-target1:0:0-1:0:0:0-block-sda-sda2.device
dev-disk-by\x2duuid-1454278d\x2d26af\x2d4ec4\x2d8f0e\x2d38e5356bd9fd.swap (289ms)
dev-disk-by\x2dpartuuid-53cb4d8c\x2d03.device
dev-disk-by\x2dpath-pci\x2d0000:00:11.0\x2data\x2d2\x2dpart3.device
dev-disk-by\x2did-ata\x2dWDC_WD1600AAJS\x2d00L7A0_WD\x2dWMAV35552788\x2dpart3.device
dev-disk-by\x2duuid-08CA653FCA6529E0.device
dev-disk-by\x2did-wwn\x2d0x50014ee00146201b\x2dpart3.device
dev-disk-by\x2dlabel-System\x5cx20Reserved.device
dev-disk-by\x2dpath-pci\x2d0000:00:11.0\x2data\x2d2.0\x2dpart3.device
dev-sda3.device
sys-devices-pci0000:00-0000:00:11.0-ata2-host1-target1:0:0-1:0:0:0-block-sda-sda3.device
dev-disk-by\x2did-ata\x2dWDC_WD1600AAJS\x2d00L7A0_WD\x2dWMAV35552788\x2dpart2.swap
dev-disk-by\x2dpath-pci\x2d0000:00:11.0\x2data\x2d2\x2dpart2.swap
dev-disk-by\x2dpartuuid-53cb4d8c\x2d02.swap
dev-disk-by\x2did-wwn\x2d0x50014ee00146201b\x2dpart2.swap
dev-disk-by\x2dpath-pci\x2d0000:00:11.0\x2data\x2d2.0\x2dpart2.swap
dev-sda2.swap
swap.target
tmp.mount (5ms)
dev-snd-by\x2dpath-pci\x2d0000:01:00.1.device
dev-snd-controlC1.device
sys-devices-pci0000:00-0000:00:02.0-0000:01:00.1-sound-card1-controlC1.device
dev-snd-by\x2dpath-pci\x2d0000:00:14.2.device
dev-snd-controlC0.device
sys-devices-pci0000:00-0000:00:14.2-sound-card0-controlC0.device
dev-disk-by\x2dpartuuid-53cb4d8c\x2d04.device
dev-disk-by\x2dpath-pci\x2d0000:00:11.0\x2data\x2d2\x2dpart4.device
dev-disk-by\x2duuid-F4EC69A4EC6961BA.device
dev-disk-by\x2did-wwn\x2d0x50014ee00146201b\x2dpart4.device
dev-disk-by\x2did-ata\x2dWDC_WD1600AAJS\x2d00L7A0_WD\x2dWMAV35552788\x2dpart4.device
dev-disk-by\x2dpath-pci\x2d0000:00:11.0\x2data\x2d2.0\x2dpart4.device
dev-sda4.device
sys-devices-pci0000:00-0000:00:11.0-ata2-host1-target1:0:0-1:0:0:0-block-sda-sda4.device
local-fs-pre.target
local-fs.target
ldconfig.service (1.372s)
systemd-tmpfiles-setup.service (389ms)
systemd-journal-catalog-update.service (120ms)
systemd-timesyncd.service (300ms)
systemd-update-utmp.service (77ms)
time-set.target
time-sync.target
systemd-update-done.service (28ms)
sysinit.target
cups.path
logrotate.timer
man-db.timer
pamac-cleancache.timer
pamac-mirrorlist.timer
pkgfile-update.timer
shadow.timer
systemd-tmpfiles-clean.timer
paths.target
timers.target
avahi-daemon.socket
cups.socket
dbus.socket
snapd.socket (1ms)
sockets.target
basic.target
sound.target
avahi-daemon.service (5.844s)
cronie.service
dbus.service
NetworkManager.service (5.838s)
linux-module-cleanup.service (82ms)
polkit.service (8.797s)
snapd.service (7.075s)
systemd-logind.service (5.756s)
logrotate.service (1.778s)
man-db.service (16.846s)
shadow.service
dev-disk-by\x2did-usb\x2dWDC_WD25_00BEVT\x2d60ZCT1_WDC_WD2500_WD\x2dWXF0E79CNH55\x2d0:0.device
dev-disk-by\x2dpath-pci\x2d0000:00:12.2\x2dusb\x2d0:2:1.0\x2dscsi\x2d0:0:0:0.device
dev-sdc.device
sys-devices-pci0000:00-0000:00:12.2-usb1-1\x2d2-1\x2d2:1.0-host6-target6:0:0-6:0:0:0-block-sdc.device
dev-disk-by\x2did-usb\x2dWDC_WD25_00BEVT\x2d60ZCT1_WDC_WD2500_WD\x2dWXF0E79CNH55\x2d0:0\x2dpart1.device
dev-disk-by\x2dpartuuid-723bb9fe\x2d01.device
dev-disk-by\x2duuid-12A89049A8902CEB.device
dev-disk-by\x2dpath-pci\x2d0000:00:12.2\x2dusb\x2d0:2:1.0\x2dscsi\x2d0:0:0:0\x2dpart1.device
dev-sdc1.device
sys-devices-pci0000:00-0000:00:12.2-usb1-1\x2d2-1\x2d2:1.0-host6-target6:0:0-6:0:0:0-block-sdc-sdc1.device
network.target
NetworkManager-wait-online.service (6.524s)
cups.service (2.511s)
systemd-user-sessions.service (39ms)
sddm.service
dev-rfkill.device
sys-devices-virtual-misc-rfkill.device
systemd-rfkill.socket
ModemManager.service (1.226s)
multi-user.target
graphical.target
tlp.service (658ms)
network-online.target
pkgfile-update.service (3min 48.581s)
user-1000.slice
user-runtime-dir@1000.service (26ms)
run-user-1000.mount
user@1000.service (1.158s)
session-1.scope
udisks2.service (5.406s)
rtkit-daemon.service (168ms)
run-user-1000-gvfs.mount
upower.service (1.194s)
run-media-ian-Files.mount
run-media-ian-12A89049A8902CEB.mount
run-media-ian-F4EC69A4EC6961BA.mount
system-systemd\x2dcoredump.slice
run-user-1000-doc.mount
Activating
Active
Deactivating
Setting up security module
Generators
Loading unit files
iansixx
February 12, 2021, 6:46pm
8
thank you, that is really interesting, lvm2 does take a lot of time, so does snapd, is there a way to delay some services to say, 2 min after boot? like for instance systemd-journal-flush.service
?
Alfy
February 12, 2021, 7:01pm
9
sorry that’s above my paygrade (i’m newish too).
I did mask lvm2 and snap as i dont use them.
eta:
Once i’d seen the amount of time spent in firmware and areas other than the services starting I kind of gave up as firmware made it all seem a bit of a waste, now i tend to sleep the system rather than shutdown.
iansixx
February 12, 2021, 7:05pm
10
Thanks anyways
just did the same and it did boot a lot faster, but its kde (i mean not kde but up to when kde begins loading) that is taking about 1 min to load it up. unfortunately for me, sleep is not a desirable option.
Alfy
February 12, 2021, 7:09pm
11
here is an arch thread about journal flush
https://bbs.archlinux.org/viewtopic.php?id=251134
You could try to mange the flush a bit more manually with something like sudo journalctl --vacuum-size=50M
occasionally. See if that helps.
(I have it set as an alias so I only have to type “jclean”)
iansixx
February 12, 2021, 7:12pm
12
i do that manually already, i’ll try disabling it then. its 4000 ms less
Alfy
February 12, 2021, 7:14pm
13
i dont know if disabling it is a good idea, please read more before trying it
iansixx
February 12, 2021, 7:15pm
14
i mean the masking thing, if it messes it up i can just unmask it, right?!
Alfy
February 12, 2021, 7:18pm
15
masking is more severe than disabling. Something can still run if disabled and something else requires it to run. Masking it makes it impossible to run even if something else requires it to run.
(though both can be reversed, yes)
iansixx
February 12, 2021, 7:21pm
16
i see, well i’m used to messing it up and having to undo through the terminal lol.
there is no other way to learn i guess
1 Like
Alfy
February 12, 2021, 7:22pm
17
hehe so true.
timeshift and tty
1 Like
This one caught my eye: pkgfile-update.service (3min 48.581s). Check:
systemctl status pkgfile-update.service
systemctl status pkgfile-update.timer
systemctl --failed
pkgfile doc
If it were me, I’d remove the package pkgfile. I use to use pkgfile
on the command line to find files, but I now use pacman -F
. When I do an update, I also run pacman -Fy
. You see these files at /var/lib/pacman/sync/*.files.
Perhaps others could chime in.
iansixx
February 12, 2021, 10:12pm
19
● pkgfile-update.service - pkgfile database update
Loaded: loaded (/usr/lib/systemd/system/pkgfile-update.service; static)
Active: inactive (dead)
TriggeredBy: ● pkgfile-update.timer
● pkgfile-update.timer - pkgfile database update timer
Loaded: loaded (/usr/lib/systemd/system/pkgfile-update.timer; enabled; vendor preset: d>
Active: active (waiting) since Fri 2021-02-12 15:52:37 -03; 3h 16min ago
Trigger: Sat 2021-02-13 00:00:00 -03; 4h 51min left
Triggers: ● pkgfile-update.service
Feb 12 15:52:37 ian-pc systemd[1]: Started pkgfile database update timer.
UNIT LOAD ACTIVE SUB DESCRIPTION
0 loaded units listed.
honestly i’m always tempted to remove these files since they don’t seem to be needed on a regular basis. but pkgfile runs after everything has loaded, right? perhaps it doesn’t affect booting performance?!