A combined solution for audio popping/crackling before and after playback

I've just fixed audio popping/crackling before and after a sound is being played on a new ThinkPad X1. For me, no single solution found online worked, but a combination of them, which I'd like to share – may save someone a weekend. I think the solution can also be applied to any Realtek-based laptops.

The root cause

The root cause of audio popping/crackling before and after playback is not DPC latency or a faulty cable, but powering on and off the audio chip. For some reason, even in the max performance power plan, the Realtek driver puts the audio chip into sleep when nothing is playing. The switch theoretically saves some power, but the audable side effect of it is really annoying.

The fix

To fix the issue, we must disable idle power management in the audio driver. Moreover, we must make the tweak persistent – prevent re-setting it on system reboot.

1. Uninstall Dolby, if present

Dolby software (or should we call it bloatware?) takes over the audio management and therefore prevents any modifications. If you prefer silence in your headphones over bass boost, 3D sound and other effects, you have to uninstall it.

Reboot the system once it is done.

2. Use Microsoft High Definition Audio driver

Even without Dolby, the Realtek driver with faulty power management settings prevents the tweaking, so we must use the one provided by Microsoft instead. I personally haven't faced any audable consequences of this replacement.

  1. Open Device manager;
  2. Under "Sound, video and game controllers" (not "Audio inputs and outputs"), find "Realtek Audio" and open its preferences;
  3. Under the "Driver" tab, disable the device and then click "Update driver";
  4. In the driver update wizard, chose the "My computer" option for the first and the second time;
  5. On the driver list step, uncheck the "Only compatible" option;
  6. Now, in the left list of vendors select "Microsoft" and in the right one select the most recent version of "High Definition Audio Device";
  7. Proceed with the update and agree to the compatibility warning (the driver will work);
  8. Take off your headphones and reboot the system (the startup sound may be loud).

3. Tweak the power management

Now we are ready to tweak the idle power management of the audio driver. This method has been posted on various forums countless times.

  1. Once again, open Device manager, find "Realtek audio" and open its preferences;
  2. Under the "Details" tab, select "Class GUID" and copy the value (it is most likely to be {4d36e96c-e325-11ce-bfc1-08002be10318})
  3. Open Registry editor (Win + R -> regedit);
  4. Go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{XXX-XXX-XXX} where the value in the curly braces is the class GUID you've copied;
  5. Under this section, find a 000X-named subfolder having DriverDesc value equal to "High Definition Audio Device";
  6. Under its PowerSettings subfolder, edit both ConservationIdleTime and PerformanceIdleTime to be exactly 00 00 00 00 – this value disables idle power management;
  7. Reboot the system.

The result

Once you've completed the steps above, the popping/crackling must disappear. To check it, open the volume dialog and click the progress – you must hear only the Windows bell sound without any noise before or after it.

In the future, do not let Vantage or Windows Update install Realtek audio driver or Dolby.