MBP 5.1 Display problem that I've not seen reported before?

Discussion in 'MacBook Pro' started by TimsMBP, Apr 5, 2010.

  1. TimsMBP macrumors newbie

    Apr 5, 2010
    Dear forum-ers, I've been seeing an odd disturbance on my MBP's screen which I've not seen reported by anyone else (yet)! I've got a late 2008 MBP 2.4Ghz upgraded to 4Gb memory which I bought in Jan '09. I'd posted on the Apple discussion forums some while ago but I've had no joy there so here's a summary of the relevant posts. I'd be really grateful for any advice people may have.


    The issue I have is that, although under all other conditions it performs perfectly, when there's a lot happening on screen such as a fast moving video or playing a 3d accelerated game such as Quake 4 or using multitouch to quickly scroll a window up and down, the screen seems to get updated in roughly four horizontal chunks. You can see there's a split-second delay between consecutive chunks. This happens when using both the 9400 and the 9600 chipsets.

    My barometer for this has been running Quake 4 and you can see all through the intro movies that there's a strip about an inch high running along the middle of the screen that tends to lag behind everything else when there's a lot of stuff happening on screen.

    I tried running Q4 in windowed mode with Activity Monitor running but it's not even putting a 50% load on the CPU (which you'd hope given the age of Q4...) and this problem doesn't seem to occur with pure video content - DVDs or iTunes movies for example. I did notice that it was a lot less noticable in windowed mode than stretched onto full screen.

    Could it be a scaling issue given that the Q4 demo wants to run 800x600 and the MBP screen is 1440x900? Or could it be a problem with the fact that Q4 is 32 bit and I'm running OSX in 64 bit? Or is it time for a trip to the Genius bar?

    Is this standard behaviour and I'm just being picky or is this a sign of something going wrong with the hardware? I'm running Snow Leopard 10.6.3 with all the latest updates including the EFI update.


    A bit more info... it also happens during the "id", "Raven" and "Activision" movies while the game is loading. I've been experimenting with using screen capture software and QuickTime to record these blips when they happen but they don't show up in the recorded movie files...


    So I spent the day playing Quake 4 and I have to say that on maxed out quality settings it didn't drop below 60fps so it's not really straining the graphics card and yet this glitch was showing up on a regular basis and at varying heights on the screen. I managed to reproduce the glitch in Burning Monkey Solitaire which you can see in this youtube video which I captured by pointing my digital camera at the screen: http://www.youtube.com/watch?v=PCyUaN24tFM

    Watch the 7 of diamonds as it moves across the screen... the bottom half of the card moves at a different rate to the top half of the card. The 7 of spades does the same thing as it moves for the second time.

    Again, attempting to get a video of this using a screengrabber didn't work which makes me think that either my screen or logic board is screwed. Anybody got any ideas?

  2. Pax macrumors 6502a

    Dec 12, 2003
    An interesting problem, well done for your clear explanation and the video is gold dust.

    (this is testing my limits of LCD knowledge, I have worked with them before but in different applications)

    This looks to me like a problem with your LCD refresh. It refreshes something like every 60th of a second. The top half of the playing card gets displayed in one frame, the bottom half misses that frame and has to wait around for the next frame, so it's out of sync by 1/60th of a second or whatever. I think this is what's called "tearing" (As in tearing cloth, not crying!) in the TV world. You'll mostly see the problem on fast, horizontal moving objects.

    The graphics chip stores a whole frame (a whole screen image) in a buffer, for my 13" that's 1280 x 800 pixel values. The chip generates this frame, and then "freezes" it for 1/60th of a second or whatever the value is. For each frozen frame it then writes pixel values out sequentially at high speed, these pass along wires to the LCD panel. So for my 13" display the chip writes out 1.024 million pixel values one after another. The graphics chip also sends some synchronisation signals to keep everything perfect. This is just like your old CRT TV - the electron beam starts scanning horizontally from the top left, at the end of a row the horizontal sync signal tells it to go back to the left and down one. At the bottom right it gets the vertical sync signal as well which says move back to the top.

    Now I am guessing that your LCD panel and your graphics chip are having a disagreement about where a frame begins and ends. Either
    (a) the graphics chip is not "freezing" the frame in its buffer long enough. Midway through writing the million-plus pixel values to the LCD it changes its mind and starts telling the LCD about the next, or previous frame
    (b) the LCD can't keep up and half way through writing some frames it abandons them and starts again at the top left. The bottom parts of the screen get left behind.
    (c) something else I've not thought of.

    If it was (b) you might see lots of smearing across the whole bottom of the screen as "old" frames persist. That doesn't look like it's happening so I think it more likely that it's (a)

    Now I don't think there's anything wrong with your graphics chip, I think this is a software problem. But I'm more of a hardware guy than a softie so take this with a pinch of salt.

    OS X uses lots of complex buffering technologies for the display. There's loads about it here:-

    I believe Mac OS X uses "double buffering" for its image frames. While one frame is being read out of memory to the LCD, the next frame is being assembled in a different bit of memory. Maybe what you have is a problem where those buffers are getting mixed up, or one is not being completely written before being read out to the LCD.

    Therefore I suspect this problem is one with the low levels of Mac OS X, down in the display drivers, Quartz Compositor or some other part I have no idea about. If so I'd suggest that a clean install of OS X might solve your problem. Hopefully it's not a hardware problem.

    If you've already tried a clean install, then I retract all of this commentary! :)
  3. TimsMBP thread starter macrumors newbie

    Apr 5, 2010
    Thanks for the ideas and the brilliant dissection of the rendering pipeline.

    I haven't tried a clean install of OSX yet and to my shame I can't remember if this happened under the vanilla Leopard install the machine came with - probably as I never did anything adventurous enough to trigger it.

    I have recently created a bootcamp partition with Windows XP to try Quake 4 there and it still happens so I'm thinking it's something low-level, but then I'm a software developer so hardware is *always* my number 1 suspect!

    I wonder if I need to reset something low level like the nvram? It also occurs to me that since installing Snow Leopard, I've tweaked the nvram to force OSX to boot into 64bit mode rather than 32bit mode - I wonder if this problem would disappear under 32bit operation?
  4. iLog.Genius macrumors 601


    Feb 24, 2009
    Toronto, Ontario
    Are you talking about that tear in the card on the flip? If so, I get that in 7 when moving windows around.
  5. TimsMBP thread starter macrumors newbie

    Apr 5, 2010
    Yes, that's it. I get it when scrolling windows up & down or when playing most games. When in Q4, for example, the tear runs the whole width of the screen when/where-ever it decides to show up.

    Can I ask what hardware/OS you're using - by 7 I assume you mean Windows 7 - do you also get it in OS X?

    P.S. I tried rebooting into 32bit mode - no difference.
  6. Pax macrumors 6502a

    Dec 12, 2003
    Sorry if I started teaching you to suck eggs, most of the posts on this forum are of the "OMG a red light came on" variety. I start fairly simple. You are right, if Win7 does it as well it's a very low level problem. Can't blame Quartz I guess. This has been doing my head in all night.

    From a hardware POV the translation from the buffered frames to LVDS signalling (used by the LCD) should be pretty trivial. I assume that Quartz or whatever renders each frame ping-pong into two areas of memory, either main RAM or VRAM for the 9600. Then it just passes RGB words one at a time to the LVDS mapper which generates the LVDS voltages and the sync pulses. At the end of a "ping" frame it tells the LVDS mapper to start from memory area "pong". Hard to see how that could go wrong, or how NVRAM values would be involved.

    In my previous post I eliminated option (a) "the graphics chip is not "freezing" the frame in its buffer long enough". I think I was wrong to eliminate that. I'll bring it back into the frame (ha ha). LCDs have very long persistence, so you might not see any flicker or blurring. If there was a problem with the resolution.... perhaps sometimes your compositor or LVDS mapper thinks your display is shorter than it really is, and abandons some frames at say the 600th row not the 900th.

    But if it doesn't show up on video captures it can't be the ping-pong compositing process itself...

    Q: Does Quicktime take its screen captures from the final composited frames, or earlier in the process? I assume it's the final frames, but that's based on my limited understanding of Quartz. We'd need to know that for sure to check that your screen caps are testing the right thing.

    Q: Do you get the same problem on external monitors? That would (a) eliminate the MBP hardware (Cables, LCD) and (b) could test some other aspects of the video card(s). For (b) note carefully what connection technology you are using (VGA or DVI; mirrored or extended desktop).....
    - DVI as I understand it is LVDS signalling with some more stuff wrapped round it, so you will still be using the same LVDS hardware in the Mac
    - VGA has an analog conversion step so probably has different hardware involved
    - mirroring will test whether the effect is identical on two different displays, but you might go cross eyed trying to watch both at once
    - changing the resolution on the external display, will change the size of the frame buffers, might affect the results as described above.

    Note here when I talk about changing the resolution I am talking about the actual Mac pixel mapping, not running a game like Q4 with some interpolation (I'm sure you understand what I mean though)

    Sorry for somewhat chaotic post. Any useful ideas?
  7. TimsMBP thread starter macrumors newbie

    Apr 5, 2010
    No not at all, like I said I'm a software guy so I thought that was a really helpful way of explaining what was actually going on under the hood. I guess I mustn't have got the most out of hardware lectures in uni... they all seemed to be either about reproducing existing hardware using FPGAs or emulating x86 processors and instruction sets in software, can you blame me? But I guess this is stuff I really should know - especially as my finals thesis was about 3d rendering pipelines!

    Well this is the thing that confuses the crap out of me - I can take a screen grab and use a digital camera at the same time and the screen grabs will be "clean". Maybe it's worth me seeing what happens when I run OSX in a different resolution?

    I'm not sure but I would have assumed that the only sensible answer would be either that it would take the composited frames right out of the frame buffer before they were blitted to the screen buffer or ripped them straight from the screen buffer? Either way it would suggest that there's either something wrong with the "wires" to the LCD or the LCD itself.

    I'm thinking this is a promising thing for me to try as I'm planning to "dock" the MBP into a 20" viewsonic I've got lying around as a desktop replacement anyway. The only problem is that the MBP has the new mini-display port so surely it's all going to go via the same hardware with something clever in the DVI or VGA adapter cables transforming the signal. Or is there some clever switching going on inside the MBP's hardware which can detect which kind of cable is attached and feed the mini display port appropriately?

    Yeah plenty thanks! Since you gave my problem a proper name I went back and trawled through the Apple forums and found a tremendously long thread all about tearing. People there are claiming that it's a common problem that's been plaguing MBPs for 3 or 4 years or that it's made worse by Leopard. Or fixed by Leopard. Or made worse by Snow Leopard. Or fixed by Snow Leopard or... you get the idea.

    The main message seems to be that it happens in two places, Firefox and games. Firefox can allegedly be fixed by editing a setting in it's PList which deliberately (and rather cynically) disables coalesced screen updates to allow for faster rendering whereas games can be fixed simply by enablin VSync. Well I tried both of those and neither of them worked so I'm still scratching my head!
  8. Pax macrumors 6502a

    Dec 12, 2003
    Well I've learned something very interesting. It's the former. You could have knocked me down with a feather. STMicro will even sell you a chip to do it. http://www.st.com/stonline/products/literature/bd/15121/stdp3100.htm. I would have sworn blind that the MDP socket had to output analog VGA as well, and that you couldn't make a D/A converter cheap enough. So using an MDP plug won't avoid the final voltage wiggling hardware.

    Henceforth I shall be known as the man who names problems (rather than solves them) :)

    Yesterday from the bottom of my brain I trawled something about Beam Sync & I was going to tell you about it. Is that what you mean? http://www.macosxhints.com/comment.php?mode=view&cid=60541. There's loads of other stuff. Beam Sync sounds exactly like the kind of thing that will fix your problem. I would keep slogging away at it. It sounds like it's hard to get its settings to "stick"

    My wild guess would be that the problem comes when a game is running at a frame rate which doesn't divide exactly into 60 Hz. The LCD clock ticks at 60 Hz and sometimes a game frame falls half on one side and half on the other of a clock tick.

    I'd be interested to know how this works out.
  9. TimsMBP thread starter macrumors newbie

    Apr 5, 2010
    Better than being known as the man who only makes problems... ;-)

    Yeah from reading that it would seem that BeamSync is designed to prevent the tearing from happening and is enabled by default. All/most/some 3d games contain an option in the graphics setup called enable Vsync which is supposed to tie the rendering engine into the native hardware refresh rates - therefore eliminating the tearing within the 3d game. Essentially this should work no questions asked but doesn't seem to work with Quake 4... or I'm an idiot. Perhaps a little from column A, a little from column B ;-)

    I think I spoke too soon about firefox - the plist setting does seem to have elimiated the tearing - fingers crossed.

    I can't help thinking through all of this that this points to a fundamental design flaw in the way Apple have plugged all the hardware together - almost as if they've tried to be cute to achieve an optimised performance in certain key areas and sacrificed basic performance fundamentals as a result. Or my hardware's knackered! ;-)

    I'm going to dive into the thread I found (sadly it;s archived so I can't add my 2pence) but that'll probably take me a couple of days given how long it is!
  10. Pax macrumors 6502a

    Dec 12, 2003
    All this Quartz Extreme stuff seems quite new and shiny. And Apple's never been that interested in games. So I suspect you're right, they haven't fully thought through how to interface it with high frame rate games.

    I bet this stuff gets sorted out now there seems to be a renaissance in Mac gaming (Steam etc). Not that I've ever gamed on a Mac though.

  11. TimsMBP thread starter macrumors newbie

    Apr 5, 2010
    Well now things get weird - I've had a successful outcome... kinda. I bought an MDP > DVI-D cable and hooked my MBP up to my 20" ultrasonic and set the displays into mirror mode. Sure enough, the tearing was copied exactly from screen to screen - at least it's consistent! I was ready to toss in the towel and book a genius bar appointment for a possible repair when I had a flash of inspiration. I've been getting this problem in two scenarios - day to day (which is basically just firefox) and gaming (which is Quake 4 and a couple of really crappy games that came in various macheist/macupdate bundles).

    I managed to fix firefox by fiddling with its plist settings (can't remember if I mentioned it earlier but there's a setting which firefox deliberately disables to enable faster rendering = tearing) so that just left Quake 4 & crappy games.

    There's not much I can do about the crappy games and frankly I don't care - I never really did - it was more about working out whether or not my hardware was screwed so let's ignore them.

    Quake 4, on the other hand, I very much care about and enabling VSync should have fixed it too and yet it didn't. But it turns out that's not quite true...

    My copy of Quake 4 is the windows copy - which I've been duly running through parallels and on my bootcamp partition. The copy I've been running natively under OS X is just the Quake 4 demo. As the whole point of buying an MBP was to ditch Windows I've naturally been focusing on OS X and hence the Q 4 demo. But the pedant in me thought - "what if the codebase in the demo is buggy or deliberately crippled?" So on the off chance I rebooted into my bootcamp partition and fired up Q 4 but this time with VSync enabled and what do you know? The tearing is gone... how simultaneously pleasing and utterly bloody annoying! Obviously I'm gonna have to get a cheap mac copy of the game to be sure but I'm guessing that means my hardware is probably ok after all?

    But the thing that really pisses me off is that the nVidia management console which Apple bundles with bootcamp actually lets you override all Win applications and force Vsync globally - thereby making the problem magically disappear forever. Why in the hell can I not do that in OS X? OK I get that Apple want a seamless, integrated, it-just-works-for-joe-shmoe configuration system but surely there must be some OS level setting somewhere that people who have a clue could change?
  12. iLog.Genius macrumors 601


    Feb 24, 2009
    Toronto, Ontario
    No graphics related problems in Snow Leopard, only in Windows 7. I assume it has to be a setting or driver problem in Windows so I'm not really worried about it since I'm hardly in there anyway.
  13. Pax macrumors 6502a

    Dec 12, 2003
    Interesting. So it does kind of confirm the idea that Apple's compositor/frame buffer model is a bit kludgy when it comes to games.

    It kind of makes sense. I can imagine that until now Apple hasn't spent many hours testing against native games - because there haven't been any. Also Quake 4 is fairly old, its rendering model might not fit Apple's latest spiffy guidelines.

    Glad it got fixed anyway. An interesting problem.

    PS how does Quake4 run under Parallels? I don't want to go through Bootcamp hell but would like to play the odd game. Not worried about the latest whizz-bang though. I've only got the 9400M.
  14. TimsMBP thread starter macrumors newbie

    Apr 5, 2010
    It's not too bad actually. Obviously it wants to run in full-screen which means you need to switch the VM to full-screen first otherwise it fails to correctly detect the screen size. The BIG problem is that if you need to (or something forces you to) drop back to OS X while Q4 is running then your MBP will turn into a dead animal for about 5-10 mins when you attempt to return to Q4... very annoying actually.

    I'll do some timedemo tests and take some footage of bootcamp vs parallels vs os x and stick them up.
  15. TimsMBP thread starter macrumors newbie

    Apr 5, 2010
  16. TimsMBP thread starter macrumors newbie

    Apr 5, 2010
    Right, here are some vids to start with. This is Quake 4 running under parallels on the 9600M GT in 1440x900 in High Quality mode. Very impressive for a virtualised environment on a laptop, I think.


    This is the network timedemo playing in parallels with the same settings.


    I've also taken the same vids running natively under Win XP and the framerate never drops below 60fps.

    I would have done the 9400M but apparently you can't activate that card under windows so it wouldn't be a fair comparison. I'll stick up a video under the 9400M when i get a free minute.
  17. Pax macrumors 6502a

    Dec 12, 2003
    Impressive. I might give this a go. Thanks a lot for the vids

Share This Page