Solving the "wake from sleep" problem

Discussion in 'MacBook Pro' started by esd, Apr 2, 2008.

  1. esd macrumors member

    Jan 15, 2008
    OK, this isn't a real solution (I'm working on it...), but this is a workaround that has effectively solved the "blank screen on wake up" problem for me.

    I'd only recommend this for advanced users. It's kludgy and involves using the Terminal.

    WARNING: You're installing all of this at your own risk. It's completely unofficial. It's only been tested on my MacBook Pro. There's nothing in it that should cause problems, but no promises. Also, you should really never trust files posted by a stranger on a forum like me. Guess you'll just have to trust me. Anyway, here we go...

    Step 1
    Open up Terminal and paste the following lines in:
    curl -o cscreen
    chmod +x cscreen
    sudo cp cscreen /usr/bin/
    curl -o .wakeup
    chmod +x .wakeup
    It will ask you for your password to copy cscreen to /usr/bin. This is normal.

    * cscreen is a command-line application for manipulating your display settings. It used to be available here
    * .wakeup is a two-line shell script I wrote that calls cscreen.

    Step 2
    Test the wakeup script and make sure it works for you. Back in the Terminal run:
    (that's dot slash dot wakeup)

    You should see the screen fade in and out twice. If not, you got a problem.

    Step 3
    So now we've got a script that can refresh the display, but we need to run it when the computer wakes from sleep. For that we can use SleepWatcher available from here:

    Install both packages, sleepwatcher.pkg and sleepwatcher startupitem.pkg

    Step 4
    That's it!

    Here's what's going on: SleepWatchers calls a .wakeup script in the home directory of every user. The script I posted makes two calls to cscreen: first it tells it to drop the color depth to 16-bit, then to raise it back to 32-bit. This forces the MBP to reset the display settings and snap it out of its funk.

    Note: If you typically use fewer colors on your display that 32-bit, you're going to have to adjust the .wakeup script settings. I'm also not sure how/if this will work with multiple monitors.

    If you try this out, please let me know if it works for you.

    Thanks to Lynn Pye's (abandoned) freeware cscreen utility and Bernhard Baehr's open-source SleepWatcher utility.
  2. ventje853 macrumors newbie

    May 20, 2008
    issue solved

    Thank you! This solved the problem with my MBP.

    My computer awake when I took it up (I think the sensor to detect if the lid is open is not working very well) the computer started however I did not open the lid. When I opened it a few moments later, the screen stayed black.

    But now, after a few blue screens, the screen is back in action.

    Thanks a lot man!

Share This Page