Many people might have found this issue. Typically this is due to no power supply, bad cable connections, overheating when the computer shuts down by itself to cool down. First of all you need to check that the cables are properly connected or not. If the computer is very hot, check the fans. If it is a laptop, check whether your battery has deteriorated over time and may need to be replaced.