No hdmi sound without OS reboot? Restart the drivers…

Edit: end july 2015 the problem is now fixed for me with windows 10.

This post blog follows a problem that I encountered when I upgraded my laptop to windows 8.1. Precisely, the hdmi sound stops working immediately when I connect the hdmi cable to my television. The hardware works fine because if the OS is reboot with hdmi cable plugged, then the TV as a sound playback device is available. This is terribly annoying, you do not want to reboot each time you want to use your TV as a display device. While searching the internet for a solution, I discovered that I am not the only one with this problem. Therefore, I will try to expose my solution with many details in order to make it reusable by others who would stumble on this post with the same problem.

Assuming that you are in the same, or a close, situation: the hdmi sound works well when Windows is reboot with the cable plugged in. Consequently, when everything is working, if you right click on the sound icon in the tray bar and select “playback devices” you should be able to see the TV in the device playbacks .

The list of available playback devices.

The list of available playback devices.

Before going any further the first thing to do is to update the drivers. This is quite simple, right click on the windows menu at the bottom left of your desktop screen and select the device manager. My advice is to update all drivers for the two entries in the tree view “display adapters” and “sound, video and game controllers”.

The device manager

The device manager

Once all drivers have been updated, check that the problem still occurs (restart the OS once at least) and if it does you may be interested in the following.

Upgrading driver software...

Upgrading driver software

So even after updating the drivers, you still need the reboot to get the sound. Actually, the drivers managing the hdmi need to be restarted and that is what we are going to do manually, without restarting the OS. To perform such action, we are going to need devcon.exe which is a tiny program distributed freely by Microsoft with the Windows Driver Kit. Download it here (you do not need Visual studio).

After the (silent) installation of WDK you may find devcon.exe in the the path “C:\Program Files (x86)\Windows Kits\8.1\Tools\x64”. You will notice that you have two directories in Tools the “/x64” and the “/x86” (i.e 32 bits), use the one corresponding to your system (to know more on 32 bits vs 64 bits check this).

WARNING: devcon.exe error messages are extremely misleading (read completely wrong…). Indeed, if you are using the x86 version instead of the x64 version or if you are trying to restart the drivers (see below) without administrators right you will still have the same error.: “No matching devices found”. Consequently, do not try to interpret the error raised by devcon.exe.


“devcon.exe listclass media” executed in powershell using conemu terminal

Now, we are going to restart the two drivers using devcon.exe. First, let us see all drivers dedicated to sound, then type in your command prompt (or better with powershell) run as administrator: <pathToDevCon>/devcon.exe listclass media

The response here is a list of two items, we are going to retain the first one, “Intel (R) display”, which was the audio adapter used for the hdmi (see the first screen shot of this post). The driver Id: HDAUDIOFUNC_01&VEN_8086&DEV_2807&SUBSYS_80860101&REV_10004&36161A1D&0&0001 is going to be needed. If you are using powershell you may use the Out-File command to write it down in a text file…

You can try to restart it directly by typing (in command line run as administrator): <pathToDevCon>/devcon.exe restart “@<DRIVER_ID>”.
Note that the @ symbol is inside the quotes which may surprise you if you are a .NET developer…

Unfortunately, it does not seem to be sufficient and the system also needs to reboot the display adapter driver after that. So we are going to do the same action but for display adapter driver: we type in an admin command line:
<pathToDevCon>/devcon.exe listclass display

devcon.exe listclass display

devcon.exe listclass display

Then now if you restart the driver listed here as “Intel(R) HD Graphics Family” then the HDMI sound device playback should be available if the cable is connected. To do so execute:

<pathToDevCon>/devcon.exe restart “@PCIVEN_8086&DEV_0A16&SUBSYS_130D1043&REV_093&11583659&0&10”

The Id above is mine, obviously you should use yours.

Fine but this is not over yet. Indeed, you do not want to do all this each time you are connecting your hdmi cable with your TV. What we are going to do right now, is to add a powershell script that will automated this process so that you will just have to click on one icon when you will want your TV sound. If you have never run powershell script on your machine, then the execution of ps1 file (powershell script) will not be allowed. Read this to enable powershell script execution (basically you will just have to type in a powershell console, run as admin, Set-ExecutionPolicy Unrestricted).

