Question No display on both monitors after 20-30 mins of gaming


Feb 3, 2018
Hi, my pc has been working perfectly fine since idk 7-8 months or so.

My specs are:

Intel(R) Core(TM) i5-3470 CPU @ 3.20GHz 3.20 GHz
16.0 GB RAM
idk what motherboard cause it's an HP prebuilt (HP Compaq Elite 8300 Convertible Microtower)
Gigabyte NVIDIA GeForce GTX 1050Ti 4GB
2tb Seagate Barracuda HDD
128Gb Samsung 840 EVO SSD

The problem that I'm facing for the past two days is that my pc works completely fine while browsing or not gaming.
Yesterday i let it run MSI Kombuster And Cpu Stress for about 45mins and it worked completely fine no problems whatsoever,
but when I try to game, like any game take for e.g Among us, CSGO, Rocket League, or Gta V, after 20-30 mins, both of my monitors go black and lose display signal while the rest of the system is working fine in the background as I can hear my friends on discord and Spotify running in the background. Then I have to restart the system by holding the power button for about 10 secs and then it boots up again and works fine till I play a game and the same loss of display signal on both monitors while gaming for 30-40 smth mins. idk if the problem is with the CPU, GPU, or smth else, please help me diagnose the problem.

Thank You Very Much!