Irenaeus.: That is most definitely a hardware problem, something is either overheating (more likely) or not getting enough power. Check your CPU temperature in the BIOS after the computer has shutdown, and also the graphics card temperature too. You can check which bit of hardware is the problem by doing a burn-test.
I don't know how to do that test but I know which device is the problem. The graphics card will stop receiving power after a few minutes for some reason. Luckily, my warrenty for my computer lasts for one more month. I will be contacting them today.