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.

Over the last few months I've found my MacBook Pro is getting increasingly unwilling to wake-up if it's gone to sleep of it's own accord - not when I put it to sleep deliberately, but when the machine is left for a while and it eventually goes to sleep itself.

I usually run it with the lid down, with a mini-DVI-connected 'main' monitor and then a USB-connected 'second' monitor. Sometimes no amount of keypressing, gently tapping the power button, disconnecting the external displays and lifting the laptop lid, plugging in USB devices, inserting and ejecting CDs - no amount of any tricks I've tried will 'wake up' the display even though the machine is running (shares available over the network) and I can SSH in.

I can 'sudo shutdown -r now' on the machine, though obviously that's a bit drastic!. It got me wondering if there was any other terminal command I could use to wake-up the Finder (I guess) - it certainly seems that the desktop has gone to sleep and can't be tricked into waking up.

Can the finder be restarted remotely via SSH? If not the finder, does anyone know of any other terminal means of forcing the machine to completely wake-up and return to it's previous state?

share|improve this question
    
Typical - it was doing this every couple of days up until I posted this - it hasn't done it once since. I don't know whether to be delighted or annoyed, but as soon as it does happen I'll try the suggestions you've all given me. Thanks! –  robsoft Sep 13 '10 at 9:54

4 Answers 4

This quits the Finder by sending it the "quit" AppleEvent, which is the same signal the system sends when logging out or restarting via the GUI:

osascript -e 'quit application "Finder"'

I (also) don't think quitting the Finder will fix the wake-from-sleep issue, though.

share|improve this answer

You can restart the Finder from SSH using the command:

killall -HUP Finder

I don't think this will help the wake from sleep issue however.

share|improve this answer
    
Thanks - I will also look forward to trying this. I'm not sure the problem is with Finder either, but I was hoping that causing Finder to restart might cause other aspects of the system to realise it needs to be 'awake' again. :-) –  robsoft Sep 7 '10 at 19:56

this answer just cover your last question to wake your system compelety up.
you need do it with Wake-on-LAN protocot, it has sme GUI also.

and also see this example:

Waking up:

There are several utilities for waking up computers over the LAN. A cross-platform utility is WakeOnLAN.You'll need the MAC-address of the computer you want to wake up:

 % wakeonlan XX:XX:XX:XX:XX:XX

To get the MAC-address, ssh into your OS X machine or start the Terminal and

 % ifconfig -a

here is the source.

share|improve this answer
    
Thank you - I'm almost looking forward to the next time it happens, so I can try this! –  robsoft Sep 7 '10 at 19:55
    
The computer is already awake (otherwise he wouldn't be able to log in via SSH or use the Shares). –  Chealion Sep 7 '10 at 20:04

You can also schedule your system to reboot at certain times of the day using options within System Preferences, or by use of a bash script that will handle this when the symptoms you described above are detected.

When you notice this happening, have your monitors also gone into standby mode r shutdown from inactivity?

share|improve this answer

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.