I have a mac mini as a media player connected via HDMI to my tv. I recently added a cool auto-detecting HDMI switch to the works and everything seemed great, except I'd get no video when switching from one of the other inputs to the mac. If I slept and woke the mac, video would appear, but that was a lame option.
I searched around and found lots of forums where people had similar problems. Some were resorting to buying a $60 "DVI Detective" which sits between the mac and display and tricks the mac so it never sees the display go away.
Aside from blowing another 60 bucks I was bothered by the notion of adding yet another device to the mounting list of boxes and contraptions it seems to take just to watch some tv these days. I decided to try a software approach. The result is a tiny program I've attached (source included) that I call HDMI Reviver. It watches for when the physical display goes away at which point it asks the graphics hardware to check for a new display every 5 seconds. So when the mac is connected to the display or the switch input is set, within 5 seconds the picture returns.
UPDATE 2010/02/23 With feedback from a couple commenters to allow for use on macs with different hardware I modified the program to take the graphic hardware and display device as parameters. You'll need to know a bit about the "ioreg" command though to figure out what those values might be for your hardware. Also, use at your own risk- I can't think of any reason why there would be a problem, but there's no guarantees.