Page 1 of 1

Slow boot time

Posted: Fri Jun 29, 2018 5:32 am
by codeman0624
I've upgraded to Retropie 4.4, which is now running on Raspbian Stretch, but the boot time is now way too long. I ran the systemd-analyze blame command and got these as the top issues for the long boot time, but I don't know what they mean or how to fix it? I feel like it has happened on multiple SD cards at this point, but I need to re-confirm that.

42.792s dev-mmcblk0p2.device
38.790s systemd-fsck-root.service
10.266s apt-daily.service
9.245s dhcpcd.service
8.935s apt-daily-upgrade.service

Does anyone know what these issues mean, and how to fix them to make the boot time faster?

Re: Slow boot time

Posted: Fri Jul 06, 2018 8:05 pm
by tinkerBOY
I tested both fresh install of RetroPie 4.4 and 4.3 and 4.4 is noticeably slower. I tried updating it but still the same.

Re: Slow boot time

Posted: Fri Nov 02, 2018 11:24 pm
by satri360
I had the same issue on RetroPie 4.4 on Zero W. You might have already figured it out but I found the workaround in the forum. It appears that fsck runs on every boot and that would take 30s or more. I just update the packages to the latest then fsck stopped running on each boot. Not sure what part of the patch addressed the issue though.

RetroPie stock kernel : 4.14.30+

Code: Select all

$ uname -a
Linux retropie 4.14.30+ #1102 Mon Mar 26 16:20:05 BST 2018 armv6l GNU/Linux
$ systemd-analyze 
Startup finished in 1.609s (kernel) + 59.292s (userspace) = 1min 901ms
Latest kernel as of this writing : 4.14.71+

Code: Select all

$ sudo apt-get update; sudo apt-get -y dist-upgrade; sudo reboot
$ uname -a
Linux retropie 4.14.71+ #1145 Fri Sep 21 15:06:38 BST 2018 armv6l GNU/Linux
$ systemd-analyze 
Startup finished in 1.532s (kernel) + 28.689s (userspace) = 30.222s

Re: Slow boot time

Posted: Sat Nov 03, 2018 12:10 am
by satri360
Actually I only needed to install this package to stop the fsck on every boot. No kernel update was required.

Code: Select all

sudo apt-get install fake-hwclock
I can see that system adjust the time in the log.

Code: Select all

$ sudo journalctl -xb | grep -E "fsck|clock"
Nov 03 06:02:43 retropie kernel: Kernel command line: 8250.nr_uarts=0 bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=416 bcm2708_fb.fbswap=1 smsc95xx.macaddr=B8:27:EB:BF:0D:14 vc_mem.mem_base=0x1ec00000 vc_mem.mem_size=0x20000000  dwc_otg.lpm_enable=0 console=ttyS0,115200 console=tty1 root=PARTUUID=14a75fe9-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait loglevel=3 consoleblank=0 plymouth.enable=0
Nov 03 06:02:43 retropie kernel: sched_clock: 32 bits at 1000kHz, resolution 1000ns, wraps every 2147483647500ns
Nov 03 06:02:43 retropie kernel: clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1911260446275 ns
Nov 03 06:02:43 retropie kernel: clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
Nov 03 06:02:43 retropie kernel: clocksource: Switched to clocksource timer
Nov 03 06:02:44 retropie systemd[1]: System time before build time, advancing clock.