Random screen glitches with 2 monitors

Emkem

Commendable
Apr 2, 2016
1
0
1,510
I currently use one monitor but i have a second one. My main monitor(the one i use now) is connected via HDMI but when i connect my second monitor via DVI my main monitor randomly glitches out(horizontal lines) and the only way to get rid of that is to restart my PC. This can happen once a week, every day or sometimes more than once a day, completely random. After a month of that problem i disconnected my second monitor and it hasn't happened since.

I have a XFX radeon HD 7870 DD