OS X GUI lockup with Command-Tab
Every once in a while, probably twice this month, my GUI locks up after pressing Command-Tab to bring up the Application Switcher. Everything on screen is stuck behind the switcher display, the mouse still works but nothing can be clicked.
Most infuriating is that the guts of the machine are working normally, I can SSH in and run any non-GUI app I want and everything works fine. I’ve tried working up the ladder of apps to kill (via SSH), but nothing I’ve found manages to restore the computer to working order. Except restarting by holding the power button (or the shutdown command via SSH).
Today the screen froze while iTunes was playing, iTunes finished the song it was playing then stopped. No Apple Events work (ie. osacript -e’tell application “Finder” to quit’)
At least two, maybe three other people are having this problem too; Matthew Conway, poster lazydog on MacRumors and Rich Collins (who’s having it much worse and is willing to pay $125 for a fix.)
The machine is in otherwise excellent health. Disks are regularly checked and permissions repaired (FWIW). Nothing unusual seems to be appearing in the logs and there isn’t anything particularly funky running on the machine. Since it’s so irregular, trying to recreate this in a second user account isn’t a realistic option.
This has happened a few times and I’m totally at a loss as to why. That people are seeing it on non-Intel hardware is reassuring that it’s not a hardware failure. Any ideas about how to fix/prevent this are welcomed. If you’re having this problem, please leave a comment.
More from Apple Discussions: Command-Tab freezes system (sporadically)
I deleted the com.apple.dock.plist file, here’s hoping that works.
Update: I seem to have a partially failing stick of RAM, which may or may not be related. It passes Apple’s Hardware Test, but the computer won’t boot if that chip is installed by itself, or in the lower slot (where it was before I discovered this?!), it boots and seems to run fine in the top slot. I installed a new chip this morning (Sept 21), no issues so far.

