Solving your HDMI handshake issues once and for all.

By | September 20, 2013

I’m no stranger to most every HTPC user’s primary nemesis – the dreaded HDMI handshake.  You may not even know what that is, well, if you don’t experience it – you’re extremely lucky.  On the other hand, you probably do and just don’t know it.  The HDMI handshake issue for Windows-based HTPCs results, usually, in no video, no audio, or a combination of both when starting up your HTPC.  This could be a resume from standby (sleep) or power on from an off state.  What’s happening is that the HTPC powers on and fails to establish an HDMI connection with a device on the other end…this connection is an established handshake that allows the graphics card to obtain the Extended Display Information Data from the A/V receiver or TV.  If it doesn’t get this information, then you’ll probably get the dreaded “No Signal” bouncing around on your screen; or, you may get video, only to find there is no audio.  I’m repeating myself.  Let’s fix this crap.

This guide almost didn’t happen.  You see, my bedroom setup has always functioned perfectly.  My living room has had issues from time to time, but I’ve always been able to solve them by setting some delays on my Logitech Harmony remote, or changing the order they power on.  All that changed when I upgraded the TV in the living room to the new TCL 58-inch LED.  While this TV has been terrific so far, it introduced an EDID issue like I hadn’t encountered before.  I’ve tried just about everything to no ultimate avail.  It actually doesn’t happen all the time, but it does enough to cause a huge annoyance.  I’ve tried an EDID override, different drivers, and spent too much time changing delays on the Harmony I use to control it.  One way or another, I eventually still encounter a loss of video or audio.

What You Need

We’re going to fix this issue with a sledgehammer and we’re going to name the sledgehammer DEVCON.  DEVCON is a Microsoft command line utility that performs functions you would see in the Device Manager GUI.  It comes in both ia64 and i386 (which is what you’re probably going to need) flavors and you can download it here.  You’re going to want to execute the EXE you download in order to extract the one you need for you platform.  Once you determine the one you need, I suggest putting it in the %SYSTEMROOT% directory to make writing our batch script a little simpler.  It’s not necessary though (however, it will be used in this guide).  Anyway, extract the devcon.exe to your desktop or somewhere easily accessible.  It’s going to create an ias64 and i386 folder.  These are computing platforms and do not reflect 32 or 64-bit…well, they sort of do, but not in the manner that you think.  If you’re on a standard PC, you’re going to want the devcon.exe that’s in the i386 folder.  Copy and paste that into your %SYSTEMROOT% directory (administrative rights required).  Good job!  Part one complete!

Using DEVCON

As I said, DEVCON is a command line utility, so open up a command line prompt with administrative rights.  The first thing we need to do with DEVCON is determine the ID of our graphics adapter.  At the command prompt, type in:

devcon listclass display

I’m doing this guide on my work computer, so I’m going to get some odd results, but that may be a good thing.  I have a remote access utility installed which has its own video driver, so mine actually returns two results.

DEVCON ListClass results

DEVCON ListClass results

My physical graphics card is the second result.  We want to pay attention to the first few characters or so of that entry, in particular VEN_1002.  That’s what we’re going to use for our batch script.  Yours will probably be different, but in the same place.  Record it for use later and let’s move on to the next part of our guide!

Create the Batch Script

Yep, we’re moving right along here.  If you’ve never created a batch script before, it’s easy.  First, open Notepad.  Almost done!  Now, let’s get some content for our batch script.  It’s going to look a little something like this (don’t worry, I’m going to explain it all):

@echo off

ping 127.0.0.1 -n 5000 > nul

devcon restart =display *ven_1002*

“WTF?”, AMIRIGHT?  It’s ok, let’s go over this, line by line.  The first line simply keeps the script quiet by not echoing each command as it performs it.  No big deal.  The second line is a “WAIT” command.  The important thing here is the number 5000.  That number equates to 5000ms, or 5 seconds.  You can adjust that to different values to work with your system.  This batch script is going to launch when your system resumes from sleep, so it could be anywhere from 1 second to 10 seconds…or more.  You’ll have to play with it.  The last line performs the actual reset on our graphics card.  The important part is the portion from earlier that I told you to remember – the *ven_1002*.  That basically is a wildcard match to the class ID that devcon pulled earlier.  Got it?  Good!  Choose to save your batch script and give it a name like vidreset.bat or something else totally original.  However, change the Save as type: dropdown to All files (*.*), or it will just save it as a txt file named vidreset.bat.txt.  We don’t want that.  Save it in a safe location from deletion, but remember where it is.

