Have you tried rebooting?

[Tweet : nvALT]

Last week I started having issues on High Sierra that I couldn’t resolve. Hours spent in Activity Monitor, Console, and surfing StackExchange sites led me to no further clues. The primary issue was increasingly frequent hang times, which led to horrible Skype calls, long waits in photo editing apps, and a general inability to use my MacBook Pro.

For interested nerds, the problem included almost every app recording a spindump daily by the end. Spotlight results were missing more and more often, and the mds process was working overtime and not getting anywhere. Then a ton of mdworker(28822) deny(1) system-fsctl 4a0e type messages in Console.

I cleaned up the drive, repaired the disk, cleared the caches, killed background processes, and yes, I tried rebooting. The problem persisted even when logging into a guest account. I found the solution (though not a solid explanation) in an old forum thread about a similar issue back on 10.8: Reboot into Safe Mode and then reboot normally. It’s been fine for a week now.

To execute the “safe mode” fix:

  1. Shut down the computer
  2. Hold down the Shift key as you press the power button
  3. Keep holding the shift key until after you hear the chime
  4. Wait for macOS to boot
  5. Shut down and start again without the Shift key

Step 4 (wait for macOS) can take a while. In my case it ran a bunch of disk and filesystem checks. If you want to see more of what it’s doing, make sure to boot in verbose mode. This is usually done by holding ⌘V while booting, but I’m not sure that works if you’re also holding Shift. I always boot in Verbose mode, which you can turn on from Terminal with:

sudo nvram boot-args="-v"

And turn off with:

sudo nvram boot-args=

(It can also be enabled with tools like TinkerTool.) You’ll see a boot sequence that will look familiar to any Linux users, and while a lot of the messages are hard to decipher, you’ll at least know what parts are taking time.

I’m told that this process invalidates caches that normally persist on reboot. This is actually really useful information as I’ve had issues with font caches and preference caches that I just couldn’t seem to clear out before. This may be my new “ctrl-alt-delete” tip for problems I don’t recognize…

Quick tips are random posts regarding something I discovered on my way to something bigger. They usually get longer than “quick” would imply, for which I refuse to apologize.