3

I'm trying to understand what causes screen tearing. Suppose that a monitor could update every single one of its pixels instantaneously. Then I imagine refreshes would work like this:

  1. A monitor decides its going to start a refresh
  2. It looks at whatever frame the GPU is currently sending it.
  3. It, atomically, updates all pixels instantaneously.

With this kind of procedure, it seems like it should be completely impossible to get screen tearing, ignoring refresh rates and FPS entirely. Only a single image is drawn at a given time.

Now I know this isn't how CRT monitors work with their scanning gun (or whatever it's called). But I was under the impression that newer monitor technologies didn't work like this. Do they actually update pixels gradually, and not at once?

2 Answers 2

2

Steps 2 & 3 assume that all frame data is transferred to the monitor in an immediate and atomic fashion, they are not. A "dumb" monitor never "sees" (or buffers) a full frame of video. Monitors still work on the same principles from when we used scanning electron beams to draw pictures. Snazzier TVs might buffer images and do inter-frame processing, but a computer monitor probably won't.

What the monitor sees is merely a data stream coming from your graphics card. There are all sorts of preliminary information sent to the monitor to tell it what format that data stream will be, so it gets details of timing information, number of horizontal lines, a number of vertical lines and colour format but what it actually gets is simply a long string of pixel colour data.

Your steps 2 & 3 actually occur in the graphics card, and step 3 will only "appear" to be the case if you enable vertical sync.

At any point in the video frame the GPU can decide to swap its video buffer to a new picture and carry on sending data from that point in the buffer. If vertical sync is not enabled then it will carry on sending the new buffer data to the monitor from the exact same point it left off in the old buffer. This is your "tear" point.

If you have vertical sync enabled then the GPU will wait for the full frame to be sent before it switches buffer in which case you will not see a "tear".

12
  • 1
    In fact, the reason that these sync technologies are called "Vertical Sync" is that each successive frame is written vertically across even the newest monitors. Mar 30, 2017 at 17:51
  • Admittedly the frame buffer order of "right to left, top to bottom" (send row, move to next column, send another row) is an easy switch to make to go to "top to bottom, right to left" (send column, move to next row, send column) given modern electronics, but vertical sync has always meant "wait for the top corner of the frame". Either way vertical sync is "start of frame" irrespective of how that frame is ordered.
    – Mokubai
    Mar 30, 2017 at 17:58
  • @music2myear In fact I would expect the "column then row" method only to really be noticed in mobile phones where you are, effectively, holding the screen in the wrong orientation i.e. in portrait mode. Once you hold the device in landscape mode (best for viewing videos) you are back to updating the screen in a row/column mode again.
    – Mokubai
    Mar 30, 2017 at 18:15
  • 1
    @alecb Yes, that pretty much sums up what is happening. The monitor has almost no ability to hold any data at all and so it just paints each pixel one after another as it is received.
    – Mokubai
    Mar 30, 2017 at 19:37
  • 1
    @alecb Essentially yes. Your current FullHD monitor has about 2 million pixels in three different colours meaning it needs to run through 6 million LCD adjustments per screen refresh. Doing that at 60 frames per second means 360 million pixel updates per second. This is actually a very large amount of data being thrown about and a lot of physical adjustments in the LCD just to show you a picture. Higher refresh rates mean more changes per second and higher resolutions mean more pixels. There is actually a lot going on just to show even a blank screen.
    – Mokubai
    Mar 30, 2017 at 21:54
0

Screen tearing is a visual artifact in video display where a display device shows information from multiple frames in a single screen draw. The artifact occurs when the video feed to the device is not in sync with the display's refresh rate.

Source: Wikipedia.

All monitors, LCD and CRT, refresh on a clock at a known and predictable time. Various technologies allow the graphics card to know this clock cycle so that the GPU can send data at the best time for the monitor to receive it and display the next screen's-worth of pixels.

This is typically called the refresh rate or on some TVs you'll see a Hz (that is cycles per second) number advertised. The most common these days is probably 60Hz, which means 60 cycles per second. Though 120Hz is become more common.

The various synchronization technologies mentioned above are generally used for the purpose of preventing screen tearing. They usually have limits as to how much they can resolve though.

8
  • This doesn't address my question. See the 3 step "ideal" process I mentioned in my post. If this is what happened, then I don't see how an out of sync refresh rate would cause screen tearing.
    – alecbz
    Mar 30, 2017 at 17:42
  • 1
    Then it is not clear what you are asking. Are you asking if LCD/LED screens flash an entire screen of pixels at the same instant rather than the progressive scan of a CRT? No, if you point a television video camera (which usually run at a slightly different frame rate at most LCD/LED screens you will see the same tearing/fanning, though usually to a less obvious extent that is further mitigated with higher-frequency screens, you see on CRTs. This should tell you that the pixels on an LCD/LED screen are still being written progressively across the screen in an orderly fashion. Mar 30, 2017 at 17:50
  • Ok, yeah, that's what I'm asking. How quickly does this generally happen? (like, time between first pixel changing to last pixel changing?)
    – alecbz
    Mar 30, 2017 at 18:02
  • @alecb it will happen at the same rate as the refresh rate of your monitor. for a monitor at 60Hz the refresh rate will be 1/60 = 0.0166 seconds, or every 16 milliseconds.
    – Mokubai
    Mar 30, 2017 at 18:17
  • 1
    This assumes that as soon as the scan finishes bottom-right it begins immediately back up at upper-left. Do we know this is the case? Mar 30, 2017 at 18:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .