Long Boot Time with Lenovo Ideapad (AMD) and Fedora 30 MATE

I use a Lenovo Ideapad 320-15AST and Fedora 30 (MATE-Compiz) and the problem is a really long boot time. About 3 minutes. I tried things (like installing haveged) and asked for help in different communities but nothing happened.

Startup finished in 4.090s (firmware) + 2.665s (loader) + 1.813s (kernel) + 16.614s (initrd) + 58.184s (userspace) = 1min 23.368s 
graphical.target reached after 58.168s in userspace

systemd-analyze blame

23.700s systemd-journal-flush.service
         14.132s firewalld.service
         13.057s dracut-initqueue.service
         11.497s udisks2.service
         11.403s systemd-cryptsetup@luks\x2da3833bed\x2d84d8\x2d4ac9\x2db9ae\x2>
         10.838s sssd.service
         10.377s plymouth-quit-wait.service
          8.188s NetworkManager-wait-online.service
          8.093s systemd-udev-settle.service
          7.755s lvm2-monitor.service
          5.441s polkit.service
          5.420s initrd-switch-root.service
          4.738s ModemManager.service
          4.629s abrtd.service
          3.530s smartd.service
          3.269s gssproxy.service
          3.246s lightdm.service
          2.721s rsyslog.service
          2.667s avahi-daemon.service
          2.516s chronyd.service
          1.896s systemd-udevd.service
          1.894s systemd-tmpfiles-setup-dev.service
          1.782s systemd-tmpfiles-setup.service
          1.578s systemd-vconsole-setup.service
          1.573s dnf-makecache.service
          1.440s lvm2-pvscan@253:0.service
          1.310s dbus-broker.service
          1.057s systemd-fsck@dev-disk-by\x2duuid-2BD9\x2dD758.service
          1.050s lm_sensors.service
          1.001s rtkit-daemon.service
          1.000s systemd-fsck@dev-mapper-fedora_localhost\x2d\x2dlive\x2dhome.s>
           994ms NetworkManager.service
           880ms accounts-daemon.service
           864ms livesys.service
           844ms dmraid-activation.service
           826ms auditd.service
           708ms systemd-logind.service
           696ms cups.service
           678ms systemd-fsck@dev-disk-by\x2duuid-75bfe8a5\x2d07bc\x2d4c1c\x2d9>
           593ms systemd-tmpfiles-clean.service
           568ms plymouth-switch-root.service
           493ms import-state.service
           487ms systemd-rfkill.service
           427ms boot-efi.mount
           384ms dev-mapper-fedora_localhost\x2d\x2dlive\x2dswap.swap
           364ms systemd-sysctl.service
           360ms systemd-journald.service
           340ms upower.service
           333ms home.mount
           320ms bluetooth.service
           313ms wpa_supplicant.service
           301ms systemd-udev-trigger.service
           284ms systemd-backlight@backlight:amdgpu_bl0.service
           281ms initrd-parse-etc.service
           260ms systemd-fsck-root.service
           251ms user@1000.service
           248ms var-lib-nfs-rpc_pipefs.mount
           223ms kmod-static-nodes.service
           221ms systemd-remount-fs.service
           208ms systemd-random-seed.service
           201ms rpc-statd-notify.service
           182ms plymouth-read-write.service
           177ms boot.mount
           168ms dracut-cmdline.service
           145ms dracut-pre-pivot.service
           112ms sysroot.mount
            81ms nfs-convert.service
            74ms dev-hugepages.mount
            73ms sys-kernel-debug.mount
            62ms systemd-user-sessions.service
            51ms initrd-cleanup.service
            47ms systemd-update-utmp.service
            40ms livesys-late.service
            32ms dracut-shutdown.service
            31ms dracut-pre-udev.service
            23ms dev-mqueue.mount
            22ms user-runtime-dir@1000.service
            20ms plymouth-start.service
            18ms sys-fs-fuse-connections.mount
            12ms systemd-update-utmp-runlevel.service
             7ms tmp.mount
             3ms sys-kernel-config.mount
             1ms initrd-udevadm-cleanup-db.service
           536us iscsi-shutdown.service

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 @58.168s
└─multi-user.target @58.167s
  └─atd.service @47.785s
    └─systemd-user-sessions.service @47.710s +62ms
      └─remote-fs.target @47.707s
        └─remote-fs-pre.target @47.707s
          └─iscsi-shutdown.service @47.592s +536us
            └─network.target @47.592s
              └─wpa_supplicant.service @51.043s +313ms
                └─basic.target @32.283s
                  └─dbus-broker.service @30.968s +1.310s
                    └─dbus.socket @30.868s
                      └─sysinit.target @30.775s
                        └─systemd-update-utmp.service @30.726s +47ms
                          └─auditd.service @29.897s +826ms
                            └─systemd-tmpfiles-setup.service @28.112s +1.782s
                              └─systemd-journal-flush.service @4.408s +23.700s
                                └─systemd-journald.service @4.045s +360ms

