How MacBook owners can check for hardware faults with Apple Diagnostics
Apple offers a built-in diagnostic tool that lets MacBook users test whether device problems stem from hardware. The tool runs during startup rather than being found in system settings.

When a MacBook unexpectedly shuts down, shows display glitches or stops recognizing its keyboard, it can be hard to tell whether hardware or software is to blame. Apple Diagnostics is designed to help by testing the machine's internal components. Despite its name, it isn't hidden inside system settings — it's accessed during startup.
Before running it, users need to know whether their MacBook has Apple silicon (shown as "Chip" with an M-series name in About This Mac) or an Intel processor, since the startup sequence to launch diagnostics differs between the two.
Running the test
Apple recommends installing available macOS updates first, then shutting down the machine and disconnecting external accessories, keeping only essentials like power or an Ethernet cable. On Apple silicon MacBooks, users hold the power button until startup options appear, then hold Command and D until diagnostics begins. On Intel MacBooks, holding D immediately after power-on starts the process.
Starting with macOS 26 Tahoe, users can select specific component tests, such as for the display or keyboard, while earlier macOS versions run the test automatically.
What it can and can't detect
Apple Diagnostics checks components including memory, battery, camera, keyboard, trackpad, storage, display and wireless hardware, returning specific reference codes. However, it doesn't test external accessories and isn't built to catch software-related issues. A clean result, coded ADP000, means no hardware fault was found — it doesn't rule out a software or accessory-related cause.
If the test comes back clean but problems persist, macOS Recovery offers further options, including repairing the startup disk, reinstalling macOS or restoring from a Time Machine backup.