Save your batch

Save your batch

Create the Scheduled Task

To tie all of this together and actually make it work, we have to create a scheduled task.  This task will kick off after a resume from standby and silently execute the batch file we just created.

Open the Task Scheduler interface and look over to the right under Actions.  We want to click on Create Basic Task.

Task Scheduler interface

Task Scheduler interface

Now the Create Basic Task Wizard starts.  Give your task a name and optional description, then click Next.

Name your task

Name your task

Now we’re at the Task Trigger part of the wizard.  We want to select the last radio button: When a specific event is logged.  That’s because we want our scheduled task to kick off when the computer resumes.  Select that option and then click Next.

Trigger on event

Trigger on event

The next screen is where we configure the type of event to fire off on.  For the Log:, select System (end of the list).  For the Source:, select Power-Troubleshooter.  Finally, for Event ID:, enter 1.  Click Next.

Specify the event

Specify the event

Almost done.  Next in line is configuring our Action.  We want to Start a program and that’s set by default, so just click Next.

Start program action

Start program action

The following screen allows us to browse for and select the script we created in the previous section.  Click the Browse button and locate your batch script.  Click Next.

Add the script

Add the script

We’re finished!  Now, before clicking the Finish button, I want to get a couple of caveats out of the way.  If your HTPC typically is in use with a low privilege account, you may need to put a check in the box displayed to edit additional properties.  This will open your scheduled task properties and allow you some fine tuning, most importantly, the ability to Run with the highest privileges.  If you have a separate administrator account on the system, you could even set this task to run using that account instead by using the Change User or Group button.  I’m not going to walk through all of this as you should be able to figure it out.  It’s fairly self-explanatory.

Task properties

Task properties

Conclusion

That’s all there really is to this.  What will happen now is that when you bring your system out of standby, it will execute the script once the configured event is logged.  The script will execute and first perform the configured wait cycle using the ping command.  Once the wait is complete, the script executes the devcon command which resets your graphics card.  This will initiate another HDMI handshake, re-establishing the correct EDID.  At that point, you should have your video and audio working perfectly.

Gefen HDmi Detective PlusAlternatively, if all else has failed, you may just need to bite the bullet and purchase an HDMI Detective Plus.  This basically stores the EDID information needed by your graphics card so that no matter what, it receives it when you power on your devices.

Regardless, please chime in and let me know how this worked for you!  You may even find an older post using the HDMIYo! utility helpful.  There’s even a way to manually reset your HDMI connection using your Harmony remote if you don’t need it done on every resume of your HTPC.  If I see enough responses, I can do another guide to show you how.

10 thoughts on “Solving your HDMI handshake issues once and for all.

  1. Ken Axelsson

    I think I have the same problem using VGA instead of HDMI, will this work for VGA as well?

    Reply
  2. Christian Holm Maagaard

    Extreamly cool post! Very good explanation and lots of usefull bits being putted together.

    Reply
  3. Chewbaccaman

    So I was really excited to try this, as I have to leave my HTPC with a GTX 660 on all the time. If I sleep it, it usually comes out of sleep with no sound 50% of the time. But when I tried these instructions I couldn’t get it to work. I’ve ID’d my video card correctly and followed these directions to the T.

    First, when I created the task as instructed, I got this message: “MMC has detected an error in a snap-in and will unload it.” Scary sounding and I have no idea what it means, but after a quick search I fixed it with the instructions here: http://support.microsoft.com/kb/2817142.

    With that (hopefully) solved, whenever I try running the batch command nothing happens. And if I try to reset just using cmd as an administrator (devcon restart =display *ven_10de*), it lists my video card correctly, followed by “Restart failed No devices restarted.

    Any idea how to make this work? I’m on Windows 7 Ultimate 62bit. I’m really hoping this could solve all my sleep issues! Thanks.

    Reply
      1. Chewbaccaman

        Ah, ok. I see that you have an ATI card. I tried an HDMI detective earlier this year, but apparently it doesn’t play well with NVIDIA cards — throws an HDCP error.

        Reply
        1. Jon Post author

          There is a dip switch on the the HDMI Detective for HDCP passthrough. I got the same thing with Live TV until I enabled that. It’s in the instruction sheet.

          Reply
  4. Michael

    Thanks a lot, brother, it really fixed the audio problem when the display turns off and back on. Keep up the good work!

    Reply
  5. Flux88

    Perfect, thank you! I have an Intel Graphics adapter, and need to use the HDMI ‘Pin 19’ trick; this was the only way I could get the display to work. Much appreciated!

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *