Manjaro taking too long to boot

boot

#1

Recently I was testing a bunch of distributions, including different Manjaro flavors, but I’ve realized that something was wrong… The boot takes almost the same on all other distributions and doesn’t matter what DE you’re using. So, I’ve searched for some clues and people told me I should disable or mask some services, especially the systemd services, like bluetooth, cups and things that aren’t that important and are enabled by default on most distributions. Bluetooth and Cups are one of them, if you don’t use bluetooth services and doesn’t own a printer, why would you have these services enabled on boot? I’m already using automatic login to make it even more faster to boot.

I used the systemd-analyze command to analyze how long my boot is taking, here’s the result:

First time booting up the computer after 1 day turned off.
[ariel@ariel-pc ~]$ systemd-analyze
Startup finished in 15.257s (firmware) + 6.143s (loader) + 2.587s (kernel) + 43.868s (userspace) = 1min 7.856s
graphical.target reached after 11.235s in userspace
More than 1 minute.

Rebooting
[ariel@ariel-pc ~]$ systemd-analyze
Startup finished in 15.072s (firmware) + 6.098s (loader) + 2.570s (kernel) + 12.516s (userspace) = 36.258s
graphical.target reached after 11.438s in userspace
About: 48 seconds. Sometimes it’s even more. It isn’t that worse because I’ve already disabled and masked some services.

The systemd-analyze blame command shows me this:
[ariel@ariel-pc ~]$ systemd-analyze blame
35.209s man-db.service
5.881s systemd-journal-flush.service
4.361s lvm2-monitor.service
4.231s systemd-modules-load.service
2.739s dev-sda1.device
2.351s NetworkManager.service
2.117s accounts-daemon.service
2.006s pamac-mirrorlist.service
1.522s polkit.service
1.261s systemd-logind.service
1.251s linux-module-cleanup.service
1.250s logrotate.service
738ms systemd-tmpfiles-setup-dev.service
716ms systemd-fsck@dev-disk-by\x2duuid-04c86691\x2d86f7\x2d4da1\x2db52a\x2d1a2c1e2e8574.service
716ms systemd-fsck@dev-disk-by\x2duuid-8291\x2d1459.service
601ms dev-mqueue.mount
599ms dev-hugepages.mount
598ms colord.service
553ms systemd-remount-fs.service
492ms sys-kernel-debug.mount
413ms systemd-timesyncd.service
388ms home.mount
355ms boot-efi.mount
333ms systemd-udev-trigger.service
288ms udisks2.service
288ms systemd-udevd.service
242ms kmod-static-nodes.service
225ms user@1000.service
214ms upower.service
200ms systemd-journald.service
177ms systemd-tmpfiles-setup.service
157ms systemd-random-seed.service
156ms systemd-sysctl.service
139ms gdm.service
133ms dev-disk-by\x2duuid-1ea7d316\x2d826c\x2d4855\x2d803d\x2d52bb68857953.swap
116ms wpa_supplicant.service
95ms systemd-update-utmp.service
83ms systemd-user-sessions.service
75ms tmp.mount
45ms systemd-tmpfiles-clean.service
17ms rtkit-daemon.service
6ms sys-kernel-config.mount
3ms sys-fs-fuse-connections.mount

I’ve seen a lot of users saying that I can disable lvm2-monitor if I’m not using LVM and the NetworkManager if my internet connects automatically and it does. What do you guys think?

Using systemctl list-unit-files | grep enabled command to see what’s enabled on my system:
[ariel@ariel-pc ~]$ systemctl list-unit-files | grep enabled
autovt@.service enabled
cronie.service enabled
dbus-org.freedesktop.NetworkManager.service enabled
dbus-org.freedesktop.nm-dispatcher.service enabled
display-manager.service enabled
gdm.service enabled
getty@.service enabled
haveged.service enabled
linux-module-cleanup.service enabled
NetworkManager-dispatcher.service enabled
NetworkManager.service enabled
systemd-fsck-root.service enabled-runtime
systemd-timesyncd.service enabled
remote-fs.target enabled
pamac-cleancache.timer enabled
pamac-mirrorlist.timer enabled

I know that autovt@, cronie and getty@ shouldn’t be disabled. I’m not sure about other services above.

I’m currently using Manjaro Gnome. The same boot problems happened on Manjaro Xfce, KDE and Budgie. I’m using a Toshiba HD with 7200 RPM, does it count? Unfortunately I don’t have SSD.

Most services give some info using man command, but not all of them. I don’t know exactly how to have more info about all of them before disabling. I used these commands below:
sudo systemctl stop bluetooth.service
sudo systemctl disable bluetooth.service
sudo systemctl mask bluetooth.service

Does anyone please have some tip to give me? I don’t want to disable something important.