I have the same problem (about once a week), and I have a hunch that it’s due to SSH Keychain. Are you running that application?
The last two times my laptop locked up, I was unable to ping it, but the time before I was able to log in via ssh and investigate. One of the things I had noticed was that SSH Keychain was using 99% of the cpu, which was very strange. However, killing it did not unlock my machine.
I’m going to run my box without it and see if that helps.
Thanks for the comment, I’d sort of forgotten about this.
I don’t think I’ve had this happen since switching out the RAM as mentioned above. Unfortunately I can’t be certain, since there have been a few system updates and firmware patches, but this hasn’t happened to me that I recall since writing that post.
Don’t trust Apple’s Hardware Test, I’ve never seen that report an error even on clearly faulty hardware. If possible, juggle your RAM around and see if that’s the problem.
I have seen this too, with exactly the same symptoms. Google for “Command+TAB freezes system” and you’ll find a few other complaints. I don’t believe this is due to SSHKeychain, which is known to enter some memory hogging loop occasionally (it doesn’t hose the system and can be killed and restarted easily). This is definitely something different. I’m not sure it’s RAM related. Only way to get your system back is to ssh in and reboot.
I’ve had this happen too, and I don’t have SSHKeychain. Did trashing your plist fix it? The only hackish thing I’ve done to my system is replace Finder with Path Finder.
Having had this happen several times in the last few days, I decided to find a replacement. I found LiteSwitch X. It slides right in the place of the application switcher and has a couple of nice features that can be enabled as well.
It happens to me too, probably once a week. It’s been happening for a couple years. G4 powerbook. Joe have you had it happen again since trashing your dock plist file?
I just remembered something– I’ve been using TinkerTool[1] to move my dock to the lower right and make it vertical. I can’t possibly imagine how this would make command-tab freeze but hey, you never know.
Anyone else also moving the dock to a non-standard position?
[1]http://www.bresink.com/osx/TinkerTool.html
I’m glad I’m not the only one with this problem.
It’s so sporadic it’s infuriating. I’ll go a couple months with no freezes, then I’ll have three or four in a week.
For a while I thought it would only crash if I moused over the app icons once I brought up the list with command-tab, but now I’ve seen crashes using just the keyboard.
I think the Finder is the offending process; When I ssh in to my stuck machine and try to kill the Finder it turns into a zombie and refuses to die. Which, on unix, I typically associate with a driver-level problem.
If you log in remotely and kill the WindowServer process the machine will recover, but it will exit every GUI app that you’re running. I’ve tried killing everything else (including finder and dock) with no effect.
I’ve always suspected that Firefox was involved in the issue, but I can’t reliably reproduce it. I have seen the issue on my machine a few times, and I don’t run SSH keychain.
Personally, if it gets to the point of having to kill WindowServer, I just restart. From a productivity standpoint, it’s basically the same thing.
Firefox might very well have been a factor. However my issues went down significantly after replacing my RAM. I think there’ve only been one or two lockups since replacing the defective chip six months ago. But the latest release of Firefox seems quite solid.
Me TOO!
I’ve seen this for years, PPC and now Intel. I always have firefox open, I don’t think it’s SSH or firefox (although firefox never sleeps.)
Killing a GUI process results in zombie; non GUI are ok. GUI processes block when doing something with the windowserver. Window updates may cause blocking, itunes works until the next song..
Mac Pro: for the 1st time I am using ECC RAM which is supposed to have hardware error checking (which can’t be totally pointless since they are still making the expensive stuff.)
This happens sporadically on my late-2006 MacBook as well. No fix so far. I can’t remember my mid-2006 iMac ever doing this.
Another late-2006 MacBook here where this happens, about once every 2-3 weeks. As for SSHKeychain, I run that too, and very occasionally it goes into a 99% CPU loop, but quite independent of the Command-Tab freeze. I simply kill it and restart it without any adverse effects.
My colleague sees the Command-TAB freeze too, at the same frequency, again a MBP of the same time period. Both of us have an extra stick of RAM in our laptops that we got from a different source than Apple. Another colleague with the same problem doesn’t have the additional RAM, and a 3rd colleague does have the extra RAM, but no problems so far, so the RAM is probably not the cause here.
*sigh*
I had almost forgotten about this bug. Hit me a couple times a while back, but I since reinstalled my mbp and it’s been good for a couple of months. Then this morning I got struck again. Not using ssh keychain, but I am a firefox user.
Same symptoms — total freeze, can ssh in just fine and kill window server which restarts the gui.
Exact same problem here.
My machine was born with 2 gigs of ram, directly from Apple, but still – i could easily suspect defect ram. My machine (late 2006 macbook) has crashed a total of 7 times on me, since i got the machine in mid-december i think it was.
It’s totally annoying, and a fix for this would be extremely welcome. I’ve tried creating another user on my machine and same thing happens there (it just happened 10 minutes ago, and i created the user a couple of days ago..)
Firefox is also one of my main culprits in this. Once i managed to get the system working, after just killing processes all over, and then it woke up from the lockup .. I have only been able to do this once.
It’s really quite depressing! :(
Hmmm… I too have this problem on a MBP 17″ bought in June 2006.
Interestingly is that I’ve used this machine heavily for about 1 year now and only started seeing this in the past few days, but it’s happening more than once a day.
I am linking of trying LiteSwitch X simply because $15 is worth it to stop the frustration and time waste that this freezing is causing.
I wish I knew what it was, though. Maybe it’s because my 1 year of AppleCare is almost out… sort of like the old joke where the appliance blows up the day after the warranty runs out.
Oy!
The same thing is happening to me, application switcher pops up and cycles repeatedly, screen freezes behind it and can’t shut down. First time it has done it, no recent updates to any software that I can think of that may affect it….very, very frustrating……
I found this page googling for an odd osx lockup where my mouse wouldn’t click, just as you’ve all described.
Strangely, the problem turned out not to be a bug, error, hardware failure or program conflict. It was the mousekeys feature.
There’s an option in the Universal Access preference pane to activate MouseKeys when Option(alt) is pressed five times in a row without doing anything else. MouseKeys allows the user to move and click using only the numeric keypad.
While using Photoshop, I might well press alt and use my tablet pen to Eyedrop a color five times in a row. Tablet presses do not interrupt the Universal Access queue for activating MouseKeys.
The result is that if I’m painting fast, MouseKeys is turned on. The next time I use the keypad to enter a number my mouse, tablet and any other pointing devices are ignored in favour of MouseKeys.
The result is almost identical to what you’re describing here, except for the CMD-TAB connection. Can’t click, iTunes keeps going, everything frozen behind whatever was active, had to kill the GUI until I figured it out. Nothing was actually wrong with the system, so everything I could think to check (permissions, hardware, whatever) came up negative.
My suspicion is therefore that whatever’s happening to you is also an unintended interaction with an Accessibility function. Especially since you’re all probably users of Quicksilver, TinkerTool and a dozen other things that have strange activation sequences and remap keys. If you work harder on trying to cause the problem and less on trying to fix it once it’s happened, you’ll probably find out what it is.
Interesting observation and having been a Photoshop jockey in a previous life I could totally see how MouseKeys could be accidentally invoked. But I don’t think this was what was happening to me, since replacing my RAM I haven’t had any trouble.
I am having this exact same problem, if anyone finds the answer to this conundrum then please post it here!
I have done all of the obvious permissions, disk checks etc. with Apple factory RAM and nothing particularly out of the ordinary installed on my system.
I have tried using Light Swtich X but I have just had another screen freeze so that is not the answer.
Been having the same problem. I would suspect Firefox, except that I switched to FireFox because Safari was doing the same. I have noticed that gMail is giving me scipt error messages in both, that seem to be tied to the crashes. Anyone else using gMail at the time of the crashes?
Chris
I have just upgraded my Hard Disk (which required a complete reinstall of OS X) and upgraded the RAM (replacing both DIMMs) in my MacBook…. and the problem has just happened again… not sure what that means but certainly should narrow down the problem.
So I’ve had a few more occasions where this seems to have happened. In both cases the machine was very hot. What temperature was your machine running at, and are these all happening on first-gen MBPs?
I have a MacBook (white) core 2 duo so not isolated to MBPs.
Next time it happens to me I will try to check the temperature but the fan is not going mad when it happens and everything other than the windowing interface is still running fine.
Same here:
15″ MBP
Similar apps listed in this post:
Firefox
Gmail Notifier
iTunes running as well
ssh shells open frequently
At work, I remap/reverse the alt & command keys so I can use an IBM keyboard.
Upgraded RAM with 1GB 3rd party chip. Machine passes all diagnostic tests. Consistently (2-3 times/week) happens when hitting Command-Tab to switch applications. I am able to ssh into it from another machine, but like others, killing processes doesn’t unfreeze it.
My machine also has trouble waking from sleep at times.
With regard to heat, I keep my machine elevated on a iCurve stand, in a A/C cooled room.
I want to reinstall the OS, but I have so much invested, that I want to wait until Leopard.
It used to happen to me all the time with my g4 powerbook, and it just happened again with my new macbook pro. the difference is that with the powerbook, the screen would _always_ freeze with the application switcher visible. this time, it froze before the application switcher was rendered (or for some other reason it wasn’t visible, anyway). But it was during command-tabbing.
Forgot to mention, I have all Apple RAM.
yeah well, exact same problem with a brand new MacBook pro…
Is it really worth mentioning?
Shouldn’t we be posting these problems on an apple.com discussion list?
I never had that with my old G4.
I’m in about the same boat as Dave P above.
Seems this has been happening a whole lot more recently.
Same problem here with a brand new 24″ iMac Core 2 Duo … from time to time when I want to switch the application the UI freezes. I never had this problem before with any Mac?
Same problem here…a couple times a month.
17″ MacBook Pro
2.16 GHz Intel Core Duo
1 GB 667 MHz Ram
All original parts as purchased.
It freezes when command-tabbing.
Firefox does not need to be running.
Temperature is not a factor, as it just happened again a couple minutes after waking up in the morning.
Ditto…, this happens to me a couple times a month. Killing the WindowServer sadly does not get the results I’d like.
Typically, it seems to happen when I’m working in one of those confused moments when I’m aggressively tabbing back and forth. (e.g. tabbing back before the finder finishes animating the first tab switch).
Assuming it’s UI related, I’ll try switching to LiteSwitch (I mean bringing a app to foreground shouldn’t be rocket science).
Same. New MacBook Prp. 4GB RAM.
I have a black MacBook with 2GB of Apple-installed RAM. It’s also happened on my previous white MB with 2GB of third-party RAM as well. No other instability problems with either machine. I used to think TextWrangler was the culprit, and actually made the switch to TextMate just to avoid this aggravating problem. I think it’s gotta be a bug in the application switcher. Most of my friends never use it (they use Expose compulsively), thus never get the freeze. I’ll try LiteSwitch meantime.
I’ve been experiencing this for over a year now on my Macbook with the duo. Sometimes it happens two days in a row, other times once a month. Seems like it’s nearly always related to alt-tab.
There is a seemingly related problem affecting the new aluminum iMacs: http://www.appleinsider.com/articles/07/10/03/new_imacs_plagued_by_interface_freezing_issues.html
Having seen this first-hand, I can confirm that the iMac issue is far, far more serious and frequent than whatever’s going on with my MBP.
MBP Built Nov 2006.
I have almost 100% correlated use of Firefox ( at all, not at the time of the crash ) to the crashing. Every time I start using firefox again ( 2.x or 3.x ) the system will lockup within 1 week.
I do not have mouse keys enabled.
I have run diagnostics over and over again with nothing found.
If I don’t run firefox I can go months without a lockup when command-tabbing, when I run firefox it will crash within the week.
I have the same problem happen almost weekly, i never use firefox and bought my macbook pro in april ’07. ive never ever had this issue before on my previous 2 mac laptops (both G4 powerbooks) or my G5 at any time over the last 6 years of using macs. ive always used the command-tab option religiously so it’s v frustrating!
macbook pro 15″
2.33 Ghz Intel Core 2 Duo
2 GB RAM (mac original)
I have experienced this problem intermittently in the 10 months I have used my MacBook Pro. I am hoping that Leopard will fix it but I’m not ready to install. I’m curious — has anyone had this happen while running Leopard?
I’ve been experiencing this issue for years on various Powerbooks and MacBook Pros. I use tinkertool, FF, and have had apple and non-apple ram. I’ve been told to attempt to SSH into the machine, but after reading the comments here, I’m not sure that it’ll mater. Please Apple, fix this issue.
Same thing for me with OS X 10.4.11 on a 1,2 GHz / 512 Mb PM G4.
I’m using Seamonkey 1.1.x which is related to Firefox/Mozilla (it’s the complete package with mailer and composer).
The same with me.
MBP, 2GB original RAM, nVidia card.
10.4.11
Does this happen to leopard machines? May be that is the way Apple wants us to upgrade to Leo? )
I haven’t had this happen under Leopard, but that has plenty of it’s own issues.
WOW. I’m so glad I’m not the only one experiencing this. OS X hums along just fine for WEEKS at a time and then, when you happen to be working on a paper and have 10s of resources open simultaneously and you just happen to switch apps, BAM! and your computer is locked.
There is some pattern of disk activity. Does Apple even acknowledge this issue? I’ll check the Console but I doubt there will be any significant information logged to it.
Alright.. I’ve been having issues with the GUI lately as well. Not so much app switching, but sometimes..and actually, alot lately.. i’ll be using safari or Itunes and the window will freeze.. mouse still works, but can’t grab ahold of the top of the window and move it, OR in itunes, i’ll go to click a song and it’ll act like i clicked a song 10 lines above.. Kinda odd.
My first thought was firefox, but then again i haven’t been using firefox lately since there seems to be some bug in the latest release which is an absolute pain in the neck.
oh right. and i’m using a 15′ 2.2ghz intel duo w/2gb ram. new as of aug ’07
I have this problem since I regularily use an external monitor in dual screen mode. Do you use an external monitor by any chance, people?
Aargh!
I’m having the same problem. New mbp dual core, leopard. And it seems to be only the GUI that crashes; the mouse works fine (though nothing is clickable..) and the computer does not seem to work very hard at all.
I can access a running web server on it sans probleme while it’s in “lock mode”…
I do use an external monitor, might that be the problem?
AAAH!
I’ve been having this problem at work and it’s very frustrating because I typically have 10-15 users ssh’ed into my machine. Shutting down the machine is a HUGE hassle.
I run firefox because of the quicksearches, filemaker pro 8, Quiksilver, TextWrangler, and typically have 3-4 Terminal windows open watching small scripts. I also host a small local MySQL database which only I use.
The first time this happened I was able to get the machine back by ssh’ing in and killing the Finder. This time I killed the Finder and Dock, and no results.
I’m on a G5 quad-core intel (2.4 ghz?) with about 6GB of RAM (mostly third party) and am dual monitoring. The machine is about a year old. It also has trouble waking up from sleep if a user is not logged in, e.g. I can’t log out when I go home and leave it on the login screen or it won’t wake up and nobody can ssh in.
I still have this problem as well. I’ve had it for years, first with a Powerbook G4, and now with a MacBook Pro. I’m pretty sure it is related to multiple displays, as I have never noticed a correlation between the freeze and any particular application or other action. Also, the multiple display and display detection functionality on Apples has always been buggy, similar to the sleep/wake functionality. Seems to me that these are both pretty fundamental operations to a laptop, and given the longstanding bugginess of both, you’d think they’d have addressed this by now. I guess that’s just me venting, but I laugh anytime someone says, “Apples never crash”. Bullshit.
Anyway, for me, it only happens after
1) I’ve been connected to an external monitor, then slept the machine, disconnected from the monitor, then sometime later awakened the machine and worked on it for awhile.
2) #1 + another sleep, then reconnecting to the external display, awakened the machine and started working.
I would say #2 is the way it happens about 99% of the time.