The last few days I have been pulling my hair out over my new HD TV not working with my Home Theatre PC, specifically when switching from HDMI input to TV and back again. The HDMI signal is lost and can only be reset by either rebooting the PC or unplugging and replugging the HDMI cable.
This problem seems to affect ATI video cards only, with NVIDEA updating their drivers to fix this. ATI states that Catalyst drivers at version 7.3 or higher have fixed this problem, but that wasn’t the case for me. A Google search for ati hdmi edid shows a number of users with the same problem.
Hence, I present to you my solution; hdmiOn.
hdmiOn is a tiny program that turns the monitor off and on, which resends the EDID data bringing back the TV to life. Suggested usage is to assign the program to a function or hotkey.
Program was tested on my Sony BRAVIA KDL46X3100 with a ATI HD 2400 PRO.
As requested, source code as follows;
#include int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { // Turn off monitor SendMessage(HWND_BROADCAST, WM_SYSCOMMAND, SC_MONITORPOWER, (LPARAM) 2); // Turn on monitor SendMessage(HWND_BROADCAST, WM_SYSCOMMAND, SC_MONITORPOWER, (LPARAM) -1); return 0; }
Update July 2012
In order to stop the ongoing false positive detections, I have ported the program from C to VB6. It should function exactly the same, but let me know if there are problems.
Source code as follows;
Private Const HWND_BROADCAST = &HFFFF& Private Const WM_SYSCOMMAND = &H112& Private Const SC_MONITORPOWER = &HF170& Private Const MONITOR_ON = -1& Private Const MONITOR_OFF = 2& Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" ( _ ByVal hWnd As Long, _ ByVal wMsg As Long, _ ByVal wParam As Long, _ ByVal lParam As Any) As Long Private Sub Main() SendMessage HWND_BROADCAST, WM_SYSCOMMAND, SC_MONITORPOWER, MONITOR_OFF SendMessage HWND_BROADCAST, WM_SYSCOMMAND, SC_MONITORPOWER, MONITOR_ON End Sub
Update August 2012
I have had a user report that the new version doesn’t function the same, I have uploaded the old version, it can be downloaded here;
hdmiOn (old version)
Zip password is “hdmiOn” (capital O)
Leave a Reply