Here is the script that you can use. I have added two instructions to enable the drivers, it seems to be sometimes useful when you plug/unplug the hdmi cable several times. All you have to do to make it work is to change the path to devcon.exe and the id. You can save it to the place of your choice such as the Desktop with a .ps1 extension (e.g. restart_drivers.ps1)

Remind that to be effective this .ps1 file should be executed with administrator rights. Remind also, that devcon.exe will only tell you that the drivers cannot be found if you are not with admin rights. So I am suggesting to make the script more easily run in admin mode, you can put a powershell.exe shortcut next to the .ps1 script file. By right clicking on the shortcut file go to Properties and fill the target property as follows. Target:”powershell.exe restart_drivers.ps1″. Then, in Advanced… select Run as administator.

A shortcut to run restart_drivers.ps1 directly with admin right

A shortcut to run restart_drivers.ps1 directly with admin right

That is all, no when you will connect your hdmi cable you will only have to click on the shortcut and enjoy the sound from your TV.


37 thoughts on “No hdmi sound without OS reboot? Restart the drivers…

  1. Eric

    This is really awesome!! I have this problem since I own a HTPC and turning off the connected TV is a no-go since windows forgets most sound formats if you do that (i.e. aac sound stops working). After 5 years I can finally fix it with a simple click on a script. Thank you so much!

    You need to spread this blog in all the common HTPC communities… It’s very hard to find atm and I bet a lot of people there would love this solution.

    1. benoitpatra

      Hi Eric, thank you very much, I am very pleased that this solution helped you this post was meant for that. I am not into HTPC but feel free to share the link with those communities.

  2. Peter

    This solution would probably have worked for me if it wasn’t for one thing. Devcon can’t restart something that it can’t see.
    I have my laptop always connected to a receiver through HDMI which in turn of course is connected to a TV. If I boot up my laptop and switch the display to the TV it works great the first time with the audio and all that. If I then switch back to the laptop and then back again to the TV the sound is lost and is not listed in the playback devices or among the devices listed in Devcon.
    I saw that in your script you’ve added a command for enabling the devices and I tried to use that too but with the same result as Devcon can’t see it and therefore can not enable it.
    This behavior seems to repeat itself if I start a game or something that will use the dedicated graphics card (Nvidia GTX 780M) instead of the integrated (Intel HD4600) directly after boot and before switching to the TV. This has lead me to believe that it has something to do with Nvidias Optimus technology so I tried restarting the Nvidia driver just in case but it didn’t help.
    Looks like I’m going to have to keep restarting to get my sound…

    1. Peter

      Ok so I forgot to mention one thing that (after som testing) seems to be the culprit. When at my desk I’m hooked up to an external display (connected via an Displayport -> DVI connector if that matters) and the scenario mentioned above only happens while using that display. If I just use the laptops display I can switch back and forth with my TV without any issues at all.

    1. Alexander

      You need to open PowerShell as an administrator, then run:
      Set-ExecutionPolicy Unrestricted
      This will solve the problem

  3. Alexander

    Thanks for the great howto!
    However, I can’t get it work.
    I’ve downloaded the latest WDK for Win 8.1 and I’m using x64 version of it.
    The output is:
    HDAUDIOFUNC_01&VEN_8086&DEV_2807&SUBSYS_80860101&REV_10004&490A462&0&0001: Enabled
    1 device(s) are enabled.
    PCIVEN_8086&DEV_0A16&SUBSYS_05EB1028&REV_093&11583659&0&10: Enabled
    1 device(s) are enabled.
    HDAUDIOFUNC_01&VEN_8086&DEV_2807&SUBSYS_80860101&REV_10004&490A462&0&0001: Restart failed
    No matching devices found.
    PCIVEN_8086&DEV_0A16&SUBSYS_05EB1028&REV_093&11583659&0&10: Restart failed
    No matching devices found.
    Google can’t help me with this problem. Can you please provide more detailed answer? Thanks!

  4. Vip Sandhu

    This is amazing. Fantastic job, Mr. Patra I have been running into this problem ever since Windows forced me into the mandatory 8.1 update. Now I can avoid restarting so often. I noticed some grammar issues typical of non-native English speakers. Je peux traduirer/corriger ceux qui j’ai remarque, si vous voudriez. Et encore, merci mille fois pour l’aide!

    1. benoitpatra

      I would be very pleased if you help me to correct my English mistakes.
      I am also pleased to hear that the solution works well for you. It seems that the solution does not work for some environment, unfortunately I did not have the time to investigate further…

  5. cydonia1978

    Just wanted to say thank you! This worked perfectly on my Asus laptop running Win8.1 and connecting via HDMI to a very old Samsung TV. It was pretty annoying to not have audio without rebooting, and this worked like a charm!

  6. Renan

    Hi im From Brazil, thank you so much, im suffering with this with MSI gt70 and now works without restart or plug and unplug THANK YOU SO MUCH!!!

  7. EsQueue

    I was just about to report that it didn’t work for me but it actually did. Just shows my TV instead of my receiver but as long as the receiver works I am happy. Thanks for your write up. This has been EXTREMELY annoying.

  8. Odin

    Couple of years later, I encounter the same problem in Windows 10 and this guide solves it! Perfect 🙂

    PS! Also thanks to Alexander in the comments regarding execution policy!

  9. Pingback: No sound over hdmi moving to other TV win 10 - Hardware Canucks

  10. Vans

    THANK YOU!! I was getting so tired of restarting my computer and I was about to lose all hope. Updating the display adapters worked for me.

  11. Andre

    This is great. Unfortunately for me, it says the restart of the HDMI requires a reboot. The monitor restarts ok. I implemented the script you kindly silver-plattered for us. This is what I get. Does anybody have any suggestions about getting around this?

    PS C:\> ./HDMI_Samsung.ps1
    HDAUDIO\FUNC_01&VEN_10EC&DEV_0283&SUBSYS_102805FB&REV_1000\4&1C5157D6&0&0001: Enabled on reboot
    The 1 device(s) are ready to be enabled. To enable the devices, restart the devices or
    reboot the system .
    PCI\VEN_8086&DEV_0A16&SUBSYS_05FB1028&REV_09\3&11583659&0&10: Enabled
    1 device(s) are enabled.
    HDAUDIO\FUNC_01&VEN_10EC&DEV_0283&SUBSYS_102805FB&REV_1000\4&1C5157D6&0&0001: Requires reboot
    The 1 device(s) are ready to be restarted. To restart the devices, reboot the system.
    PCI\VEN_8086&DEV_0A16&SUBSYS_05FB1028&REV_09\3&11583659&0&10: Restarted
    1 device(s) restarted.

  12. Ben_fromVienna

    Wow youre really a pro on Windows Client Administration.
    Just searched for this because I wondered about one simple thing:
    I got a notebook with integrated webcam. Nothing special.
    Sometimes I dont want my webcam to be active (not just because of oberservation but you know there a webpages that would automatically request webcam access so that step is not necessary if already deactivated.
    Point is however, Windows 7 has a strange way to react on using the same function multiple times.

    Hardware & Sound => device Manager ->Imaging devices
    Select my device
    Then I go to “Properties”->Drivers -> Deactivate/Activate (Always depending on if i need or not need it).
    Here comes the catch:
    Sometimes I can just click OK and its done.
    BUT other times after pressing OK I will get a message, that Windows has to be restarted first.
    So is this behaviour similiar to the one why you may need reboot for using hdmi sound?
    The strangest thing about it is, that sometimes windows will accept my change immediately, other times may require reboot. Any idea why Windows does that?
    I really find it to be an annoyance, because I have to save my work first and then reboot and thats such a waste of time in my mind.

    1. benoitpatra Post author

      Hi Benjamin,
      actually I am no expert on Windows/Drivers management. I do not really know the ins and outs of drivers interaction with Windows. I shared this script leveraging devcon.exe because this is the only workaround I found. Actually, it worked fine for me for a while after that it stopped working. I do not need it anymore now that I migrated to win10. Sorry I cannot help you more right now. If I see something that may be useful for you I will gladly share it with you.

  13. Mike

    Hello, Thank you for sharing your solution to this problem. I hope you can help me out. I’m getting an error running the script. The error reads:

    Unexpected token ‘devcon’ in expression or statement.
    At C:\Windows\System32\WindowsPowerShell\v1.0\Soundfix.ps1:1 char:10 +1 $devcon <<<< = "C:\Program Files (x86)Windows Kits\10\Tools\x64\devcon.exe"
    +Categoryinfo :ParserError: (devcon:string) [], ParseException
    +FullyQualifiedErrorId :UnexpectedToken

    My script:
    1 $devcon = "C:\Program Files (x86)\Windows Kits\10\Tools\x64\devcon.exe"
    2 $audioID = "@HDAUDIO\FUNC_01&VEN_8086&DEV_2807&SUBSYS_80860101&REV_1000\4&1EACBCB&0&0001"
    3 $displayID = "@PCI\VEN_8086&DEV_0A16&SUBSYS_B21319DA&REV_09\3&11583659&0&10"
    4 . $devcon enable $audioID
    5 . $devcon enable $displayID
    6 . $devcon restart $audioID
    7 . $devcon restart $displayId
    8 Read-Host

    Any thoughts?

  14. Mike

    Sorry disregard my previous comment I just realised that I should not have included the line numbers in the script. Unfortunately when the script runs it does not find the drivers for me. “No matching devices found”

    1. Benoit Patra Post author

      Unfortunately, “No matching devices found” looks to be a generic error for devcon.exe and does not really help for error diagnostics… did you make sure to use the proper devcon x86 vs x64 ? Did you start with admin rights ?

  15. Matthew

    I get problems right at the start, the first response being “the term ‘x86’ is not recognised as the name of a cmdlet…..etc etc.

    This is what I type in to get that response
    C:\Program Files\Windows Kits\10\Tools\x64/devcon.exe listclass media

    I get the same response in both powershell and command prompt, running both as administrator

    1. Benoit Patra Post author

      Hi, Matthew
      can you chech that devcon.exe is indeed located at the specified location?
      if it is indeed there, try invoking with double quotes “C:\Program Files\Windows Kits\10\Tools\x64\devcon.exe” listclass media

    2. Benoit Patra Post author

      Hi, Matthew
      can you chech that devcon.exe is indeed located at the specified location?
      if it is indeed there, try with invoking with double quotes “C:\Program Files\Windows Kits\10\Tools\x64\devcon.exe” listclass media

  16. Martin

    Hey Benoit,

    I was so happy that it worked: On both devices it says enabled and restarted. But in playback devices, still the Samsung TV shows: not plugged in

    I checked several times, if it is the right devices, and right numbers. I even restarted other display adapters(I have 2, Intel and Nvidia), but it doesn’t work. Any idea my friend? Maybe other drivers have to be restarted? Would really appreciate your help.

    1. Martin

      ..the only difference I can see at all between your system and mine, is the first screenshot, at playback devices: Your system says under TV: Intel(R) Display Audio, mine says: High Definition Audio Device

  17. Sanehet

    Hey, thank you very much for your help!

    In my case, I only had to update in “display devices” – the driver “Intel(R) HD Graphics 520” which is the video card I suppose.

    I have not updated the sound or video game drivers, nevertheless I can now reproduce sound in my TV through HDMI and I didn’t need to reboot my OS.

    Do you consider necessary updating the sound and video game drivers?

    Thanks again for your solution! Cheers!!

    1. Benoit Patra Post author

      Hi Sanehet,
      I am really no expert on hardware and drivers. I would say that if it works for you as it is for now: do not touch it.

      Normally, for any piece of software such as web browser – OS etc. I encourage people to upgrade to be protected against 0-day security breach However, for these drivers they are so unstable I would not touch and they are not an entry point for malware. So I guess it is ok no to upgrade.


Leave a Reply

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