I thought I'd share a simple fix on my macbook 5,1. The problem fixed results in a multitude of serious very problems, including:
• Unrecognized Wifi support (no wireless device)
• Unreliable fan speed (fan speed can be set manually using software, and thermostat reports, but does not dynamically change fan speed
• Tendency to hard shut down if moved while turned on
• Freeze on login if wireless device is available
The solution:
Inside the macbook on the motherboard there is a cable running from the left side to the right, one connector is adjacent to the DVD drive. Reseat this cable. Try the DVD-side first, followed by the opposite side. The DVD-side connector should be held in place with a sticky, soft material. If this material is no longer sticky it is a good sign that it has become loose. I have heard that some people have fixed the Wifi problem by shaking the macbook vingerously. This also suggests a seating problem.
I also reseated the memory and cleaned the memory connectors, as part of standard procedure. All problems appear to be now fixed.

Chowhound
Comic Vine
GameFAQs
GameSpot
Giant Bomb
TechRepublic