Five Pounds of Flax

Every culture has a burrito.

Fixing "tearing" and slow or jerky video on Mac OS X

Friday, March 31, 2006posted by Michael Rothwell @ 9:41 PM

I have a 17" Powerbook and a 24" Dell flat-panel display. Tiger (10.4) includes a feature called "beam sync" which tries to defer screen updates so that they are synchronized with the monitor refresh rate. Essentially, beam sync limits the "frames per second" of the display to whatever your monitor can really support. This feature seems to make more sense for CRTs than for all-digital displays like LCDs.

When I used only the Powerbook's internal display, and then connected the Dell external display via DVI, the video on the Dell exhibited jerky and slow(er) updates (especially with Expose) and some "tearing", by which I mean that moving a window around the screen seemed to cause the window to "drift" in the direction of the movement, with the top leading the bottom. It's like the window was skewed while it was in motion. This behavior, I'm guessing, is caused by the difference in "refresh rates" between the internal display and the Dell; the Mac was attempting to use the rate for the internal display with the Dell, and not having a lot of success. Rebooting always fixed the problem, presumably because the Mac re-probed the display and thereafter used the correct refresh rate.

I discovered another way to fix the problem, however, that doesn't require a reboot: using Quartz Debug to disable beam sync. Unfortunately, quitting Quartz Debug re-enables beam sync and the problem immediately re-surfaces. There's no switch to flip in any preference pane to disable beam sync for good, but there is a command that can be run from Terminal that makes the setting sticky. Type it all on one line, or copy/paste it from here into Terminal:

sudo defaults write /Library/Preferences/ Compositor -dict deferredUpdates 0

Running that command fixed the video problem permanently. I should write a mini prefpane to do that...

UPDATE: My new Macbook Pro doesn't seem to have this issue. I also do not have DisplayConfigX installed on it, which may or may not be a contributing factor.