Friday 15 February 2019

Fruity Tips #3 - Got a Slow Boot Problem On A MacBook Pro?

My love affair with my new refurbished 2017 15" MBP was on the verge of needing a trip to Relate recently. Whilst it has been a brilliant performer and has easily coped with everything I've thrown at it over the past three months, it has had something of a teenage strop in the last few weeks. It has been taking ages to reboot and be ready for me to start to do any actual work.




I'm used to Windows machines taking an age between powering them up and being able to do anything productive - that was the primary motive for me making the move to a Mac. And I've never had any problems with MacBook Airs or iMacs in respect of boot time. Even the latest addition to the Apple Harvest was fine until a few weeks back. And then it suddenly started taking an age to reboot. I'd get the Apple logo and progress bar which would get to about 60-70% and then hang. I'd power down and re-power and the same thing would happen.

I hate it when this kind of problem occurs because you usually know it's going to take a lot of sleuthing and pain to find the root cause. And it's almost certainly going to take a lot of time and patience (and as I get older, patience is sometimes in short supply).

I started off with all the usual experiments:

  • Reboot in Safe Mode - the outcome was even worse. I nearly wore out my fingertips waiting for the logo to appear
  • Reset SMC - no change
  • Reset PRAM - no change
  • Reboot into recovery - result!
Once in recovery, I could at least test the SSD using disk utility and this showed there were no problems (but indicated there were 9 APFS snapshots, each of which took an age to verify). In addition, with access to the Terminal app, I also set the boot arguments to automatically start up in Safe mode and with verbose output. I started the laptop and retired to a safe distance rather than sitting there watching it and being tempted to interfere. I returned after about an hour and the MBP was indeed booted into Safe mode. Phew! I becoming was less concerned that this was a hardware issue and more of a software or configuration problem. I reset the boot argument and started again.

A reboot into Safe mode is sometimes all that is needed to fix a teething problem, but not so in this case. When I restarted in normal mode I still had the same problem. This time I left the laptop to its own devices and it took over twenty minutes to get to the login screen. In theory,  I could have things as they were. I generally keep my MacBook powered on, just putting it to sleep every night and waking it up every morning using a schedule set up in Power Manager. I only switch off the machine on a Saturday night, again, using an automated schedule which then wakes it early on Sunday morning. Since the machine is set to switch on before I wake up, I wouldn't see how long it takes to boot! Out of sight, out of mind, so to speak. 

But I already knew it was a problem, so I needed to resolve it. It's just the way I am, and who knows, it could be hiding a bigger problem just waiting to happen. Next step was to reinstall Mojave. I have a USB installation drive for such contingencies, so I booted that up (it booted almost instantly) and ran the installation. 

Still no improvement on the boot time. But since the USB drive boot was quick, it was becoming clearer that this was now either a problem with the SSD, which I deemed unlikely or it was a third party software configuration issue.

I started searching for similar reports of poor boot times and was kind of relieved to find I was far from alone. A boot time of twenty minutes was far from uncommon. One particular discussion on the Apple support forum ran to twenty-three pages (with no obvious resolution). One area that caught my attention was that the APFS snapshots could have been responsible and I went back to verbose mode to see if this was a problem but it turned out to be a red-herring.

Eventually, I happened upon a discussion about Little Snitch and some people reporting that they had isolated their boot time problems to a specific set of releases of Little Snitch. A support query on their web page concerning this problem runs to 7 pages. Since I was into my second weekend of trying to isolate the problem, I was willing to give anything a go, so I disabled Little Snitch and rebooted. Wham, bam and thank you, mam. I got back to the kind of boot time I was expecting, around 20-30 seconds (I have quite a lot of stuff that gets loaded at boot time). 

To try and prove the point and verify that this was the problem I re-enabled Little Snitch and went back to a twenty-minute reboot. A few days later,  Objective Development who own Litte Snitch released a new version which resolved the problem - a problem that Objective Development say they've been unable to recreate, which I find extraordinary. Nonetheless, Little Snitch 4.3 Build 5256 appears to have fixed the problem...For now at least! 


And it was just in time for Valentine's Day - so the machine and I could continue the love affair and no machines got massacred during the writing of this blog post!










1 comment: