HP Audio Fix - 夜莺博客

HP Audio Fix

原文:HP Audio Fix — theDXT (Daniel Keer)

Recently I came across an issue were multiple HP systems that had a fresh install of Windows 10 Pro 1703 from a known working ISO and then upgraded to 1709. Once on 1709 the audio drivers wouldn’t work at all and if you tried to install the correct driver from HP it still wouldn’t fix it. Even manually specifying the correct driver wouldn’t fix it. It’s possible that this issue isn’t solely linked to HPs, however they are the only ones I’ve seen with this issue so far.

Symptoms: no sound, and a control panel that lies to you

On the affected machines the failure is total rather than partial. There is no sound at all, the speaker icon in the notification area shows a red cross or a generic “no audio output device is installed” message, and the Playback devices list is empty. Nothing appears in Sound settings, so there is no output device to select as default and no volume slider to move.

What makes the problem so confusing is that the driver appears to be installed. Device Manager shows the High Definition Audio Controller with a plausible Microsoft driver version, the HP driver package installs without producing an error, and Windows Update reports the machine is fully patched. The audio stack simply never comes up.

If you open Device Manager and expand System devices, you will normally find one or two entries flagged with the yellow warning triangle. The most common offender is the High Definition Audio Controller — the Microsoft UAA (Universal Audio Architecture) bus driver — and it is sometimes joined by a second controller entry that represents the HDMI or DisplayPort audio path. Because the two functions share the same bus driver, fixing one usually fixes both, but only if the root cause is addressed rather than the individual device.

I’ve noticed this issue on the following HP systems:

  • HP EliteDesk 800 G1 SFF
  • HP ProDesk 400 G4 SFF
  • HP 280 G2 SFF

Device manager will either show one or two drivers under system devices as having issues and no devices will show up in playback devices.

Image 1Image 2

Why the driver keeps reinstalling itself

The issue seems to be that the Windows thinks the High Definition Audio Controller is the correct driver when it’s not. Uninstalling the devices from device manager doesn’t work either. I think it’s because the registry basically has the drivers hardcoded. What I think is happening is that Windows sees the audio device’s hardware id and then matches it against the registry and the registry points it back to the same problematic driver .inf file, so you end up in an endless loop of always installing the same driver.

To understand why uninstalling the device in Device Manager changes nothing, it helps to separate the two places a driver lives on a Windows system. The first is the Driver Store, the protected repository at C:\Windows\System32\DriverStore\FileRepository that holds the actual driver packages and their INF files. The second is the service registration in the registry, which tells the Plug and Play (PnP) manager how to load a driver and under which group and load order it should start.

When you uninstall a device through Device Manager, Windows removes the device instance and the reference to its driver package, but it does not necessarily remove the associated service key. The HDAudBus service key is therefore left behind, still describing the Microsoft UAA bus driver and still mapped to the audio hardware IDs that the machine presents. Because the PnP manager resolves a device by matching its hardware ID against an installed driver, and because the surviving service key points straight back at the same INF, Windows re-associates the controller with the same non-working driver the moment it re-enumerates the hardware. That is the endless loop.

The problem was first reproduced after an in-place upgrade from Windows 10 1703 to 1709, which suggests the upgrade migrated the service entry in a way that no longer matched the audio silicon on these platforms. Deleting the device in Device Manager — even with the “delete the driver software for this device” checkbox ticked — is not enough, because the loop is anchored in the service key rather than in the device instance.

The fix: delete the HDAudBus service key

The fix is amazingly simple, you just need to delete the HDAudBus key from the registry which is located at HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\HDAudBus

If you’re not comfortable deleting things out the registry I highly recommend that you backup the key before deleting it and even creating a system restore point. As you can really mess up Windows if you delete the wrong thing. I am not responsible for any damages you cause to your system.

Once you delete that key and reboot, Windows should just pick up the correct driver automatically. In the event that it doesn’t just download the drivers from HP. You’ll need the Intel HD Graphics driver as one of the audio drivers is for audio over HMDI or DisplayPort. The second driver you will need is the Realtek Audio driver which manages the audio for the headphone jacks.

If you make a .reg file with the code below you can just run the .reg file and it will delete the registry key for you.

Windows Registry Editor Version 5.00
[-HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\HDAudBus]

Back the key up before you delete it

Deleting a service key is reversible, but only if you exported it first. Do this before you touch anything, and keep the export somewhere other than the machine you are repairing — a USB stick or a network share is ideal, because if the machine will not boot afterwards you will not be able to read the file from its own desktop.

The quickest way to export the key is from an elevated command prompt:

reg export "HKLM\SYSTEM\CurrentControlSet\Services\HDAudBus" %USERPROFILE%\Desktop\HDAudBus-backup.reg /y

If you prefer a GUI, open regedit.exe, navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\HDAudBus, right-click the key, choose Export, select Selected branch and save the file. A restore point gives you a second safety net and is worth taking even on a fresh build:

powershell -Command "Checkpoint-Computer -Description 'Before HDAudBus fix'"

With the export in hand, delete the key. You can right-click the HDAudBus key in regedit and choose Delete, or run the single-line .reg file shown above. The leading minus sign in [-HKEY_LOCAL_MACHINE\...] is what tells the Registry Editor to remove the key and everything beneath it rather than create it, so double-check the path before you run the file.

Verifying the fix

After you’ve applied the fix device manager should now have two devices under Sounds, video and game controllers, the High Definition Audio Controller will no longer display an error, and you’ll see one or two devices in your

Image 3

A full check takes about a minute. Confirm each of the following in turn:

  • Device Manager — no yellow warning triangles remain under System devices or Sound, video and game controllers.
  • Playback devices — at least one output, typically Speakers (Realtek High Definition Audio), is present and enabled.
  • Sound settings — select the device, click Test, and confirm you hear the test tone.
  • HDMI / DisplayPort audio — if the monitor has speakers, the Intel HD Graphics audio endpoint should now also appear once the graphics driver is installed.

If any of those are missing, the most likely cause is that one of the two complementary drivers has not been installed yet: the Intel HD Graphics driver supplies audio over HDMI and DisplayPort, and the Realtek Audio driver supplies the analogue jacks. Install both, then reboot.

If the fix doesn’t stick

Occasionally the key is present again after a reboot, or the controller re-appears with the same warning. Work through the following in order:

  • Confirm the key is actually gone before you reboot. Open an elevated command prompt and run reg query "HKLM\SYSTEM\CurrentControlSet\Services\HDAudBus". An error saying the system cannot find the path means the delete succeeded; a listing of values means it did not.
  • Stop the service first, then delete. If the service is still running, a pending file operation can restore it. Use sc stop HDAudBus before removing the key.
  • Clear the offending package from the Driver Store. List installed third-party packages with pnputil /enum-drivers and remove any duplicated or superseded audio bus package with pnputil /delete-driver oemNN.inf /uninstall /force, substituting the oemNN.inf name that pnputil reports.
  • Reinstall the vendor driver pair. Install the Intel HD Graphics driver and the Realtek Audio driver from the HP support page for the exact model, then reboot.
  • Check the BIOS. Some of these platforms shipped with the HD Audio device disabled in the BIOS setup, or with a firmware revision that enumerated the audio controller incorrectly. Confirm that Onboard Audio is enabled and update the BIOS to the latest revision for the model before spending more time in the OS.
sc stop HDAudBus
reg delete "HKLM\SYSTEM\CurrentControlSet\Services\HDAudBus" /f
pnputil /enum-drivers

The problematic key, for reference

If you’re curious about the registry key you are deleting here’s an export of the problematic HDAudBus registry key. (the contents of the key will vary per system but at the core it’s still the same)

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\HDAudBus]
"ImagePath"=hex(2):5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,\
74,00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,64,00,72,\
00,69,00,76,00,65,00,72,00,73,00,5c,00,48,00,44,00,41,00,75,00,64,00,42,00,\
75,00,73,00,2e,00,73,00,79,00,73,00,00,00
"Type"=dword:00000001
"Start"=dword:00000004
"ErrorControl"=dword:00000001
"Group"="Extended Base"
"Tag"=dword:00000005
"DisplayName"="@hdaudbus.inf,%HDAudBus.SVCDESC%;Microsoft UAA Bus Driver for High Definition Audio"
"Owners"=hex(7):68,00,64,00,61,00,75,00,64,00,62,00,75,00,73,00,2e,00,69,00,6e,\
00,66,00,00,00,00,00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\HDAudBus\Parameters]
"WppRecorder_TraceGuid"="{b3a109ec-1cb3-4947-95ed-431033eeb1b4}"
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\HDAudBus\Parameters\Wdf]
"WdfMajorVersion"=dword:00000001
"WdfMinorVersion"=dword:00000007
"TimeOfLastTelemetryLog"=hex(b):41,e8,81,a3,d4,9b,d3,01
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\HDAudBus\Enum]
"0"="PCI\\VEN_8086&DEV_0C0C&SUBSYS_1998103C&REV_06\\3&11583659&1&18"
"Count"=dword:00000002
"NextInstance"=dword:00000002
"1"="PCI\\VEN_8086&DEV_8C20&SUBSYS_1998103C&REV_04\\3&11583659&1&D8"

The Enum subkey is the giveaway. It records the exact PCI hardware IDs (VEN_8086&DEV_0C0C and VEN_8086&DEV_8C20 in this example) that the audio controller reports, which is exactly the information the PnP manager uses to bind a driver. As long as that subkey survives, Windows will keep binding the same driver.

Modern notes: Windows 10 22H2 and Windows 11

This article was originally written for the Windows 10 1703 to 1709 upgrade, but the underlying mechanism has not changed. On Windows 10 22H2 and Windows 11 the same loop can still occur after a feature update, after a cloned or imaged deployment, or after a third-party driver utility has replaced the Microsoft audio bus driver. The fix is identical: back up and remove the HDAudBus service key, reboot, and let Windows rebuild the audio stack.

Two practical differences are worth knowing. First, on newer builds Windows Update will usually replace the Microsoft UAA driver automatically within a few minutes of the reboot, so give it time and a working network connection before manually installing vendor packages. Second, if the machine is managed by an update pipeline, keep in mind that a scheduled update may reinstall an affected package; see our guide to scripting Windows updates with PowerShell if you need to control when driver updates land. On servers or VMs, driver servicing can also be affected by licensing and virtualisation settings, which is why we cover slmgr and VBS configuration separately. If you look after many of these workstations, remote endpoint management through Windows Admin Center with SSO makes it far easier to push the correct driver set before users ever notice the problem.

Summary

An HP desktop that loses all audio after a Windows feature upgrade is almost always a driver-binding problem rather than a hardware fault. The Microsoft UAA bus driver’s service key survives a Device Manager uninstall, so Windows binds the same broken driver again and again, and the Playback devices list stays empty. Export the HDAudBus key for safety, delete it with reg delete or a one-line .reg file, reboot, and let Windows re-enumerate the audio controller. Install the Intel HD Graphics driver for HDMI audio and the Realtek Audio driver for the analogue jacks, and the machine is back to a working state.