Slow boot time

Raspberry Pi OS/Software discussion (beyond RetroPie-specific issues)
Post Reply
codeman0624
Posts: 106
Joined: Wed Nov 23, 2016 10:19 am
Has thanked: 3 times
Been thanked: 73 times

Slow boot time

Post by codeman0624 » Fri Jun 29, 2018 5:32 am

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?

User avatar
tinkerBOY
Posts: 634
Joined: Tue May 30, 2017 4:00 am
Has thanked: 265 times
Been thanked: 178 times

Re: Slow boot time

Post by tinkerBOY » Fri Jul 06, 2018 8:05 pm

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.
Game Boy Zero Controllers available @ tinkerBOY.xyz
tinkerBOY Controller v3.0 - built-in usb controller, usb audio, and usb hub
tinkerBOY Controller v2.0 - GPIO buttons and builtin PWM Audio and Amplifier
tinkerBOY Controller v1.1 - simple pcb button
* DPI Adapter - better display for GBZ
* keyboard converters - IBM XT/AT Soarer's Converter | ADB to USB Converter

satri360
Posts: 43
Joined: Wed Mar 22, 2017 12:59 am
Has thanked: 9 times
Been thanked: 54 times

Re: Slow boot time

Post by satri360 » Fri Nov 02, 2018 11:24 pm

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

satri360
Posts: 43
Joined: Wed Mar 22, 2017 12:59 am
Has thanked: 9 times
Been thanked: 54 times

Re: Slow boot time

Post by satri360 » Sat Nov 03, 2018 12:10 am

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.

Mikawal
Posts: 8
Joined: Fri May 03, 2019 8:17 am
Location: Malawi
Contact:

Slow boot time

Post by Mikawal » Fri May 17, 2019 6:20 am

Do you still get slow boot with your USB device unplugged? I occasionally get a stall like that when my USB wifi dongle isnt recognised instantly.
That firmware is in the package firmware-atheros from the non-free repo. Do you have it installed?

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest