Backup and Restore Realtek Audio Settings

Skip the read and jump straight to instructions. But note that this guide only applies to the UWP app Realtek Audio Console and does not apply to the legacy/classic Realtek Audio Manager.

Standard warning that the registry is sensitive. Mistakes can lead to data loss or Windows not functioning correctly. Use caution and do as directly told to avoid errors.

You may already be aware OEMs tend to not keep many drivers up-to-date. Audio is one of them that routinely gets left behind. A majority use Realtek chipsets. These drivers will be left out of date quickly as Windows updates. To get around this, a developer has taken it upon themselves to provide universal packages for all Realtek audio chipsets. You can find it on Github.

The downside to this is updates cannot be applied over. You must uninstall the current version (which does so cleanly) and then install the updated version. You do not need to update every single time there is an update published. You should instead update every 3 to 6 months or when you run into a bug. In doing this your audio settings are lost. If for any reason you decided to reinstall Windows, you can expect them to be lost during this as well. You may want these settings to restore during the setup process. And on the surface it appears these settings cannot be recovered or even backed up... but they can!

Discovery

I had been using a driver version that was a year old and noticed some bugs with a recent update. Upon following the directions to update, I had lost all settings. Those EQs I spent time fine tuning were gone. I rolled back to start digging into it. Here's what I found using some debug tools from SysInternals.

Navigate to

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\MMDevices\Audio\Render

and you will see all the IDs of your audio devices. (I already knew this existed since I had to edit these for VM reasons to make it look real.)

My device key was {e8aed749-b26a-4c53-bda5-4e02b213b3fa}. I can verify that by looking under theProperties key and finding Analog SPK Output in the right pane.

When you change the EQ with the GUI, under the FxProperties key, these entries changed:

  • {4b361010-def7-43a1-a5dc-071d955b62f7},5 = Default EQ is hex 0. Custom EQ is hex 3ff. This entry is like an On/Off switch for the EQ.

  • {4b361010-def7-43a1-a5dc-071d955b62f7},6 = The default EQ values vary between A 1 and A Z, but a large amount of values are in fact changing when you set a custom EQ. This is what is actually keeping your EQ retained.

You can't copy and paste values for the EQ or else the software bugs out. When looking at what the GUI does, you can see:

Registry value copy

This screenshot shows the GUI is pulling the EQ from a saved registry location, noted as \REGISTRY\A\, and then applying it to {4b361010-def7-43a1-a5dc-071d955b62f7},6. Just have to find out where that is. RtkUWP.exe has to get them from somewhere. They aren't in the default registry though. I searched for {59d407b5-1884-462f-d2f3-273cd65cf25f} in regedit and came up empty. Furthermore, since I had never seen this path before, I gave a look over SysInternals docs to see if there was anything I could find. The docs state this is a private hive. This SU question details that and how I came about learning of private hives. It doesn't, however, detail where private hives are. They can actually vary. It also appears like it could be an issue as the doc states:

In contrast to other types of registry hives, application hives are loaded under the \REGISTRY\A registry path name instead of under \REGISTRY\MACHINE or \REGISTRY\USER. The \REGISTRY\A path name is special in that there is no way to traverse this path, and an attempt to open a key under \REGISTRY\A will fail with error status STATUS_ACCESS_DENIED. The only way an application can access a key in an application hive is to use the handle to the root key of the application hive. The application gets this handle from the RegLoadAppKey call that loads the hive.

The good news is it wasn't and issue and the path the GUI was pulling from was a hint. LocalState is directory found in %LocalAppData%\Packages\<AppName>. I dug through these folders and found what I was after. The solution was in fact to load the private hive with the registry editor manually.

Scripted Method

I created this simple script that can backup and restore settings for you. Please read over it to learn more.

Scripted Method via EXE

If you prefer you can use this compiled EXE (made with AutoHotKey) that will download this script and run it for you. The benefit here is you do not have to change your execution policy. Here is the source code of that script contained in the EXE:

#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
Run PowerShell.exe -ExecutionPolicy Bypass -Command "Invoke-WebRequest -Uri "https://gist.githubusercontent.com/icedterminal/d77fd583603745ec89ab4eb9c4f895b2/raw/<version>/RTK_ImpExp.ps1" -OutFile "$env:temp\rtk.ps1"; cd $env:temp; ./rtk.ps1;"

Manual Back Up Settings

  1. Close Realtek Audio Console.

  2. Open regedit.

  3. Click HKEY_USERS.

  4. Click [File] > [Load hive...]

  5. Realteks private hive is settings.dat located at %LocalAppData%\Packages\RealtekSemiconductorCorp.RealtekAudioControl_dt26b99r8h8gj\Settings

  6. Give it a name. Such as rtk or realtek.

  7. From there you can export your EQ settings to a .reg file. Just right click on the key name EQ and export.

  8. UNLOAD THE HIVE! Click the name you gave the hive, and click [File] > [Unload hive]. This is important before you close regedit.

Loaded private hive

Manual Restore Settings

  1. Start Realtek Audio Console and then close it.

  2. Open regedit.

  3. Click HKEY_USERS.

  4. Click [File] > [Load hive...]

  5. Realteks private hive is settings.dat located at %LocalAppData%\Packages\RealtekSemiconductorCorp.RealtekAudioControl_dt26b99r8h8gj\Settings

  6. Give it a name. Such as rtk or realtek. You must give it the same name as you did during export.

  7. Double click the .reg file you made to import. Accept the prompt.

  8. UNLOAD THE HIVE! Click the name you gave the hive, and click [File] > [Unload hive]. This is important before you close regedit.

  9. Your settings will be restored. You may need to actually apply the EQ as I did. Default was selected.

Notes

This is very tedious but the only way to do it. This is the nature of it all.

Note that you can't copy just settings.dat and expect it to work. The app may crash on load, not read the settings at all, or overwrite it. I did test this and experienced the app crash and overwriting it. This stems from how the UWP system is permissions senstive. Also, values no one has clue what they are for may change per version and result in bugs.