help to optimize boot

Hi all,

I am new to linux in general (7 months in).

Trying to figure out why manjaro(cinnamon) takes longer than ubuntu(gnome) to give me a usable desktop. OS are on separate SSDs. If it helps, I have setup both to auto login.

Following is clip from dmesg on manjaro:

[    2.148825] [drm] Initialized nvidia-drm 0.0.0 20160202 for 0000:01:00.0 on minor 0
[    3.701078] caller _nv000939rm+0x1bf/0x1f0 [nvidia] mapping multiple BARs
[    6.420926] r8168: enp3s0: link up
[    6.420973] IPv6: ADDRCONF(NETDEV_CHANGE): enp3s0: link becomes ready
[   14.012886] kauditd_printk_skb: 22 callbacks suppressed
[   14.012888] audit: type=1131 audit(1565760156.843:33): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=NetworkManager-dispatcher comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[   33.237600] audit: type=1131 audit(1565760176.066:34): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-hostnamed comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[   44.786304] random: crng init done
[   44.786309] random: 2 urandom warning(s) missed due to ratelimiting
[   44.806741] audit: type=1112 audit(1565760187.636:35): pid=574 uid=0 auid=1000 ses=1 msg='op=login id=1000 exe="/usr/bin/lightdm" hostname=glenn-pc addr=? terminal=/dev/tty7 res=success'
[   44.866384] fuse init (API version 7.27)
[   45.489751] audit: type=1130 audit(1565760188.320:36): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=rtkit-daemon comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[   45.640920] audit: type=1130 audit(1565760188.470:37): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=org.cups.cupsd comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[   45.974581] audit: type=1130 audit(1565760188.803:38): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=upower comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[   46.241100] audit: type=1130 audit(1565760189.070:39): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=colord comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[   46.418772] audit: type=1130 audit(1565760189.246:40): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=udisks2 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[   50.331826] audit: type=1130 audit(1565760193.160:41): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=pamac-system comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[   50.337329] audit: type=1131 audit(1565760193.166:42): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=pamac-system comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[   50.570872] audit: type=1130 audit(1565760193.400:43): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=blueman-mechanism comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[   80.602107] audit: type=1131 audit(1565760223.430:44): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=blueman-mechanism comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'

Thanks

Can you post the hardware info?

Hi Keruskerfuerst,

Clip from inxi -b:

System:    Host: glenn-pc Kernel: 4.19.66-1-MANJARO x86_64 bits: 64 Desktop: Cinnamon 4.2.3 Distro: Manjaro Linux 
Machine:   Type: Desktop System: ASUS product: All Series v: N/A serial: <root required> 
           Mobo: ASUSTeK model: Z97-K v: Rev X.0x serial: <root required> UEFI [Legacy]: American Megatrends v: 2902 
           date: 03/31/2016 
CPU:       Quad Core: Intel Core i5-4690K type: MCP speed: 1000 MHz min/max: 800/4400 MHz 
Graphics:  Device-1: NVIDIA GM204 [GeForce GTX 970] driver: nvidia v: 430.40 
           Display: x11 server: X.Org 1.20.5 driver: nvidia tty: N/A 
           OpenGL: renderer: GeForce GTX 970/PCIe/SSE2 v: 4.6.0 NVIDIA 430.40 
Network:   Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet driver: r8168 
Drives:    Local Storage: total: 471.36 GiB used: 43.04 GiB (9.1%) 
Info:      Processes: 196 Uptime: 12m Memory: 15.61 GiB used: 1.26 GiB (8.1%) Shell: bash inxi: 3.0.35 

Thanks

Please provide the output of each of the followng:

systemctl --failed
systemd-analyze
systemd-analyze blame
systemd-analyze critical-chain
cat /proc/cmdline
journalctl --no-pager --no-hostname -b -p3
1 Like

Hi openminded,

[systemctl --failed]
0 loaded units listed.

[systemd-analyze]
Startup finished in 1.678s (kernel) + 3.311s (userspace) = 4.989s

