Tech Tip: How to Run and Interpret Your Mac’s Built-In Diagnostic Routines

200px-sad_macMacs are usually quite hardy, providing service for years without a problem. However, when they start running slowly, crashing, or refusing to boot up, it’s time to figure out what’s going on. You can easily troubleshoot your Mac to see whether the problem is hardware related, and to do that, there’s no better way than using the tools built right into your Mac. When you go to an Apple Store for troubleshooting, chances are good that the staff will run one of these tools — Apple Diagnostics or Apple Hardware Test — to figure out what’s wrong, so you can save yourself a bit of time by diagnosing the problem ahead of your appointment and then letting the staff know what’s wrong.

Related: Using macOS Sierra Disk Utility to Verify or Repair Disks

Back in the early days of Macs, a diagnostics code would be displayed on the Mac startup screen under a “Sad Mac” icon (see image at top of this post), and later that was replaced by what we commonly referred to as the “Chimes of Death”, audible indications that all was not well with your Mac. The video below demonstrates most startup tones, as well as the increasingly crazy Chimes of Death:

Thus ends your Mac history lesson for today. Let’s take a look at what we can use to diagnose issues with much newer Macs. Apple Diagnostics works only on Macs introduced since June 2013, while Apple Hardware Test is used for older Macs. Today, we’ll look at both tools.

Apple Diagnostics
Start off by disconnecting all external devices except the keyboard, mouse, display (if separate) and Ethernet adapter (if connected to the Internet via Ethernet). If you have an external optical drive (CD/DVD), be sure to disconnect it as well. If you use a Bluetooth keyboard, mouse, and/or trackpad, I recommend temporarily using a USB mouse and keyboard. The current Apple Magic Keyboard 2 and Magic Trackpad 2 use internal rechargeable batteries and a Lightning cable for recharging, and they can also be “connected” via Lightning during the tests, so I suggest plugging them both in if you have them. Note that a mouse or trackpad is not necessary, as keyboard shortcuts are available for all actions.

Make sure that you have a working Internet connection before you run Apple Diagnostics. Apple Diagnostics will use that connection to recommend support resources, and your Mac will also use an Internet-based version of the tool if it can’t find one on the internal startup volume. If you’re using a MacBook of any sort, make sure it’s plugged into an AC outlet using the AC power adapter, and also make sure that the device is on a hard and stable work surface that will allow for air circulation under and around the computer.

With those important things out of the way, let’s run Apple Diagnostics:

1) If your Mac is currently turned on, shut it off by selecting Shut Down from the Apple menu.

2) Now press the power button to turn on your Mac.

3) Immediately press and hold the D key on your keyboard until Apple Diagnostics begins.

checking_mac

4) If you’ve selected a default language for your Mac, a “Checking your Mac” screen appears in that language (see image above). Otherwise, a language selection menu appears. Select a language, then press the Return or Enter key to launch Apple Diagnostics.

5) Wait. It’s going to take Apple Diagnostics about 2 to 3 minutes to run all of the tests. A progress bar appears on the screen to estimate the remaining time. All Macs except the 12-inch Retina MacBook have a built-in fan, and at one point you’ll hear that fan kick in as a test to make sure that cooling is working properly.

diagnostics_issues

6) Check the screen. Once the tests are done you’ll either see a diagnostic code along with a “No issues found” message, or a code that indicates what the possible problem is along with links to more information (see image above).

Now, don’t worry — you won’t have to try to make sense out of the diagnostics codes. Apple has a web page that lists all possible diagnostic codes, and it’s easy to match the code with what’s listed to see what problem you might be experiencing. To get more information about how to possibly resolve the problem, type “Command-G” to Get Started in resolving your issue. This may try to connect you to the Internet if you’re not already connected, so be aware of that possibility.

Earlier I mentioned some other keyboard shortcuts that are useful when running Apple Diagnostics. They are:

  • Option-D to start Apple Diagnostics over the Internet
  • Command-L to select a language other than the one displayed
  • Command-R to run Apple Diagnostics tests again
  • S to Shut Down
  • R to Restart

Apple Hardware Test
For older Intel-based Macs — those made before June 2013 — Apple Hardware Test is the built-in diagnostics suite. It looks quite dated, actually — if you’re familiar with the old pre-OS X Macs, the fonts and graphics used look like they’re from the 1990s! As with the Apple Diagnostics, be sure to disconnect all external devices with the exception of the keyboard, mouse or trackpad, display and Ethernet adapter. If you have an external optical drive (CD/DVD) attached, unhook it as well. For Mac laptop owners, connect to AC power and put your device on a hard, flat work surface that will let air circulate around and below it.

