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.

The Finder was not responding, so I control+click'd the Finder icon on the Dock and chose Relaunch… except that it didn't relaunch.

Activity Monitor happened to be visible and I could see that it listed Finder (including the PID) and showed it as "Not Responding."

I was in iTerm, so I tried killall Finder and was told "No processes belonging to you were found" (or words to that effect).

I tried to send "kill" to the PID I could see for Finder, and was told there was no such PID. This led me to assume that the WindowServer was not showing accurate information anymore.

I tried sudo killall -HUP WindowServer which made the entire GUI go away, and left me with a black screen and some white letters on it (not the panic screen, more like console log messages).

The message was:

Sep 27 17:17:23 Pro kernel[0]: V1.4.0: TrustedData_driver_VendorSpecificType00::vendorSpecificPassThroughIn(): SendCommand failed, task not complete, serviceResponse = 1, TaskStatus: 2

Sep 27 17:17:23 Pro kernel[0]: V1.4.0: TrustedData_UserClient_SCSIType00::vendorSpecificPassThroughIn() returning failure from driver: 3758097084

So now I have a black screen, but and I can type but it has no effect (the letters appear on the screen, but don't actually execute. I've tried control-C and control-Z to no avail.

I can ssh into it from my other Mac.

Of course my first step was sudo shutdown -r now which sent out the notice that the system was going to shutdown, but didn't.

I have also tried sudo shutdown -ro now and sudo /sbin/reboot and sudo reboot -q to no avail.

Aside: (On a Windows PC, I would have pressed CTRLALTDEL but there is no corresponding Mac keyboard shortcut… not that it would have necessarily worked anyway.)

I am out of ideas.

I ran ps and put the output here if anyone wants to see what is still running.

What else would you try?

(Other than simply holding down the power button until it shuts off.)

share|improve this question
2  
I've had this issue, too. The only solution I've known to work is to hold down the power button. –  CajunLuke Sep 27 '11 at 23:04
    
Coda: the kernel.log showed that there was an issue with an external drive. I ended up using mount' to find the disk info, and then diskutil eject /dev/{disk}` (using the /Volumes/{mountName} did mot work, I needed the 'disk#s'). Once the drive was 'ejected' I physically disconnected the drive, and then shutdown worked as expected. FWIW in case others run into a similar situation. –  TJ Luoma Sep 28 '11 at 3:29
    
So in the end the question you wanted answered was really "why won't my Mac shut down" rather than "How to force a Mac to restart without pressing the power key?" –  conorgriffin Sep 28 '11 at 13:42
    
No, not at all, the question still stands, because you can get into that situation (won't shutdown) by a variety of routes. I just wanted to share what my experience was in this instance. –  TJ Luoma Sep 29 '11 at 0:49

3 Answers 3

up vote 4 down vote accepted
  • ssh onto your Mac
  • Type sudo su -l to switch to superuser mode
  • Enter your admin password
  • type halt and hit enter

This sends SIGTERM (and subsequently SIGKILL) to all running processes and powers the system off.

Note: Type man halt for other options.

EDIT: You could also try launchctl shutdown

share|improve this answer
    
Interestingly, I can run man halt as an admin user (but not root), but it shows the manual for reboot(8). –  CajunLuke Sep 27 '11 at 23:03
    
Yeah when I added that note about not being able to view the manual entry for halt unless your superuser I had confused myself because I had been trying a couple of things at once. I've removed it now. –  conorgriffin Sep 27 '11 at 23:14
    
halt is a synonym for reboot on Darwin/BSD. You can also use sudo shutdown now - There's also no need to go to su superuser mode as a separate stage. Just sudo reboot will be enough, then enter the password when prompted. –  Slomojo Sep 28 '11 at 0:10
    
Sudo reboot didn't work for him as he already said –  conorgriffin Sep 28 '11 at 6:23
    
I'll definitely try 'launchctl shutdown' next time. That was one way I hadn't heard of before. –  TJ Luoma Sep 29 '11 at 0:49

One tip, if you use sudo su, always use sudo su - , this will ensure root's environment gets setup properly.

Chances are launchd got all sorts of messed up and for the most part, I've never found a way to recover from that short of simply powering off the machine hard. Launchd is more or less the OS X version of init under Linux. It technically isn't the first process, but it might as well be. If it goes, then the system simply isn't going to be able to shutdown properly.

share|improve this answer
1  
Thanks Dustin, I amended the su command as I had omitted the -l which is the same as your suggested -. If it was intended as a comment on my solution it should really have been a comment rather than an answer though. Thanks –  conorgriffin Sep 27 '11 at 23:39
    
FWIW ps auxwww| sort -k 2|head -1 shows that launch is the first process, at least when I'm logged in. I thought that the -o in sudo shutdown -r -o now was supposed to 'bypass' launchd but it didn't work for me. –  TJ Luoma Sep 28 '11 at 3:22
    
Yea I wish I could move it :) –  Dustin Sep 28 '11 at 15:50

The keyboard shortcut for initiating a shutdown while bypassing the "are you sure" dialog is:

control + option + command + eject

And the keyboard shortcut for initiating a reboot while bypassing the "are you sure" dialog is:

control + command + eject

I'm not 100% sure if these are dependent on Finder being responsive.

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.