/
/

How to Backup and Restore GPU Preferences for Apps in Windows 10

How to Backup and Restore GPU Preferences for Apps in Windows 10 blog banner image

Windows has made it easier for users to manage how applications utilize Graphics Processing Unit (GPU) resources. The operating system also allows users to choose which GPU an app should use. All these are made possible by Windows’ GPU preferences. Graphics Performance Preference in Windows 10/11 is a management feature that enables users to define GPU usage on a per-application basis for systems with multiple GPUs (e.g., Intel + NVIDIA). These preferences override automatic selection and are stored in the Windows Registry.

Since the settings override automatic selection, backing up GPU preferences for apps is crucial. This is a vital step, especially when you’re migrating to a new system, reinstalling Windows, or managing multiple endpoints in a business environment. Backing up GPU preferences for apps also ensures consistent performance settings across endpoints, which is ideal for managed environments using scripting or GPO deployment.

In this guide, we will walk you through the process of backing up and restoring GPU preferences for apps.

How to backup GPU preferences

Specific requirements need to be met before managing GPU preferences.

  • Windows version: Windows 10 version 1803 or later (GPU settings via the Settings UI were introduced in 1803)
  • Administrator privileges: Needed to modify registry entries and run command-line operations.
  • Windows Registry Editor or PowerShell expertise: The process requires technical-level expertise in navigating Windows Registry Editor or PowerShell.

Method 1: Using Registry Editor

  1. Open the Registry Editor by pressing the Windows key + R. Type regedit and hit Enter.
  2. Navigate to: HKEY_CURRENT_USER\Software\Microsoft\DirectX\UserGpuPreferences
  3. Right-click on UserGpuPreferences.
  4. Select Export.
  5. Choose a safe location, name the file (e.g., GPU_Prefs_Backup.reg), and save it.

Method 2: Using Command Line

  1. Open the Command Prompt as Administrator by pressing the Windows key + R. Type cmd, and press Ctrl + Shift + Enter.
  2. Run the following command:
    • reg export “HKCU\Software\Microsoft\DirectX\UserGpuPreferences” “C:\Backup\GPU_Prefs.reg” /y
  3. This command saves the registry key directly to a backup file at the specified path.

How to restore GPU preferences

Before starting any method below, ensure you’ve met the requirements for managing GPU preferences stated in the previous section.

Method 1: Using Registry Editor

  1. Locate your saved .reg backup file.
  2. Double-click the file.
  3. Accept the User Account Control (UAC) prompt.
  4. Confirm the registry merge when prompted.

Method 2: Using Command Line

  1. Open the Command Prompt as Administrator by pressing the Windows key + R. Type cmd, and press Ctrl + Shift + Enter.
  2. Run the following command:
    • reg import “C:\Backup\GPU_Prefs.reg”

⚠️ IMPORTANT: Restoring this on a different system only works if the app paths are identical. For consistency, ensure app installation directories match.

How GPU preferences are stored

GPU preference data is stored in the registry under this path:

    • HKEY_CURRENT_USER\Software\Microsoft\DirectX\UserGpuPreferences

Meanwhile, each entry is a string key-value pair where the key is the full path to the application, and the value specifies the GPU configuration:

  1. GpuPreference=1; → Use the power-saving GPU (typically the integrated Intel GPU).
  2. GpuPreference=2; → Use the high-performance GPU (typically a discrete NVIDIA or AMD GPU).
  3. GpuPreference=0; → Let Windows decide (system default).

Scripting and deployment notes

  • IT administrators can automate preference backup and deployment using PowerShell or batch scripts with reg.exe. This can save time that can be used for other important initiatives.
  • Backing up and restoring GPU preferences for apps is suitable for use with login scripts, GPO Scheduled Tasks, or SCCM task sequences.
  • Example (PowerShell):
    • $gpuPrefsKey = “HKCU:\Software\Microsoft\DirectX\UserGpuPreferences” Export-RegistryFile -Path $gpuPrefsKey -Destination “C:\Backup\gpu.reg”
    • PowerShell does not natively support exporting single registry keys. Use reg export or third-party modules if needed.

NOTE: Running this without such a module will result in: Export-RegistryFile : The term ‘Export-RegistryFile‘ is not recognized…

Limitations and considerations

While you might attain desired results if you backup and restore GPU preferences for apps, the operation still has limitations and considerations, such as:

  • App compatibility: The process applies only to Win32 applications and UWP apps that support GPU selection.
  • Driver behavior: Some apps may ignore GPU preferences depending on driver implementation.
  • User-specific: Preferences are user-specific; exporting from one user context will not apply to another unless explicitly handled.

Managing backup and restore of GPU preferences for apps

Backing up GPU preferences enables reproducible graphics configurations. This process is crucial for workflows that involve system migration, installs, and enforcement of GPU policies, among other things. Admins can integrate registry export/import into larger configuration management workflows through automation. This can significantly save time and ensure reliable performance standards.

One factor to consider when backing up and restoring GPU preferences is ensuring paths are consistent across systems to maintain preference integrity. Another is always testing on a sample system before mass deployment. With careful preparation, you can streamline GPU management and focus on keeping systems optimized for peak performance.

You might also like

Ready to simplify the hardest parts of IT?
×

See NinjaOne in action!

By submitting this form, I accept NinjaOne's privacy policy.

NinjaOne Terms & Conditions

By clicking the “I Accept” button below, you indicate your acceptance of the following legal terms as well as our Terms of Use:

  • Ownership Rights: NinjaOne owns and will continue to own all right, title, and interest in and to the script (including the copyright). NinjaOne is giving you a limited license to use the script in accordance with these legal terms.
  • Use Limitation: You may only use the script for your legitimate personal or internal business purposes, and you may not share the script with another party.
  • Republication Prohibition: Under no circumstances are you permitted to re-publish the script in any script library belonging to or under the control of any other software provider.
  • Warranty Disclaimer: The script is provided “as is” and “as available”, without warranty of any kind. NinjaOne makes no promise or guarantee that the script will be free from defects or that it will meet your specific needs or expectations.
  • Assumption of Risk: Your use of the script is at your own risk. You acknowledge that there are certain inherent risks in using the script, and you understand and assume each of those risks.
  • Waiver and Release: You will not hold NinjaOne responsible for any adverse or unintended consequences resulting from your use of the script, and you waive any legal or equitable rights or remedies you may have against NinjaOne relating to your use of the script.
  • EULA: If you are a NinjaOne customer, your use of the script is subject to the End User License Agreement applicable to you (EULA).