Subject: Re: bug#21658: 24.5; Scrolling garbles text with third monitor enabled

From: Eli Zaretskii <[email-masked]>
Date: Sat, 10 Oct 2015 10:36:32 +0300

> Date: Fri, 9 Oct 2015 18:31:14 -0000 (GMT)
> From: [email-masked]
> 
> When I scroll a buffer with the mouse in GTK3, GTK2, or lucid emacs, the
> buffer does not properly redraw, causing garbled text.  With the mouse
> scroll, it usually appears like the text is not moving (even though the
> point is actually moving).  If I scroll with keyboard controls, the
> buffer partially redraws, usually in a ~32 character square with the
> point at the upper left.  The screen will redraw correctly if (1) Emacs
> loses focus or (2) I recenter the buffer with C-l.
> 
> This only happens when my third monitor is enabled, however.  On my
> system, I have two monitors attached to the onboard Intel GPU, and one
> additional attached to an AMD GPU card.  It makes no difference what
> monitor emacs is on, but enabling the monitor on the AMD GPU causes
> emacs to behave as described.  Disabling the monitor (via xrandr)
> immediately fixes the problem.
> 
> I do not observe this problem with any other software on my system, only
> emacs.

Are the problematic frames/windows displayed on the 3rd monitor?

Do the coordinates of the frames on the 1st and the 2nd monitor change
when you enable the 3rd monitor?

If the answer to both of these questions is NO, then I cannot see how
it could be an Emacs problem.  It could be some hardware problem or
perhaps a bug in the underlying X libraries/server.  AFAIK, when Emacs
redraws a window on a monitor, it doesn't inquire the system about the
monitors, the only thing it cares about is pixel coordinates of
windows and frames.