Skip to content

Instantly share code, notes, and snippets.

@kfchou
Last active June 15, 2023 14:07
Show Gist options
  • Select an option

  • Save kfchou/2ebbfe3f0340e1bb3a0f40501a566298 to your computer and use it in GitHub Desktop.

Select an option

Save kfchou/2ebbfe3f0340e1bb3a0f40501a566298 to your computer and use it in GitHub Desktop.
Fix Audio Rendering Error in Windows 10
# Disable sound controller
Disable-PnpDevice -InstanceId "your_sound_controller_instance_id" -Confirm:$false

# Wait for a few seconds (adjust the time if needed)
Start-Sleep -Seconds 5

# Enable sound controller
Enable-PnpDevice -InstanceId "your_sound_controller_instance_id" -Confirm:$false

Finding your sound controller instance ID

To use this script, you'll need to provide the instance ID of your sound controller. Here's how you can find it:

  1. Press Win + X and select "Device Manager" from the menu.
  2. In the Device Manager window, expand the "Sound, video and game controllers" category.
  3. Right-click on your sound controller and select "Properties."
  4. In the Properties window, go to the "Details" tab.
  5. From the "Property" drop-down list, select "Device Instance Path".
  6. The instance ID will be displayed in the "Value" box. It typically starts with "PCI" or "HDAUDIO".

Once you have the instance ID, replace "your_sound_controller_instance_id" in the script with your actual instance ID.

Save the script with a .ps1 extension, such as sound_controller_reset.ps1.

Running the script

  1. Press Win + X and select "Windows PowerShell" (or "Windows PowerShell (Admin)" if you want to run as an administrator).
  2. In the PowerShell window, navigate to the directory where you saved the script using the cd command. For example: cd C:\Scripts.
  3. Run the script by entering its name (including the extension). For example: .\sound_controller_reset.ps1.

Please note that running PowerShell scripts requires administrative privileges. If you receive an error related to execution policy, you may need to change the execution policy by running PowerShell as an administrator and executing the following command: Set-ExecutionPolicy RemoteSigned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment