I had this same problem. I tried various things which didn't work consistently. These included restarting, clearing audio cache, repairing disk permissions. If it's NOT the audio jack scenario (where the computer is fooled into thinking headphones are still plugged in) and you are definitely seeing no output device in Sound preferences, there's ultimately a common problem and that is the audio flex cable.
One important thing to note in troubleshooting is that just because one thing seems to work doesn't mean you found the fix or ruled out other possibilities. When I first repaired disk permissions and it seemed to work, it could have just been that the cable was partially seated and pressure on the palmrests reseated it (albeit loosely) again. So, in essence, repairing disk permissions actually didn't do anything at all.
When audio stopped entirely and repairing disk permissions a second time did not work, I started doing some research and the most common issue I came across on the net was the audio flex cable.
I've heard a lot of people went to various lengths including: Replacing the cable, replacing the speakers and cable, replacing the audio board, speakers and cable.
IMPORTANT: One thing caught my eye especially. One user re-seated the original cable and reported the issue fixed! Why is this important? Because consider this: Every time you replace a cable, you are essentially RE-SEATING a cable. It may not have been a defective cable to begin with.
So... *BEFORE YOU SPEND A DIME ON HARDWARE*... +*Try re-seating the original audio flex cable*+. My hunch was correct. This worked immediately for me. If the problem occurs again, re-seat it again. It takes less than five minutes, and will save you money. I suspect that the repeated failures are not because the cable actually goes defective (well, maybe it does in some cases) but because the original design of the cable and the connector seat on the speaker is flawed and causes the cable to repeatedly come loose.
Only if you have re-seated the cable securely and it does not IMMEDIATELY work, then you've likely got a bad cable or other piece of defective hardware. But I've read these boards and others up and down and I'm 90% certain that in most cases, the cable was never defective to begin with.
The problem with Apple Geniuses is they're not electrical engineers. As knowledgeable as they may be, the quickest path to resolution is to replace things and work by process of elimination. But as I recently proved to Time Warner Cable, it is important to isolate all possible causes and not just in one direction. It would seem that if an Airport Extreme Base Station stops pulling an IP from their cablemodem but a Netgear works fine that the AEBS is faulty, right? WRONG. On a hunch, I connected the AEBS
to the Netgear, and proved conclusively the AEBS could pull an IP. The cablemodem for whatever reason decided to stop issuing an IP to the AEBS only. So, I got them to replace the cablemodem with a totally different make/model and it worked.
Sorry for the digression but I really wanted to illustrate the importance of troubleshooting the problem in both directions and really ruling out every possible cause before you go spending money.
I really hope that this helps put the issue to rest for once and for all, and saves others a few bucks.
Message was edited by: SnowDog74