Hi
First:- Turn off the computer, press and hold the PWR button for 4 seconds.
Then - Leave only keyboard and mouse connected, disconnect all externally connected
devices such as Docking Station, USB storage devices, displays, and printers.
Unplug the AC adapter from the computer.
Next - Press and Hold the Power button for 15 seconds to Hard Reset.
Rinse and Repeat; Re-Connect the AC adapter.
NOW begin checking/testing/proving the Hardware is fit for purpose.
Power on your PC, press ESC (repeatedly), then F2 at the prompt.
Choose System Tests (Fast Test does a 4 minute hardware check).
https://support.hp.com/us-en/document/bph07107
Power button LED blinks 5 times with 5 beeps
Memory
Reseat memory DIMM modules. If the problem is not resolved, contact support to resolve a possible RAM or Main-Board failure.
####
LED blinks 5 times
Main-Board
General Main-Board failure.
Test the Main-Board with the minimum hardware and reseat all the connections.
If the error persists, replace the Main-Board.