Orbmu2k/nvidiaProfileInspector · error · NvapiException
DRS_RestoreAllDefaults
Error message
DRS_RestoreAllDefaults
What it means
NvapiException("DRS_RestoreAllDefaults", status) is thrown when the driver-wide DRS_RestoreAllDefaults call fails, aborting a reset of ALL driver profiles to factory defaults. Because this operation is destructive and non-granular, a partial failure can leave the settings store in an intermediate state.
Solutions
- Close NVIDIA Control Panel and other DRS clients, then retry the reset
- Run the application as administrator
- Update/reinstall the NVIDIA driver if the settings database is corrupted (nvdisps corruption)
- As a granular fallback, reset individual profiles via ResetProfile instead of all at once
- Catch NvapiException and warn the user which phase failed; check whether settings were partially reset
Example fix
// before
settingsService.ResetAllProfiles();
// after
try { settingsService.ResetAllProfiles(); }
catch (NvapiException ex)
{
Log.Error($"RestoreAllDefaults failed: {ex.Status}");
MessageBox.Show("Reset failed. Your settings may be partially restored.");
} Defensive patterns
Strategy: try-catch
Try / catch
try
{
settingsService.ResetAllProfiles();
}
catch (NvapiException ex)
{
Log.Error($"RestoreAllDefaults failed: {ex.Status}");
WarnUserOfPartialReset();
} Prevention
- Warn users that reset affects ALL profiles and get confirmation
- Close other DRS clients before resetting
- Run elevated for the destructive reset
- Offer per-profile ResetProfile as a granular, safer alternative
- Verify driver store health (settings load) before attempting a full reset
When it happens
Trigger: ResetAllProfilesInternal runs RunDrsInitProcess, opens a global DrsSession, and calls nvw.Instance.DRS_RestoreAllDefaults(hSession); any non-NVAPI_OK result throws at DrsSettingsService.cs:244 before SaveSettings is reached.
Common situations: Driver settings store corrupted, so the driver cannot enumerate and reset all profiles; another application (NVIDIA Control Panel) holds the store concurrently; insufficient permissions for the destructive reset; driver update in progress.
Related errors
- NvapiAddApplicationException(appName)
- DRS_CreateSession
- DRS_LoadSettings
- DRS_DestroySession
- DRS_DeleteProfile
AI-assisted analysis of Orbmu2k/nvidiaProfileInspector@2f50c388b3 (2026-09-15).
Data as JSON: /api/errors/ebdfb7148f376a32.
Report an issue: GitHub.
Appendix: source
Thrown at nvidiaProfileInspector/Common/DrsSettingsService.cs:244
{
var hProfile = CreateProfile(hSession, profileName);
if (applicationName != null)
AddApplication(hSession, hProfile, applicationName);
SaveSettings(hSession);
});
}
public void ResetAllProfilesInternal()
{
RunDrsInitProcess();
DrsSession((hSession) =>
{
var nvRes = nvw.Instance.DRS_RestoreAllDefaults(hSession);
if (nvRes != NvAPI_Status.NVAPI_OK)
throw new NvapiException("DRS_RestoreAllDefaults", nvRes);
SaveSettings(hSession);
});
}
public void ResetProfile(string profileName, out bool removeFromModified)
{
bool tmpRemoveFromModified = false;
DrsSession((hSession) =>
{
var hProfile = GetProfileHandle(hSession, profileName);
var profile = GetProfileInfo(hSession, hProfile);
if (profile.isPredefined == 1)
{
var nvRes = nvw.Instance.DRS_RestoreProfileDefault(hSession, hProfile);
if (nvRes != NvAPI_Status.NVAPI_OK)
throw new NvapiException("DRS_RestoreProfileDefault", nvRes);
View on GitHub (pinned to 2f50c388b3)