Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

For some reason, when returning from an hibernate after i.e. battery drops to 0%, I get this:

Glitches on Mac screen

Mind that this only happens with a few programs, and reopening them works most of the time, and a full reboot fully solves the issue.

It's a Early 2011 Macbook Pro 13'' (Base model), with RAM upgraded to 8GB 1867mhz and 128GB SSD, running Lion 10.7.3.

Edit:

~ ‹›  $ pmset -g
Active Profiles:
Battery Power       -1*
AC Power        -1
Currently in use:
 standbydelay   4200
 standby    0
 halfdim    1
 sms        0
 panicrestart   157680000
 hibernatefile  /var/vm/sleepimage
 disksleep  0
 sleep      10
 hibernatemode  0
 ttyskeepawake  1
 displaysleep   2
 acwake     0
 lidwake    0
~ ‹›  $ 
share|improve this question
    
Any further information you can give us to try and narrow it down? Macbook Pro model, OS X version etc. –  binarybob Mar 7 '12 at 14:14
    
updated the question with the info. –  Pedro Nascimento Mar 7 '12 at 17:49
    
Could you please copy/paste here the result of the command pmset -g entered in the Terminal (/Applications/Utilities/Terminal)? –  MattiSG Mar 14 '12 at 16:30
    
Just updated the question, but I just did all that the last answer told me to do. If you would like me to try anything, just put in an answer and I'll do it. –  Pedro Nascimento Mar 15 '12 at 15:40
    
It might also help to mention which programs cause this problem –  ekaj Mar 16 '12 at 3:14
show 2 more comments

5 Answers

up vote 2 down vote accepted
+50

By default, the MacBook actually copies its RAM to disk any time it enters sleep mode (called Safe Sleep). You'll notice this because when you close the lid on your MacBook, there will be a few seconds before the light on the front starts flashing. When the battery gets to 0%, all the computer needs to do is power-off, since the RAM state has already been saved.

This makes me wonder if the problem is happening anytime you return from sleep, or only when the battery hits 0%.

I had similar issues on my MacBook, where the laptop wouldn't return properly from sleep mode. These have gone away for me since disabling hibernate and disabling lid wake.

Many people with SSD disks choose to disable hibernate as the process of Safe Sleep causes a lot of extra writing to the disk (and SSDs have a limited writable lifespan). Since you've upgraded to 8 GB, the laptop is writing 8 GB to disk each time you close the lid.

Note that disabling hibernate will also let your laptop enter sleep mode instantly when you close the lid (something I really like). You'll also recover 8 GB from the sleepimage file, which is pretty valuable on a 128 GB drive.

The only concern is that disabling hibernate will be a problem for you if you actually do hit 0% battery frequently. In this case, it will be as if the laptop had been powered off (crashed). That's not the end of the world, but you will lose any unsaved documents you may have been working on. The solution: don't let your laptop get to 0% battery and shutdown the MacBook when you know it will be off for an extended period of time.

Disabling lid wake prevents the laptop from returning from sleep until you hit any key. I believe this is what actually solved my display issues, but I'm not sure since I did both.

In any case, here's what I suggest for people with an SSD:

sudo pmset -a hibernatemode 0
sudo pmset -a disksleep 0
sudo pmset -a lidwake 0
sudo rm /var/vm/sleepimage

Confirm the settings with sudo pmset -g.

You can find more tips to optimize your MacBook for your SSD here: http://sysadmin.flakshack.com/post/9253439680/ssd-tweaks-for-mac-os-x

share|improve this answer
    
I will try this and let you know. Thank you very much! I only have issues when it goes to hibernate, not sleep (as far as I remember). Disabling hibernate might work, and may solve my problem, at least temporarily. –  Pedro Nascimento Mar 13 '12 at 17:08
    
Been working ok so far. :) Thanks! –  Pedro Nascimento Mar 18 '12 at 17:05
    
Although this is not what I intended when I asked the question, it is a valid solution that worked flawlessly. Not having hibernate is not an issue for me, and I appreciate the extra free space. –  Pedro Nascimento Mar 19 '12 at 23:25
add comment

I don't have any definite answer, but only the following hypothesis.

Here is the information we know:

  • When hibernating, all the information in RAM is copied to the disk, and copied back from it when waking up.
  • Your machine has a graphics card that uses the main memory as its RAM.
  • The artifacts you show are a sign of graphics data corruption.
  • Computers that don't have shared memory don't have such corruption problems, and don't store their GPU-dedicated RAM to the disk (as the size of the sleepimage disk image containing the data clearly shows).

From this, here is my hypothesis: graphics data is supposed to be reconstructed on wakeup, but is not in your case because the graphics card believes it already has fresh data, since its RAM cache is populated. Only some applications have a problem because they don't require an explicit cache flushing upon wakeup.

share|improve this answer
add comment

This is a long-shot, but try resetting your PRAM: reboot while holding down command-option-P-R and hold those four keys down until it reboots again.

Believe it or not, some of the old PRAM settings are still used, particularly for display configuration. Again, its a long-shot, a bug in Apple's display drivers is more likely, but its an easy thing to try.

share|improve this answer
    
Rebooting, as I stated, solves the problem completely. It's an issue only when coming out from hibernate mode. –  Pedro Nascimento Mar 16 '12 at 0:02
    
But does that still happen after you have reset the PRAM? –  Seth Noble Mar 16 '12 at 15:18
    
Sorry, I don't see the point. If I restart and clear the PRAM, will the problem cease to happen, without a restart? Please clarify. –  Pedro Nascimento Mar 16 '12 at 17:15
    
PRAM is persistent memory: whatever is in there stays across reboots. If it becomes corrupt, its going to stay corrupt until it is reset. Likewise, if you reset it and that fixes the problem, then it will stay fixed... until something happens to corrupt it again. But there are a very limited number of things that can do that (bootcamp, plugging in external monitors, running certain applications) so you could at least figure out what is triggering it. More importantly, resetting PRAM is very easy to do, so why not try it? –  Seth Noble Mar 16 '12 at 19:52
    
I'm using rEFIt, could it be the culprit? –  Pedro Nascimento Mar 17 '12 at 20:38
show 1 more comment

perhaps the following gives a hint?

I do get similar graphical mess whenever I went to standby (and very likely hibernate afterwards) after finishing a presentation; my conclusions are: - is related to powerpoint (but perhaps not only; not sure about that) - is related to having a different screen size before/after standby.

not sure how it goes away; perhaps waiting a bit or minimizing/resizing powerpoint.

NB: no SSD in my machine, I have a 15" MPB early 2011; which has a separate GPU..

cheers, Lodewijk Bergmans

share|improve this answer
add comment

Do not waste any more time. Take it to an authorized Apple repair center and have them test it. If the graphics card, which is attached to the motherboard, is defective, they will install a new motherboard.

I hope you are under the initial 1-year warranty, or that you have previously purchased AppleCare to extend the warranty.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.