Question Could this be a monitor problem or GPU problem?

Apr 27, 2019
My monitor flickers multiple times everyday and sometimes it's really annoying, i'll be either watching a youtube video or playing a game and my monitor will just go black for 10 seconds, turn back on for about 5, then turn off for another 10 seconds, this will happen for about 2 minutes straight then wont happen again for another hour or so, but sometimes my monitor will just completely shut off and then i will get a screen saying "out of range" then i have to restart my pc to get the monitor back to normal, when the monitor completely shuts off the gpu will still be running just fine, there will just be no display at all and unplugging the hdmi then plugging it back in doesnt fix it. I don't know if this is a monitor problem though because ive tried using this monitor on a system with 1920x1080 60hz integrated graphics, and the screen doesnt turn off or flicker at all, ive tried uninstalling my gpu drivers completely and doing a fresh install, and switching to 1080p 60hz and even 720p 60hz and the problem will still happen, ive even bought a new hdmi cord thinking that was the issue but it isnt. my monitor doesnt have any drivers online either so im assuming it doesnt need any sort of drivers to be installed.
Monitor - MSI Optix MAG24C
GPU - Gigabyte GTX 1050ti low profile edition


as for which is bad only testing can answer. have a laptop or another PC to drive the monitor for the day? does your computer have an onboard GPU? you could remove the 1050 and use it to test if the monitor is the issue or try it in a different PC if the monitor is the issue the problem will follow the monitor no matter which PS its connected to.