If you suspect your Mac has a hardware problem, use its built-in diagnostics to check. Shut it down and disconnect everything except power, mouse, keyboard, display and network. Power on and hold
D till you see a language selection screen. Apple Diagnostics takes a few minutes to test for issues. See ‘Learn more’ at bit.ly/appldiag for extra tips.