Use Apple Diagnostics to test your Mac
If you think your Mac might have a hardware issue, you can use Apple Diagnostics to help determine which hardware component might be at fault.
Prepare your Mac
If you can install the latest macOS updates, do so before continuing.
Shut down your Mac. If you can't shut it down normally, press and hold its power button for up to 10 seconds, until your Mac turns off. (Every Mac has a power button. On laptop computers that have Touch ID, press and hold the Touch ID button.)
Disconnect all external devices except keyboard, mouse, display, Ethernet connection (if applicable), and connection to AC power.
Make sure that your Mac is on a hard, flat, stable surface with good ventilation.
Start Apple Diagnostics
Determine whether you're using a Mac with Apple silicon, then follow the appropriate steps:
Apple silicon
Press and hold the power button on your Mac. (On laptop computers that have Touch ID, press and hold Touch ID.)
As you continue to hold the power button, your Mac turns on and loads startup options. When you see Options, release the power button.
Press and hold Command (⌘)-D on your keyboard until your Mac restarts.
Intel processor
Turn on your Mac, then immediately press and hold the D key on your keyboard as your Mac starts up. If using the D key doesn't work, press and hold Option (⌥)-D at startup instead. If neither method works, review the guidelines for using key combinations at startup.
Release the key when you see a progress bar or you're asked to choose a language.
Run Apple Diagnostics
Follow the onscreen instructions, which vary based on your Mac, the version of macOS that it’s using, and whether certain parts of your Mac have been repaired or replaced.
As you follow the onscreen instructions:
If your Mac isn’t already connected to the internet, you’re asked to choose a Wi-Fi network, or you can use an Ethernet cable to connect to your network.
If asked to review terms and conditions, you might be given the option to run diagnostics offline. In that case, click Run Offline, unless Apple Support or a repair technician has initiated an online Apple Diagnostics session for this Mac.
In macOS Tahoe 26 and later, you’re asked to choose a specific diagnostic to run, such as a diagnostic for your built-in display, keyboard, or trackpad. In earlier versions of macOS, this is automatic.
View Apple Diagnostics test results
When testing is complete, Apple Diagnostics shows the results. If you see one or more reference codes and need more explanation, refer to the list of Apple Diagnostics reference codes.
If you can't use this information to resolve the issue, contact Apple or take your Mac to an Apple Authorized Service Provider (AASP), Apple Store, or an Independent Repair Provider. Genuine Apple parts are also available for out-of-warranty repairs through Self Service Repair.*
* Independent Repair Providers have access to genuine Apple parts, tools, training, service guides, diagnostics, and resources. Repairs by Independent Repair Providers are not covered by Apple's warranty or AppleCare plans, but might be covered by the provider's own repair warranty. Self Service Repair provides access to genuine Apple parts, tools, and repair manuals so that customers experienced with the complexities of repairing electronic devices can perform their own out-of-warranty repair. Self Service Repair is currently available in certain countries or regions for specific models of Mac computers introduced in 2020 or later. To view repair manuals and order parts for eligible models, go to the Self Service Repair page.