Blinking row of pixels on macbook screen when external monitor connected

I have an ASUS XG35V, a fairly wide monitor. When I connect it and mirror the displays, the display on the macbook is letterboxed, as expected. However, there is a row of pixels in the letterbox below the image of the screen that blinks at the same rate as the cursor. It also flickers when I move my mouse. Sometimes there is a row of pixels above the image as well.

https://www.youtube.com/watch?v=ELz0u5U0ONQ

How do I get rid of it?

Blinking row of pixels on macbook screen when external monitor connected
 
 
Q