dan_12 and others: to confirm my previous post - post migration, Lion 10.7.4 works great from the FW800 external drive. No freezes or other glitches. All that remains to be done is to swap the current internal drive for the one in the FW800 enclosure.
You can assume this will work without a hitch unless I experience further problems after the swap.
The thing that worked for me, I don't know if it works 100%... I'll confirm that in one or two weeks, to see if any crash will come in the future.
Start your Mac while holding the "D" key, it will bring you to the Apple Hardware Test:
Depending of your Mac, maybe it won't work, then try "option+D" key.
If your Mac is from 2009 or 2010, or whatever, here's the link to know which install DVD you should use to perform the Apple Hardware Test:
When you see the Apple Hardware Test on your screen, do a simple test, then a long one. It should take about 5min for the short, and about an hour for the long one.
Let me know if it solves your problem. For me, I guess it made something about the graphics or whatever, but it's smoother now. And it doesn't crash like before.
Don't forget to repair disc permissions, to start in safe mode (it drains the cache and some files), and reset the PRAM...
I share my experience hoping it will be useful. I own a 2010 15'' MBP and I have the login freeze problem. I did a clean install of 10.7.3 Lion but the problem persists. So, I did a clean install of 10.7.4 and the problem seems solved. Instead, I realized that the automatic graphics card was disabled by default. So I decided to try the kext solution. I did non modify kext. In fact, I deleted permanently Applegraphicspowermanagement.kext file rather than change it. To my astonishment now everything is working correctly. The automatic graphics card switch is active and I have no login freeze.
I hope we can be of help.
A couple of new freezings today, I'll try the kext thing. I thought it was Lion's trouble. But my iMac didn't have any trouble whatsoever, just my MacBook Pro, so I know it's an hardware trouble rather than software.
So I'll make a clean install tomorrow. I'll try the kext solution, and if it doesn't work, I'll downgrade to Snow Leopard, waiting for a new update, or see if Mountain Lion has this same trouble.
Uncheck widgets in spaces
I tried everything I could to make my Mac smooth on Lion. I went back to Snow Leopard, then I made a clean install of Lion 10.7.4
Everything seems to be OK so far. I can see that my Mac is smoother and cooler than before. I installed the software to change from Intel to Nvidia, and I don't have the freezing like before. I installed all my softwares and no problem.
I'll tell you in one week or two, if I have a freezing. But I guess to come back to Snow, maybe made something about my hardware, before even with a clean install of Lion, my Mac was hotter than now and not that smooth.
Many, many thanks for this solution. I followed the steps you suggested and it has cured my Mid 2010 Macbook Pro 15 of the spinning beachball death at login.
Not only was login affected, but I was having regular crashes with Safari, BBC iPlayer desktop and sometimes Mail - it always seemed to occur after using an app with high graphic demands - so it now makes sense that the freezes occured after graphics card switching. The only way I was ever able to recover was by doing a hard reset (which always made me nervous).
I'm now using my Macbook - on battery, keyboard lit without any issues and taking my sweet time about logging in. It's great to have it back - and yes, the problems did seem to begin shortly after installing Lion. Let's hope Mountain Lion doesn't bring it back...
For anyone else browsing this thread who is looking for a solution that doesn't involve an Apple genius ripping out the motherboard and hoping for the best, here is Prasi's solution repeated below (also thanks and acknowledgement goes to @SDG Consultant who originally identified the kext file that seemed to cause the problem).
MY PROBLEM IS FIXED !!
I have a 15 inch Macbook Pro 6,2 (Mid 2010) with 256 MB Nvidia GeForce GT 330M.
After I did an upgrade to OSX Lion from Snow Leopard, I had this SBBoD.
I did a hard disk wipe out and finally made a clean install of OSX Lion. I didn't work. I still had the same problem.
Finally I did the following:
THE FIX (It worked for me. But I am not sure whether this is any solution):
1. Logged into OSX Lion
2. Moved the following file into Trash:
3. Did a Shutdown.
4. Started in Safe Mode ( http://support.apple.com/kb/HT1455 )
5. Logged into OSX Lion
6. Did a Shutdown.
7. Started in normal mode. Logged in.
8. Put the file back from trash in to the same location " /System/Library/Extensions "
9. Did a Shutdown.
10. Started again in Safe Mode. Logged in.
11. Did a Shutdown.
12. Started in Normal mode. Logged in.
Thats it !!!
It has been around 14 days that I am using my Macbook Pro logged in several times (Sometimes even tried logging in after waiting for around 30 mins after the login screen appeared). I am happy that I didnt see this SBBoD again. (Hope it never comes back )
1. No SBBoD
2. Automatic Graphics Switching option is still ticked ON
3. Same file at same location. No Editing and messing around with permissions.
This worked for me.
Thanks @sjlawton - these steps also worked for me (15 inch Macbook Pro 6,2 mid-2010 with 256 MB Nvidia GeForce GT 330M). After doing this fix I upgraded to 10.7.4 and still no issue. I highly encourage anyone with the same hardware setup that is experiencing login/video issues to try these steps first before doing anything else.
It's been sometime since I don't post on this thread, and we seam to have reached at more than 60 pages, which is quite impressive.
I was indeed having the problems listed in here (freeze at login) and also have system crashes when trying to resume from suspension (safe-sleep). All this at a MID-2010 MPB with nvidia GT330M and Core i5 2.4GHz.
Unhappy with the situation of such instability and unreliability of the system, I did a return to the official OS from the buy 10.6.3 and was happy with it with no problems at all.
But the bugs on 10.7 still bugged me, how could Apple release and keep such a problem with no response or comments what so ever. I than called Apple Line because I did payed for Lion and it should work.
At the call the advisor told me to make some tests.
First he advised me to plugin the ethernet cable, otherwise I wouldn't get the Lion tools available. With ethernet in place, I rebooted Snow Leopard holding 'D' key to enter Apple Hardware Test. I did such test to confirm that no hardware problem was persisting on my MPB (luckily no hardware problem was found, meaning it must be a software problem).
After confirming it is a problem with Lion, we did a Lion installation using a completely clean installation, but not from Snow Leopard + Lion upgrade, a complete installation from Lion itself. To do that the MPB needed to boot holding Command + 'R' key with the ethernet cable on. It than opened a globe with a progress bar and started to download Lion Recovery Disc. After a 40 minutes of download (around 2 GB), it entered the Lion Recovery Installation.
In there we started the Disc Utility and selected the Hard Drive, so we could completely erase the contents (be aware that I did a backup on an external HD before the whole procedure).
With a clean HD, we did a Lion installation from network (entering the apple store user and password to validate the purchase). It did a huge download - around 3.7 GB and than started installing.
At the end I had a completely clean OSX Lion 10.7.4. That did fixed my login Freeze problem.
Than I started checking if I would have a resume-from-suspension-crash. After 50 suspensions, it did a system crash which I needed to do a hard-reboot.
I started to dig around and saw somethings, first that it no longer crashed because of NVDA, even though that was still on the Console application at the time of the crash, but that was not the crash, because after that the system still connected to network normally and then it crashed.
After the hard-reboot a log of the system crash was presented, showing that the error was actually at NVRM (nvram). So I started looking to see how the safe-sleep works, it does a half suspension, half hibernation process: leaving backup of the suspension on the hard-drive so that if power goes off it will resume from hard-drive.
I analysed that the system would not return if the suspension holded for more than 70 minutes, at that time it seamed that the system would try to return but part of the information was not at the reach for the system.
One thing that changed from Snow Leopard to Lion was that Lion no longer allows you to turn off Secure Virtual Memory, this makes suspension secure so that no one can break your password while the informations holds on swap or ram.
But power management has some kinds of suspension style:
0 - good-old suspension method that only sits the information on RAM (faster but if you lose power during suspension you will lose your data as well)
1 - good-old hibernation method that make data on hard drive and shutdown completely (slower but will make your computer not lose any power at all since it will be completely shut)
3 - apple's safe-sleep which makes a simple suspension like 0 but set data on hard drive as a backup (defaul for laptops which is slower than 0 but faster than 1, but it is as safe as 1 if power is lost)
5 - same as 1 but considering the use of secure virtual memory. It is no longer mentioned at man page.
7 - same as 3 but considering the use of secure virtual memory. It is no longer mentioned at man page.
25 - same as 5 listed at man page as "hibernation"
There I realized some inconsistency. If Lion has secure virtual memory enabled by default, why was my hibernatemode set to 3 (safe-sleep without securve virtual memory - you can see your hibernatemode entering Terminal and typing "pmset -g"). This would only make sense if hibernatemode type 3 on Lion is now secure virtual memory always.
Since that seamed wrong to me I changed from 3 to 7. (you can change the hibernatemode using the command on terminal: "sudo pmset -a hibernatemode 7")
After changing to make sure that I wouldn't have problems with power management, I made a change from power preferences pane to disable the option to set harddrive to sleep when possible, and also disabled the graphics automatic switching.
Since than made lots of tests, suspended a lot of times, using many different ways, set the suspension at hold for 2 hours a lot of other times, to see the results and since than, no problems at all.
My problem got fixed using a clean Lion install of 10.7.4, and setting those options on power management, with pmset and power preferences pane. But still bugged by the pmset option, so can anyone tell me if hibernatemode type 3 on Lion is using secure virtual memory?
as i have the same machine as you do, i do not think that Lion clean install and power management settings curred your problem, the disable of automatic graphics swithcing did. But, as i and other mentioned here, you can enable AGS and delete the file that is located here and your problems will suddenly go away (and you will start to enjoy good battery life again): /System/Library/Extensions/AppleGraphicsPowerManagement.kext
atually if you read the whole thread you will see that I was one of the first users to do the modifications to AGPM.kext,
The turn off of AGS was not involved with login at all, the login did worked correctly after clean install, the AGS trick was a backup to avoid crash on resume.
Which in fact I think is not the reason, I do beleive it was the hibernatemode plus the hard drive sleep option.
The clean lion 10.7.4 did fix my problems with login, but not the crash on resume, but it did made it much more smooth and faster.
in my case, it was definetely the AGS that was resposible for the the login freeze, the random crashes AND the sleep-wake problem. When i disabled that thing, everything came back to normal, except battery life...
So, by deleting (and not modifying) the .kext file, i since have no problem at all wth freezes, crashes and all that stuff AND my battery life is back to almost Snow Leopard levels as i was able to re-enable the AGS.
I did tried with power settings and the like before the .kext fix and after a while i had same problems again.