iMac gamma problem

Solution 1:

Give Flux a try. It’s a “free” tiny application that not only will help you not burn your eyes when it’s “dark” outside, but also touches the gamma every time and perhaps when doing that it bypasses Leopard’s bug.