Mac Mini HDMI Detection Woes
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.
hdmireviver.zip
Labels: programming
31 Comments:
Hi, Paul,
This looks like just what I need to fix my HDMI switch problem.
I've downloaded your program but don't know enough about shell scripts to have it running properly. Can you help with that?
Looks like what need as well.
Is this only for the Mac Mini?
Does it run on Tiger?
Thanks!
Oops- I didn't have comment notification emails enabled so I didn't realize people were commenting. So, Bryan, put the file com.1000klub.hdmireviver into your ~/Library/LaunchAgents and put the HDMIReviver app into /Applications. That'll cause it to automatically run whenever you login.
Sanejohn- it currently is looking for video hardware that is on the mini. What model are you running?
ohh man, since I bought my hdmi switch I've had problems switching back from my xbox360 back to my mini mac.
this little script solved everything!
THANK YOU!!!
P.S. Does it work under Mac OS X Leopard?
Jorge- I developed it on Leopard so yes it works there. If you meant "does it work on snow leopard", I have not tried it but the program doesn't do that much so I'd expect it would.
Doesn't seem to be working for me. Says something about a bus error?
It works great, and I think it should be the default behaviour of Mac OS X. Thx a lot for a very handy fix to my problem!
neat "script" :)
How does it affect cpu load?
When the display is attached the program has no effect on cpu, it is totally idle. Once the display is gone the program starts kicking the video hardware every 5 seconds. So the cpu hit is spikey- you'll see the total cpu time consumed by the program increasing over time, but I don't think it's anything you'd notice while running programs. Especially since there's no display to interact with anyway :^)
Paul: On Snow Leopard (2 separate machines), I am getting the following error: Can't find a framebuffer.
Looking through the code, I see that its trying to locate the AppleIntelFramebuffer, but I'm not sure what that is in SL.
Thoughts?
Matt, did it work on either machine with Leopard? And are you using minis?
Paul: Curiously, it doesnt work on my wife's 10.5.8 installation either. We've tried a Mac Mini with Snow Leopard, a 15" MBP with Snow Leopard, and a 13" MB with Leopard.
Matt,
The code is looking for hardware specific to mini so it's expected it won't work as-is on your macbooks. From terminal, email me the output of "ioreg -l"
This is great Paul! I'll try this out tonight when I get home! Have the same issue as described in the initial post.
I'm also having the cant find a framebuffer issue. I'm running snow leopard on my mac mini.
Hi Paul!
This sounds like what I need for my mac mini (with snow leopard) to onkyo receiver. However, I'm not very computer savy and would like to get very specific instruction on how to implement your nifty little program. I'm afraid that I'll screw up something. What if anything could go wrong? Not being very knowledgeable about this kind of stuff, should I not do it?
Thanks in advance! :-)
MikeC
Paul.. I love you! Thank you very much for solving all my problems..
Nick
Fantastic, works perfectly on my old mini with intel chipset.
Thanks!
I was pumped when I switched over from my Satellite to Mac mini and I saw something, but what I saw was static, followed by my Mac mini screen, followed by static, etc.... it just switched back and forth every 3 seconds or so.
Anyone else experience this?
thx!
Now I see.... frame buffer thing as well.
Help.
Paul having the same frame buffer issue.
I am on a 2009 mac mini running snow leopard.
This shows such promise and is exacly what I need. I would really appreciate help getting it working. I would pay pal you a donation :)
@ Mac mini late 2009 / early 2010 MBP 2009 users; AppleIntelFramebuffer has been renamed NVDA
78c78
< frameBufferService = IOServiceGetMatchingService(kIOMasterPortDefault, IOServiceMatching("AppleIntelFramebuffer"));
---
> frameBufferService = IOServiceGetMatchingService(kIOMasterPortDefault, IOServiceMatching("NVDA"));
where do we make the change?
That fixed it for me Thanks anonymous!!
You make the change in main.c, and then recompile using xcode.
If Paul doesn't update this week I can post the exe.
Paul perhaps the above change could be added to the plist file to make this more portable.
Thanks anonymous. I will modify the program to take the framebuffer device name as a parameter. That'll allow people to use with their hardware much more easily. I'll try to update with that in the next couple days.
I wonder if that's why the app hasn't been working for me? My system profiler says the chipset model is GMA 950, which I believe is the Intel chip. I wonder what other reasons may be causing it to not work. I'll try once more.
I've updated the program. Please take a look at the readme for details which allow for specifying the hardware being checked for without recompiling the program.
Thanks man! I justed switched from VGA to HDMI (DVI to HDMI cable) and my mac mini always "forgot" about the TV when i switeched the TV off. So i had to reboot the mac mini all the time.
Your program works like a charm :-)
Hi Paul,
Thanks for the clever programming.
I understand some of us (like myself) need to run specify the -f NDVA flag to run it correctly on our system.
I got it running manually, and it seems to work as advertised :-)
I'm unsure how to set this flag if I want to automatically run the program at system login. Can you please explain that?
Cheers,
Geert
Geert, glad it works for you. I've updated the README.txt in the zip file.
Post a Comment
Links to this post:
Create a Link
<< Home