#2

Are all those DEs installed on the same distribution, or have you installed and tested them separately? Each DE comes with its own sets of services, and those usually start at boot no matter which DE you actually use. Which means, if you have both Xfce and KDE installed on the same installation, even Xfce will take longer to boot.

Too bad. :stuck_out_tongue:


#3

Maybe this problem is related to your long startup time.


#4

This is a pacman database service. Wrong!! Read next post, please!

I changed your title. You don’t have to cry to get help here. Whenever someone that has experience on your issue is available, you 'll get help. Also, “time” is referring to system time issues.


#5

man-db isn’t pacman specific, it’s a systemd service timer event being triggered to run a check on the linux man pages for any changes and to re-index the database as necessary. Usually when it runs at boot time it is because the machine was shutdown when it was scheduled to run (seems to be set at midnight on Mondays by default).


#6

Oops, sorry! I did it again… My mind trips lately… :astonished::zipper_mouth_face:


#7

hehe don’t worry about it, mine does too as per my post earlier about pushing kernel updates from arch to stable…


#8

Nope, these DEs are installed separately. I didn’t install all of them together.
I’m currently using Manjaro Gnome (fresh install).


#9

I already have haveged.service enabled.


#10

I just was trying to be polite. Sorry!
BTW, this means I cannot disable man-db.service?


#11

What do you think about disabling these services:

dbus-org.freedesktop.NetworkManager.service
dbus-org.freedesktop.nm-dispatcher.service
NetworkManager-dispatcher.service

Are they really necessary? I’ve been search on the internet and haven’t seen much about them.

I’ve already disabled:
ModemManager.service
org.cups.cupsd.service (I don’t own a printer)
tlp-sleep.service (I’m not using laptop)
tlp.service (I’m not using laptop)
dbus-org.bluez.service (I don’t use bluetooth)
bluetooth.service (I don’t use bluetooth)

I also disabled and masked these services:
avahi-daemon.service
dbus-org.freedesktop.Avahi.service


#12

They are if you want internet … unless you plan on using something other than networkmanager


#13

I disabled them as a test and internet is still working. They seem to be useless, at least for me.

Anyway, I just want to have more INFO about them!


#14

This will load things in:
/etc/NetworkManager/dispatcher.d/
Which for me is tlp and vpn scripts…


#15

I don’t use VPN or TLP. These services are probably related to Network Manager settings.

Ok, I’ve found out that I cannot disable dbus-org.freedesktop.NetworkManager.service and NetworkManager.service
The others I meantioned above were disabled and I didn’t find any issue.


#16

Firmware is pre-kernel, so e.g. BIOS. There’s nothing that can be done about that from within Linux. This means your boot time will always be 15 seconds longer than any customisation will allow. You’re going to quickly hit diminishing returns; that is, trimming one second from userspace isn’t going to make very much of a difference overall.

You can’t get it much lower than this, especially with an HDD.

The command that will tell you exactly which services are making a difference to boot time is

systemd-analyze critical-chain
Example
The time after the unit is active or started is printed after the "@" character.
The time the unit takes to start is printed after the "+" character.

graphical.target @13.437s
└─multi-user.target @13.437s
  └─autofs.service @13.352s +83ms
    └─network-online.target @13.348s
      └─NetworkManager-wait-online.service @6.385s +6.963s
        └─NetworkManager.service @5.510s +870ms
          └─dbus.service @5.507s
            └─basic.target @5.496s
              └─sockets.target @5.496s
                └─avahi-daemon.socket @5.496s
                  └─sysinit.target @5.496s
                    └─systemd-timesyncd.service @5.194s +302ms
                      └─systemd-tmpfiles-setup.service @5.109s +79ms
                        └─local-fs.target @5.108s
                          └─run-media-jonathon-8GB.mount @21.656s
                            └─local-fs-pre.target @1.332s
                              └─lvm2-monitor.service @197ms +1.135s
                                └─lvm2-lvmetad.service @227ms
                                  └─lvm2-lvmetad.socket @194ms
                                    └─-.mount
                                      └─system.slice
                                        └─-.slice

Note how NetworkManager-wait-online.service is adding 7 seconds to the boot time.

Depending on whether this is time-to-DM or time-to-desktop you can also check any user services,

systemd-analyze --user critical-chain
Example
The time after the unit is active or started is printed after the "@" character.
The time the unit takes to start is printed after the "+" character.

default.target @543ms
└─psd.service @60ms +4ms
  └─basic.target @58ms
    └─sockets.target @58ms
      └─dbus.socket @44ms +13ms
        └─-.mount @25ms
          └─home.mount @25ms
            └─-.mount @25ms
              └─...

#17

You can disable it. But man pages will not be updated automaticly then.
:slight_smile:


#18

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.