Have you run the HP diagnostic software from the BIOS? This could point out unsuspected problems in other areas such as RAM, etc.
Power on your PC, press Esc, then F2 at the prompt. Choose System Tests (Fast Test performs a 4 minute hardware check).
Unless you have severe heat problems on your system it is very unlikely, but possible of course, that your CPU/Graphics is defectuive. What temperatures are the components operating at? HW Monitor is a good app for temperature, fans, etc:
Before replacing your CPU try the following:
Update all drivers from HP web site, if you haven’t already done this. Chipset drivers are very important as they link all main hardware components together:
If that doesn’t do the trick then perhaps corruption is the problem
To completely, cleanly unistall graphics drivers try something like DDU (Display Driver Uninstaller:
99% of the time this has fixed the problem for me. Graphics driver can be a tough problem.
Once that is all done install the graphics drive from the HP web site.
This program is a good general driver updater:
There are other possible lines of investigation so let us know how it goes. I’ve only had 1 graphics card (and was because of carelessness on my part) and zero CPU’s die in 35 years of hardware troubleshooting.