[systemd-analyze blame]
           953ms tlp.service
           688ms mariadb.service
           464ms lvm2-monitor.service
           330ms dev-sdb1.device
           302ms systemd-modules-load.service
           300ms ModemManager.service
           200ms systemd-logind.service
           194ms systemd-udevd.service
           173ms polkit.service
           953ms tlp.service
           688ms mariadb.service
           464ms lvm2-monitor.service
           330ms dev-sdb1.device
           302ms systemd-modules-load.service
           300ms ModemManager.service
           200ms systemd-logind.service
           194ms systemd-udevd.service
           173ms polkit.service
           155ms systemd-journald.service
           149ms avahi-daemon.service
           145ms NetworkManager.service
           116ms lightdm.service
           110ms systemd-journal-flush.service
            85ms alsa-restore.service
            77ms upower.service
            68ms systemd-user-sessions.service
            64ms udisks2.service
            57ms user@1000.service
            57ms systemd-udev-trigger.service
            39ms systemd-tmpfiles-clean.service
            33ms swapfile.swap
            32ms accounts-daemon.service
            21ms systemd-update-utmp.service
            19ms tmp.mount
            19ms systemd-tmpfiles-setup.service
            18ms systemd-tmpfiles-setup-dev.service
            17ms dev-mqueue.mount
            17ms grub-boot-indeterminate.service
            17ms kmod-static-nodes.service
            17ms dev-hugepages.mount
            11ms org.cups.cupsd.service
            10ms systemd-random-seed.service
             9ms colord.service
             9ms sys-kernel-debug.mount
             8ms systemd-remount-fs.service
             5ms user-runtime-dir@1000.service
             4ms systemd-sysctl.service
             3ms sys-fs-fuse-connections.mount
             2ms rtkit-daemon.service
             1ms sys-kernel-config.mount

[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 @2.357s
└─multi-user.target @2.357s
  └─mariadb.service @1.409s +688ms
    └─network.target @1.358s
      └─NetworkManager.service @1.158s +145ms
        └─dbus.service @1.138s
          └─basic.target @1.062s
            └─sockets.target @1.043s
              └─dbus.socket @1.024s
                └─sysinit.target @773ms
                  └─systemd-update-utmp.service @732ms +21ms
                    └─systemd-tmpfiles-setup.service @694ms +19ms
                      └─local-fs.target @675ms
                        └─tmp.mount @638ms +19ms
                          └─local-fs-pre.target @637ms
                            └─lvm2-monitor.service @172ms +464ms
                              └─lvm2-lvmetad.service @189ms
                                └─systemd-journald.socket @168ms
                                  └─system.slice @155ms
                                    └─-.slice @155ms

[cat /proc/cmdline]
BOOT_IMAGE=/boot/vmlinuz-4.19-x86_64 root=UUID=b92aa0c1-bed3-4992-8b5c-391af2f8e8b8 rw

[journalctl --no-pager --no-hostname -b -p3]
-- Logs begin at Mon 2019-08-12 14:25:55 PST, end at Wed 2019-08-14 14:18:36 PST. --
-- No entries --

Thanks

You have blazing fast bootup, what's the problem exactly? What does "usable desktop" mean?

You have many "audit" messages in dmesg output, I guess you do not need them, you may want to add audit=0 to CMDLINE_LINUX string of /etc/default/grub and regenerate grub config with sudo update-grub.

Hi openminded,

By usable desktop, I mean the state where I can start using the desktop. The thing I am trying to remove is the long pause where there is black screen after the scrolling text of grub messages to this screen (I am not sure if upload image works -edit:it works)

-edit 2: by long pause with black screen, i suspect it is this bit from dmesg...
[ 2.148825] [drm] Initialized nvidia-drm 0.0.0 20160202 for 0000:01:00.0 on minor 0
[ 80.602107] audit: type=1131 audit(1565760223.430:44): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=blueman-mechanism comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'

Thanks

Try to disable autologin and see what happens. If that black screen is related to login screen or happens after login. These are different things to work on.

Hi openminded,

I have set the grub like so:
GRUB_CMDLINE_LINUX="audit=0 ipv6.disable=1"

Last line of dmesg now reads:
[ 52.545975] snd_hda_codec_hdmi hdaudioC1D0: HDMI: invalid ELD data byte 0

I think this is good enough for me, rather than having to login at startup.

Thank you kindly for all the help.

edit: disabling bluetooth has shaved off a few more. last line of dmesg now reads:
[ 32.198991] snd_hda_codec_hdmi hdaudioC1D0: HDMI: invalid ELD data byte 1

I suggested enabling login screen to not have fun but to find where the issue hides. But if you are not willing to to solve it, so be it.

1 Like

Maybe haveged needed?

Hi all,
I turned off auto login. The black screen pause comes after the user has logged in (if it was activated). Maybe ubuntu loads the wallpaper before doing the initialization stuff...
Now onto improving font rendering.
Thanks