This kind of question probably belongs on a dedicated tech support forum; but I have a desktop computer I've used for gaming for a couple years (I got it on craigslist for a good deal). The computer is an HP Pavillion HPE. I mostly used it for less intensive games (Minecraft, Undertale) but I've played some more intensive simulation stuff (Children of a Dead Earth, KSP, Space Engineers).

I think I first encountered this problem while running KSP; the monitor would lost connection and went to sleep, though the computer would continue to run. I checked the monitor connection, tried using a different monitor and cable, and it made no difference. I tried updating my graphics driver to see if it would help run some of the more intensive games. I even tried moving the computer next to an AC vent in case overheating was the problem. The problem persisted; 10-15 mins after running any game (even vanilla minecraft) the computer loses connection to the monitor.

The computer ran fine on these more intensive games for months. The problem arose the first time I moved the computer up to my room. So far as I know everything is connected correctly, and the computer was not mishandled during the move.