Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Possibly recover from a freeze without a reboot System
I just recovered from an apparently-frozen state, without rebooting. The mouse wasn't responding. Keyboard commands had no apparent effect (I tried Command-Tab). Nothing on the screen would move. Command-Option-Escape wouldn't even work. I had just closed an iCal reminder window, and the machine simply froze.

So I tapped the power button, and was immediately presented with a black screen and login with a blinking cursor. Typing, however, had no effect, so I tried unplugging and re-plugging the Apple Extended Keyboard (with connected Macally Ice Mouse) from the flat Apple 20" monitor. It worked! I came back to my unchanged desktop.

Perhaps the connection had a short, but I don't think so. I'll bet either the USB communications had broken down somehow, or the screen saver went berzerk. In any case, pulling and reconnecting the USB keyboard fixed the problem.
    •    
  • Currently 3.00 / 5
  You rated: 1 / 5 (6 votes cast)
 
[31,920 views]  

Possibly recover from a freeze without a reboot | 25 comments | Create New Account
Click here to return to the 'Possibly recover from a freeze without a reboot' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Possibly recover from a freeze without a reboot
Authored by: oliverchaddock on Feb 08, '06 07:27:51AM

Here's another somewhat related tip for users of LaunchBar and possibly/probably QS as well. A couple of times OS X has locked up on me with the system menu and dock not responding. I clearly needed to restart or shut down to fix the problem, but I didn't want to do a hard shutdown (holding down the power key). What I found was that hitting command-space on my keyboard still activated LaunchBar, and from there I was able to launch Activity Monitor. Then, I quit the loginwindow process which took me back to the login window. From there I could then log back in or (for safety) do a proper restart.



[ Reply to This | # ]
Possibly recover from a freeze without a reboot
Authored by: windrag on Feb 08, '06 08:13:43AM

And for book owners (I've had ocasional problems with interface freeze), if you get the "dreaded freeze," try closing the lid and wait a minute or so for the sleep light to come on. Then open back up, and most times the macine will wake up and be responsive again. If the sleep light doesn't come on within about 3 minutes, then I'll just reboot, but often this works for me.

---
windrag | 700MHz iBook 16 VRAM G3 | Seagate 80MB HD | 640MB RAM | OS X 10.4.4



[ Reply to This | # ]
Closed Platform?
Authored by: tr on Feb 08, '06 08:36:21AM

Why I had to Log In to view this hint? Is it somehow special?

Regards,
Tomas



[ Reply to This | # ]
Closed Platform?
Authored by: salazr on Feb 08, '06 10:00:11AM

Why the members only article?

I had to register to read this.

Not cool guys. Not cool.



[ Reply to This | # ]
Closed Platform?
Authored by: Aet on Feb 08, '06 02:26:25PM

A temporary bug in the database, perhaps? I read it just fine, and only just now had to login in order to post this comment.



[ Reply to This | # ]
Closed Platform?
Authored by: tr on Feb 08, '06 03:35:30PM

Yeah, maybe. At that time - when I've posted my comment - the article wasn't even visible for Users which where not logged in (I stumbled across the article because of the RSS-Feed, but wasn't able to read it, I had to log in).

Now everything seems back to normal. I hope this wasn't just a test for "enhancements" or something..?



[ Reply to This | # ]
Possibly recover from a freeze without a reboot
Authored by: DarylF2 on Feb 08, '06 08:43:38AM

This sort of this has happened to me a few times, thankfully its very infrequent. I log in to the locked up machine via another of my Macs using ssh (enabled on all my Macs via System Preferences -> Sharing -> Services, the check "Remote Login").

From the command line on the remote Mac, I ssh into the "frozen" Mac and force it to shutdown via the "sudo shutdown -r now" command. This nearly always worked; I've only had to use the power button to restart my G5 once or twice.



[ Reply to This | # ]
Possibly recover from a freeze without a reboot
Authored by: daniel.beck on Feb 08, '06 10:04:16AM

Why would shutdown -r from a remote machine be preferable to rebooting with the power key?



[ Reply to This | # ]
Possibly recover from a freeze without a reboot
Authored by: glycon on Feb 08, '06 10:53:50AM

Because it would be a "safe" restart instead of a "hard" restart (holding power button).



[ Reply to This | # ]
Possibly recover from a freeze without a reboot
Authored by: inertia186 on Feb 08, '06 10:59:23AM

Good question. From the man pages for shutdown(8):

The shutdown utility provides an automated shutdown procedure for super-users to nicely notify users when the system is shutting down, saving them from system administrators, hackers, and gurus, who would otherwise not bother with such niceties.

It doesn't mention anything about cleanly shutting down. But if you look at the man pages for reboot(8), it's a little more clear:

The halt and reboot utilities flush the file system cache to disk, send all running processes a SIGTERM (and subsequently a SIGKILL) and, respectively, halt or restart the system. The action is logged, including entering a shutdown record into the wtmp(5) file.

Normally, the shutdown(8) utility is used when the system needs to be halted or restarted, giving users advance warning of their impending doom and cleanly terminating specific programs.

Whether or not this informs the WindowServer process, isn't directly alluded to. But I'm sure it gets the message.



[ Reply to This | # ]
Possibly recover from a freeze without a reboot
Authored by: gaoshan on Feb 08, '06 12:45:54PM
I have used ssh to get into a frozen mac but often you do not have to do a reboot. If you run the unix command "top" you can see which applications are running. If one is causing the freeze-up it will often show a huge cpu usage. Killing that process will often free up the computer. Here are the commands:
  1. Remote Login must already be enabled on the Mac. Just leave it on all the time, it is useful and secure.
  2. From another machine (Mac, Linux, Windows... they can all do this):
    ssh root@192.168.1.100
    root is whatever username you use and the ip address is whatever your machine is actually on.
  3. top -o cpu
    this will list everything running on the machine in order of cpu usage. Note the PID (Process ID) number on the far left.
  4. kill -9 2294
    where 2294 is the actual PID of the thing you want to stop. kill stops a process and -9 simply means "no excuses... kill it no matter what".
If that doesn't free up your machine you could try killing the Finder (get it's PID using top... it should restart on it's own) and if THAT doesn't do it then do the reboot.

[ Reply to This | # ]
Possibly recover from a freeze without a reboot
Authored by: jdv on Feb 09, '06 11:48:01AM
Most people won't need to get the pid's, but can just use killall. For example to kill the Finder, do
killall -9 Finder
This could cause trouble on a multi user machine, so be careful if other people are logged in. On the other hand if your desktop is frozen, odds are all other processes are frozen too...

[ Reply to This | # ]
Possibly recover from a freeze without a reboot
Authored by: gregcaz on Feb 08, '06 10:53:07AM

This is quite possibly the weakest hint I have ever seen on Mac OS X Hints.

I was expecting something beyond a basic user skill level.



[ Reply to This | # ]
Possibly recover from a freeze without a reboot
Authored by: CajunLuke on Feb 08, '06 04:20:48PM

You could also do Control-Eject, then hit 's'. That shuts down (I think), 'r' reboots, and Enter sleeps.



[ Reply to This | # ]
Possibly recover from a freeze without a reboot
Authored by: mikehale on Feb 08, '06 07:40:26PM

These keyboard shortcuts are not quite right. Ctrl+Eject+Enter shuts down. I don't know about the other shortcuts.



[ Reply to This | # ]
Possibly recover from a freeze without a reboot
Authored by: osxpounder on Feb 08, '06 11:18:01PM

CajunLuke, I'm glad you mentioned that CTRL-Eject, then s, can shut down the Mac. I see that CTRL-Eject brings up the "Restart|Sleep|Cancel|Shutdown" dialog box on my Mac, even though I use a MS Natural Multimedia Wireless keyboard that lacks a dedicated Eject key. CTRL-[the key I assigned to be the Eject key] works for me, though, and now that I know it, that frees up one of the other keys. I can assign it to something else! Thanks!

---
--
osxpounder



[ Reply to This | # ]
Possibly recover from a freeze without a reboot
Authored by: MarkHolbrook on Feb 09, '06 06:21:38AM

This is interesting because I always have trouble moving my powerbook which is sleeping to the office where I plug in a USB keyboard. Many times the act of plugging in the USB keyboard (done while its asleep) will cause it to wake up. Then the keyboard doesn't work.

My reason for doing this is I want to keep the lid closed and use and external monitor as well. I've actually found it easier to simply shutdown and restart when I'm gonna move from home to office.



[ Reply to This | # ]
Possibly recover from a freeze without a reboot
Authored by: cwatts on Feb 10, '06 02:15:31PM

I sometimes get similar freezes- seemingly related to Safari.

I discovered, quite by accident, that pounding the "Return" key a few times almost always fixes it.

cw

---
sttaw sirhc



[ Reply to This | # ]
Possibly recover from a freeze without a reboot
Authored by: raggamuffin on Feb 11, '06 06:56:59AM

If you connect or disconnect a USB device from a sleeping Mac notebook with the power cable plugged in, it will wake up; if you unplug the power first, then the keyboard, it will stay asleep. It will however wake up again when you plug the power back in...



[ Reply to This | # ]
Possibly recover from a freeze without a reboot
Authored by: JimKesterson on Feb 20, '06 04:52:46PM

This has been happening to me a lot (multiple times a day). The keyboard and/or mouse just stop working. It'll happen while I'm using the computer or while the screen saver is up. The machine in question is a new 20" Intel iMac, less than a week old.

I can unplug the USB cable and plug it back in and everything starts working again. Not sure yet what's causing it, but it's been happening since day one. Very aggravating. Is it a hardware issue?

-Jim K.



[ Reply to This | # ]
Possibly recover from a freeze without a reboot
Authored by: GD on Feb 20, '06 10:15:23PM

I have a 17" intel iMac and I'm having the same problem. It too is only a week old. Very Frustrating!

I've just converted from the Dell camp, I have always thought of Macs as a superior product, I hope this isn't what I can expect from my Mac.



[ Reply to This | # ]
Possibly recover from a freeze without a reboot
Authored by: jiclark on Feb 22, '06 08:21:32AM

I'm sorry no one has responded to your question here guys. Do everyone a favor though, will you? If/when you figure out the problem, please come back here and post the solution? That way, this hint becomes a very helpful resource when the next guy experiences the same issue…

Thanks, and good luck. I hope it's not a widespread 'iMacIntel' problem!

John



[ Reply to This | # ]
Possibly recover from a freeze without a reboot
Authored by: CJLinst on Feb 23, '06 01:31:45PM

My wife's 800MHz 15" flat panel has just started exhibiting similar problems. Keyboard and mouse just freeze. Clock and system monitor graphs in the finder bar still work fine and I can ssh in to reboot it.

I had no luck reseating the USB keyboard and mouse.

She's trying to remember if it started happening after 10.4.5 or before.

Yes, please post if anyone finds a solution. Hers is outside the Apple Care window and has been running fine for years.

Fix Permissions and extended hardware test are clean.



[ Reply to This | # ]
Solution
Authored by: robleach on Mar 03, '06 11:35:42AM

Ever since that initial freeze, it started happening to me more and more. It eventually got to the point where unplugging and replugging the keyboard no longer helped. I'd tried different USB ports, but the same thing happened on all of them with the same frequency. I tried different keyboards (but the same macally icemouse). Here's the type of errors I was getting in my console:

Feb 3 14:26:53 MyComputer kernel: USBF: 4592991.182 AppleUSBOHCI[0x222a000]::MakeDevice error setting address. err=0xe00002ed device=0x378e100 - releasing device

I eventually isolated my problems to the mouse itself. I assume it was not responding properly to USB queries from the computer and was currupting USB communication. I'd been discussing the issue on an email forum at my workplace and another person who was having the same problem mentioned that his mouse and keyboard had been damaged by a static discharge. So that lead me to try swapping out the mouse. Ever since I replaced the mouse almost two weeks ago, I have not had it freeze up or lose power. (Note that whenever this happened, the light on my optical mouse would not come on - which I'd interpretted as a power loss.)

So I think this is all due to a dying/faulty USB peripheral. The problem with the USB driver is that it can't seem to keep the problem from affecting other peripherals (perhaps connected through a common hub, but I can't confirm this). Does anyone know a way to reset the USB driver so that unplugging/replugging is not necessary to temporarily recover from this situation until the peripheral can be replaced?



[ Reply to This | # ]
Possibly recover from a freeze without a reboot
Authored by: forman on Apr 09, '09 10:29:28AM

More than three years after originally posted, this tip really helped me out.

Infrequently, my computer will wake from sleep or a screen saver with a black screen. I can see and move the cursor but no login screen appears. I am able to log in remotely via ssh but nothing I ever tried (restarting Finder) ever brought back the login screen. I would end up surrendering with a "sudo shutdown -r now".

This tip did the trick. I pushed the button quickly, the machine went to sleep, I then unplugged and plugged in the keyboard, and when the machine woke, I had a login screen. Awesome.



[ Reply to This | # ]