Now let’s run Apple Hardware Test:

1) If your Mac is currently turned on, shut it off by selecting Shut Down from the Apple menu.

2) Press the power button to turn your Mac back on.

hardware_test3) Immediately press and hold the D key. Apple Hardware Test needs to start up and inspect your hardware configuration. For Macs with a built-in screen (iMac or laptops), a rather quaint 8-bit icon shows up on the screen (see image at right). If there’s not a built-in disk volume containing the Mac recovery partition, Apple Hardware Test displays a rotating Earth icon while it attempts to invoke Internet Recovery.

4) When the initial startup is complete, select a language and then click the right arrow. Don’t have a mouse attached? Use the up and down arrows to select a language, then press the Return (Enter) key.

5) The Apple Hardware Test console appears. To run all of the basic tests, just click the Test button (if you have a mouse attached), press the “T” key (note that while using a non-Apple keyboard I had to press the Windows “command” key + T), or the Return key. You can run a much more thorough test by looping the tests for a long period of time. To do so, click the “Loop tests” checkbox, then select a number of times to repeat the test or an hour/minute combination.

6) Once the tests have been run, you can scroll up and down the list with your mouse or up/down arrow keys to see how things went. If an error code is listed, be sure to note it (you’ll most likely have to write it down with a pen or pencil) so you can supply the information to Apple or an Apple Authorized Service Provider.

Unlike Apple Diagnostics, Apple Hardware Test doesn’t provide a cross-referenced list of error codes that you can use to figure out what exactly is wrong with your Mac. However, Apple Hardware Test is much more thorough and verbose than Apple Diagnostics. It’s going to take a lot longer to run the battery of tests — for example, just the hard drive test can take one to four hours…per drive! The Mac mini server being tested for the purpose of this article is still running after four hours. Any failures that are reported during testing appear in the log, and it’s possible to stop the test and any time by clicking on the Stop Test button or pressing “T” again.

Conclusion
The Apple Diagnostics or Apple Hardware Test can be useful tools if your Mac isn’t acting right and you aren’t close to an Apple Store or Authorized Service Provider. Should you find that RAM or storage is causing your problems, you may want to fix those issues yourself by either replacing all non-soldered RAM with new memory from MacSales.com or a new internal drive.


LEAVE A COMMENT


  • The article contained excellent and useful information which I am certain will be used in future on my MAC. Thank. you for educating and sharing.




  • My old iMac 2009 is working fine with the exception of the fan running endlessly at times. I have not been able to find the cause. Now with your article about Hardware Test I am happy to try to find an error. The d key does not engage nor d with option key. The internet doesn’t produce a rotating earth either. Any other possibilities? No SSD drive.




  • I believe you have an omission here. In older MacBook Pros, like my mid 2010, you must insert CD / DVD originally supplied with the unit , before powering up. W/O the DVD the unit does not find the diagnostics test




  • I have tried numerous times to get the hardware test to start on my 2010 MacBook without success. I have held done the “d” key after shutting down and hearing the “gong.” Is it not working because I have a SSD in the MacBook or because I am running macOS Sierra?




    • Hi, Michael –

      The diagnostics still work under macOS Sierra, but it could be that if the SSD was installed as an aftermarket upgrade, the files that the Mac looks for to run the built-in diagnostics are not on that drive. In this case, force the Mac to attempt to load the diagnostics from the Internet by using “Option-D” instead of just the “D” key. It may ask you to select a Wi-Fi network and enter its password, then it will download and run the diagnostics. Please let me know if this works; if not, we can try some other ideas.

      Steve




  • I’ve been attempting to fix a boot up problem where after the Apple logo/ progress bar screen, a grey screen appears and bootup hangs. There is no error message and computer does not respond to keyboard or mouse. I’ve attempted safe boots, resetting SMC and PRAM, removed all peripherals, reinstalled system with formatted HD. None of these work. This is on a 2010 – 2012 6 core Mac Pro. The computer will start up successfully with one HD which was from my previous Mac Pro, 2009 vintage. I recently purchased it from OWC.




  • Start-up D works fine, thanks for that
    Would love to get a full list of Command options like this.
    Thanks again




  • By the D key, do you mean the letter D and if so upper or lower or do you mean the Delete key?
    THANKS!
    Stan




    • Just ‘d’ yes it would be lower case because you are not pressing ‘shift’. definitly not the ‘Delete’ key. Just hold down the D (only) once you hear the ‘gong’




  • Great article. Thanks. I would also try to backup and rebuild directory with DiskWarrior, just in case.