Realtek HD Audio: Failed to uninstall the device

The Realtek HD Audio sound card was not showing up in Windows Mixer. When I tried to uninstall the driver, it said "Failed to uninstall the device".

Here's how I fixed it:

  1. Go to Device Manager
  2. Look at the properties of the uninstallable device, in the "Details" tab, write down the string you see (eg. HDAUDIO\FUNC_01&VEN_10EC&DEV_0888&SUBSYS_8086D608& REV_1000\4&3ACC46D&080201)
  3. In Registry Editor, go to HKEY_LOCAL_MACHINE\System\CurrentControlSet\Enum
  4. You should be able to find a folder that matches this string. In this case, I found a folder called "Func"
  5. WARNING: You are about to delete this folder from the registry, make sure you back it up first!
  6. I deleted the folder below "Func"
  7. Then I restarted the computer and it reinstalled the Realtek driver