These are logs I got and I don’t know what I should do.
There’s also this screenshot from last command to let you know which lines are colored in red.

There’s also this log: sudo smartctl --all /dev/sda

[alireza@alireza-pc ~]$ sudo smartctl --all /dev/sda
[sudo] password for alireza: 
smartctl 7.0 2019-03-31 r4903 [x86_64-linux-5.2.15-200.fc30.x86_64] (local build)
Copyright (C) 2002-18, Bruce Allen, Christian Franke, www.smartmontools.org

Device Model:     ST1000LM035-1RK172
Serial Number:    WDEJ9WWY
LU WWN Device Id: 5 000c50 0ab140ebc
Firmware Version: LVM2
User Capacity:    1,000,204,886,016 bytes [1.00 TB]
Sector Sizes:     512 bytes logical, 4096 bytes physical
Rotation Rate:    5400 rpm
Form Factor:      2.5 inches
Device is:        Not in smartctl database [for details use: -P showall]
ATA Version is:   ACS-3 T13/2161-D revision 3b
SATA Version is:  SATA 3.1, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:    Mon Sep 23 19:56:52 2019 +0330
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

SMART overall-health self-assessment test result: PASSED

General SMART Values:
Offline data collection status:  (0x00)	Offline data collection activity
					was never started.
					Auto Offline Data Collection: Disabled.
Self-test execution status:      (   0)	The previous self-test routine completed
					without error or no self-test has ever 
					been run.
Total time to complete Offline 
data collection: 		(    0) seconds.
Offline data collection
capabilities: 			 (0x71) SMART execute Offline immediate.
					No Auto Offline data collection support.
					Suspend Offline collection upon new
					No Offline surface scan supported.
					Self-test supported.
					Conveyance Self-test supported.
					Selective Self-test supported.
SMART capabilities:            (0x0003)	Saves SMART data before entering
					power-saving mode.
					Supports SMART auto save timer.
Error logging capability:        (0x01)	Error logging supported.
					General Purpose Logging supported.
Short self-test routine 
recommended polling time: 	 (   1) minutes.
Extended self-test routine
recommended polling time: 	 ( 166) minutes.
Conveyance self-test routine
recommended polling time: 	 (   2) minutes.
SCT capabilities: 	       (0x3035)	SCT Status supported.
					SCT Feature Control supported.
					SCT Data Table supported.

SMART Attributes Data Structure revision number: 10
Vendor Specific SMART Attributes with Thresholds:
  1 Raw_Read_Error_Rate     0x000f   077   064   034    Pre-fail  Always       -       52199741
  3 Spin_Up_Time            0x0003   099   099   000    Pre-fail  Always       -       0
  4 Start_Stop_Count        0x0032   099   099   020    Old_age   Always       -       1674
  5 Reallocated_Sector_Ct   0x0033   100   100   036    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x000f   082   060   045    Pre-fail  Always       -       143856698
  9 Power_On_Hours          0x0032   098   098   000    Old_age   Always       -       2583 (157 12 0)
 10 Spin_Retry_Count        0x0013   100   100   097    Pre-fail  Always       -       0
 12 Power_Cycle_Count       0x0032   099   099   020    Old_age   Always       -       1043
184 End-to-End_Error        0x0032   100   100   099    Old_age   Always       -       0
187 Reported_Uncorrect      0x0032   100   100   000    Old_age   Always       -       0
188 Command_Timeout         0x0032   100   100   000    Old_age   Always       -       0
189 High_Fly_Writes         0x003a   100   100   000    Old_age   Always       -       0
190 Airflow_Temperature_Cel 0x0022   066   053   040    Old_age   Always       -       34 (Min/Max 25/34)
191 G-Sense_Error_Rate      0x0032   100   100   000    Old_age   Always       -       20
192 Power-Off_Retract_Count 0x0032   100   100   000    Old_age   Always       -       122
193 Load_Cycle_Count        0x0032   090   090   000    Old_age   Always       -       21557
194 Temperature_Celsius     0x0022   034   047   000    Old_age   Always       -       34 (0 15 0 0 0)
196 Reallocated_Event_Count 0x0032   100   100   000    Old_age   Always       -       0
197 Current_Pending_Sector  0x0012   100   100   000    Old_age   Always       -       0
198 Offline_Uncorrectable   0x0010   100   100   000    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    0x003e   200   200   000    Old_age   Always       -       0
240 Head_Flying_Hours       0x000f   098   098   030    Pre-fail  Always       -       2484 (70 236 0)
254 Free_Fall_Sensor        0x0032   100   100   000    Old_age   Always       -       0

SMART Error Log Version: 1
No Errors Logged

SMART Self-test log structure revision number 1
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Short offline       Completed without error       00%       818         -
# 2  Short offline       Completed without error       00%       667         -
# 3  Vendor (0x50)       Completed without error       00%       541         -
# 4  Short offline       Completed without error       00%       541         -
# 5  Vendor (0x50)       Aborted by host               90%       122         -
# 6  Short offline       Completed without error       00%       122         -

SMART Selective self-test log data structure revision number 1
    1        0        0  Not_testing
    2        0        0  Not_testing
    3        0        0  Not_testing
    4        0        0  Not_testing
    5        0        0  Not_testing
Selective self-test flags (0x0):
  After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.

Hi i am not sure at all but maybe you have a big log data info into your /run/log/journal/

Can you post the output of this 2 commands to see it:

journalctl --disk-usage

journalctl -b --unit systemd-journald


1 Like

There’s no journal folder in run/log. Second command gave me this:

-- Logs begin at Sat 2019-09-21 15:40:08 +0430, end at Mon 2019-09-23 15:38:20 +0330. --
Sep 23 13:38:10 alireza-pc systemd-journald[278]: Journal started
Sep 23 13:38:10 alireza-pc systemd-journald[278]: Runtime journal (/run/log/journal/dbb98ed82e4243a5bba90d395779af4c) is 8.0M, max 371.0M, 363.0M free.
Sep 23 13:38:25 alireza-pc systemd-journald[278]: Journal stopped
Sep 23 13:38:31 alireza-pc systemd-journald[902]: Journal started
Sep 23 13:38:31 alireza-pc systemd-journald[902]: Runtime journal (/run/log/journal/dbb98ed82e4243a5bba90d395779af4c) is 8.0M, max 371.0M, 363.0M free.
Sep 23 13:38:30 alireza-pc systemd[1]: systemd-journald.service: Succeeded.
Sep 23 13:38:31 alireza-pc systemd-journald[902]: Time spent on flushing to /var is 22.446697s for 1221 entries.
Sep 23 13:38:31 alireza-pc systemd-journald[902]: System journal (/var/log/journal/dbb98ed82e4243a5bba90d395779af4c) is 48.0M, max 4.0G, 3.9G free.

Files can’t be open with a text editor.

The size of the file is not big so i dont know why it take ~23 sec to write the lines into the logs files that are contained /var/log/journal /…/file.journal

I do not know if this is related to the use of an encrypted system file or if this affects.

I do not recommend mask the service. Maybe someone can find the solution or recommend whether to change the storage type of systemd-journal-flush.service through journal.conf can help.

(The rest of times are more or less right IMHO if you are using a HDD)


Well I know people who boot their systems in about 5 seconds. Same hardware. It shouldn’t be a problem with my hardware.

Can you see in the output of this command?

sudo cat /etc/crypttab

if you have something in the file like this:

cryptswap1 UID=XXXXXXXX /dev/urandom swap,offset=1024,cipher=aes-xts-plain64

in the line of cryptsawp1 does it be UID=XXXXX or it is showed like

cryptswap1 /swapfile /dev/urandom swap,offset=1024,cipher=aes-xts-plain64

It’s LUKS [something] UUID=[something] none discard

Lets wait for someone who knows more about it and see that they can provide, becouse that’s out of my reach.


Not sure about LUKS, but try to minimize the log size and check if there is some improvement
I also wrote something related to journal logs clean-up here https://robbinespu.github.io/eng/2018/09/03/Cleaning_journal_logs.html