Advertisement
mrgreywater

Intermittent HDMI Audio Output Fix

Aug 2nd, 2013
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Write-Host "Intermittent HDMI Audio Output AMD 7xxx Series Fix - Written by gReY"
  2. $main = Get-ChildItem "hklm:\system\currentcontrolset\control\video\" -erroraction silentlycontinue
  3. if ($main -ne $null) {
  4.     $finalFolder = $null
  5.     foreach($id in $main) {
  6.         $zerofolder = $id.OpenSubKey("0000")
  7.         if ($zerofolder) {
  8.             $desc = $zerofolder.GetValue("AdapterDesc")
  9.             if ($desc -ne $null -and $desc -match "^AMD Radeon HD 7\d\d\d Series$")
  10.             {  
  11.                 $finalFolder = $id.OpenSubKey("0000",$true)
  12.             }
  13.         }
  14.     }
  15.     if ($finalFolder -ne $null) {
  16.         $key = "PP_SclkDeepSleepDisable"
  17.         $value = $finalFolder.GetValue($key)
  18.         if ($value -ne 1) {
  19.             $finalFolder.SetValue($key,1,[Microsoft.Win32.RegistryValueKind]::DWord)
  20.             Write-Host "Key set. Please restart to complete the process."
  21.         } else {
  22.             Write-Host "Key already set. Abort."
  23.         }
  24.     } else {
  25.         Write-Host "Adapter wasn't found. Abort."
  26.     }
  27. } else {
  28.     Write-Host "Registry Folder wasn't found. Abort."
  29. }
  30. Write-Host "Press any key to continue..."
  31. $x = $host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement