Screen goes black/blank every 7 to 10 mins

Mar 29, 2018
10
0
10
While playing game or surfing or even coding on a C++ compiler just after 7 to 10 mins of booting the PC screen goes blank for a second and comes back to normal and while playing any game or coding in compiler once the screen goes blank the game or the compiler freezes and the only option is hard reset/reboot.
I thought it was a display problem but the same happened on other monitor too.
PC specs:
CPU- Pentium g2020 2.9ghz
Motherboard - gigabyte H61M-S1
RAM - 6gb ddr3 1300mhz
GPU - gt 1030 2gb ddr5 (connect to monitor via hdmi to vga cable)
PSU - Intex techno smps 20+4pin (220w I guess...)
HDD - WD 1tb (recently bought)

It is too annoying can't even do anything everything freezes whether I play a game or code except the internet surfing. Any solution for this?