Skip to content

Instantly share code, notes, and snippets.

@JPersson77
Last active December 5, 2025 23:27
Show Gist options
  • Select an option

  • Save JPersson77/91a5c53af55104a2bfc5c9be32118203 to your computer and use it in GitHub Desktop.

Select an option

Save JPersson77/91a5c53af55104a2bfc5c9be32118203 to your computer and use it in GitHub Desktop.
nVAppAppApp - workaround NVIDIA DLSS4 whitelisting
<# Workaround for NVIDIA's DLSS4 whitelisting
-------- WHAT IS THE BACKSTORY? --------
DLSS4 was launched alongside the RTX 5000 series and comprise several new and interesting
features, f.e. additional presets for Super Resolution, using a newer Transformer model.
Arguably these features increase image quality significantly. To various degrees these
features are also available for older RTX cards, and older games using DLSS3/2.
Using third party apps like DLSS Swapper etc remains a convenient way to, on a manual basis,
swap out DLLs which contain the above mentioned functionality, per game. Downsides to this is
primarily that swapping out DLLs for online multi-player games may trigger an Anti-Cheat
system, and there is of course also some manual work of updating to newer versions/DLLs.
With the launch of DLSS4 nVidia has taken steps to integrate some functionality in their
NVIDIA App to also let the user "swap" DLSS versions manually. This is in theory nice as it
allows for games to automatically be updated to the latest and greatest by driver updates.
Plus, it means that DLLs aren't actually "swapped" since it is done by a dynamic loading
mechanism, which should mean that DLSS versions CAN be switched for (many) online multi-
player games.
BUT NVIDIA's implementation is too restrictive.
You may have noticed how DLSS4 can not be enabled for all games using DLSS3/2 in NIVIDIA APP.
This is because nVidia decided to implement the features using a whitelisting mechanism.
I.e. the feature can only be enabled on games deemed "supported" by nVidia. There are
actually good reasons for nVidia to implement a whitelisting system, for example to ensure
that DLSS4 provides a good image quality in "supported" games, and to avoid potentially
triggering Anti-Cheat systems for online multi-player games.
Meanwhile, it is possible to use nVidia Profile Inspector, and similar tools, to set the
global profile and/or or per game, to use the updated DLLs and thus force DLSS4 features on all/
select games. Unfortunately, NVIDIA App is rather controlling about this and will reverse
these changes for "unsupported" games when the app is launched or when an unsupported game
is launched.
A workaround currently is to not install NVIDIA App, and instead only use nVidia Profile
Inspector. I personally find the overlay and RTX HDR worth keeping NVIDIA App installed for.
It may eventually also become mandatory to have nVIDIA App installed.
-------- WHAT DOES THIS SCRIPT DO? --------
This script will override/deactivate the DLSS whitelisting as explained above, so that
you can enable DLSS4 for all games using nVidia Profile Inspector or NVIDIA APP
-------- HOW DO I USE THE SCRIPT? --------
The script below is a powershell (v5.1+) script which the user should run once, and
then also when upgrading GPU-driver.
Once the script is running you will be presented with three options:
1. Driver upgrade - use this when upgrading GPU-drivers
2. Run script - run this to immediately patch the necessary files.
3. Quit - Exit the menu and quit the script
Typically you should run the script and select option 1 when updating GPU-driver. Run the script
before starting the driver installation and follow the on-screen guide/instruction.
If you are not (re-)installing a driver you should select option 2.
-------- FAQ --------
Q: Why do I need to run this script as administrator?
A: For the script to be able to restart two nVidia services
Q: Will the DLSS4 override trigger Anti-Cheat warnings for online multiplayer?
A: It should not since the script uses NVIDIA built-in functionality. I tried it with Space
Marines 2. Helldiver 2, Battlefield 2042 and 6 without issues.
Q: Why does the screen go black for a second or two when running the script?
A: This happens when the NIVIDIA services restart and is normal.
Q: Why do I get an error message about "unsigned script" when executing the script in Powershell?
A: By default an unsigned script (like nVAppAppApp.ps1) downloaded to your local machine can
not be executed - for security reasons. It is possible to change this on your machine with
a temporary bypass or by setting a permanent override.
To do a temporary workaround execute this in Powershell: `Set-ExecutionPolicy bypass`
To set a permanent override please execute this in Powershell AS ADMIN: `Set-ExecutionPolicy unrestricted`,
followed by `Unblock-File .\nVAppAppApp.ps1`
Q: What does the script actually do?
A: The script removes "Read-Only" property on files "ApplicationStorage.json" (contains settings for detected games) and
"fingerprint.db" (origin file for override settings), then modifies the files to remove the override restrictions put
in place by NVIDIA APP. Then sets "fingerprint.db" to "Read-Only" and restarts two nVidia services
-------- CHANGELOG --------
Version 2
- UTF-8 w/o BOM
Version 3
- Modify the override origin file (fingerprint.db)
- Changed modus operandi - run the script after reinstalling driver
Version 4 (2025-02-25)
- No change to the actual script. It works good and the effects seem to persist even
through driver installs.
- Added notes on how to allow PowerShell to run local scripts
Version 5 (2025-03-10)
- Added a user friendly menu with three options.
1. Driver upgrade. Run the script before installing a new driver and follow the isntructions.
2. Run the script (same functionality as before)
3. Quit
Version 5 (2025-11-15)
- Updated script to reflect changes by NVIDIA in driver version 581.80
- Updated this readme
#>
#Requires -Version 5.1
$RootPath = "$Env:USERPROFILE\AppData\Local\NVIDIA Corporation\NVIDIA app\NvBackend\"
$AppStorageJsonPath = "$Env:USERPROFILE\AppData\Local\NVIDIA Corporation\NVIDIA app\NvBackend\ApplicationStorage.json"
$Utf8NoBomEncoding = New-Object System.Text.UTF8Encoding $False
#region Initial Checks
function Check-AdminRights {
$currentPrincipal = New-Object Security.Principal.WindowsPrincipal([Security.Principal.WindowsIdentity]::GetCurrent())
return $currentPrincipal.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)
}
$isAdmin = Check-AdminRights
if (-not $isAdmin) {
Write-Host "`nWARNING: Not running with administrator privileges" -ForegroundColor DarkRed
Write-Host "Service restarts will fail. To ensure full functionality:" -ForegroundColor Gray
Write-Host "Right-click PowerShell and select 'Run as administrator'`n" -ForegroundColor Gray
Start-Sleep -Seconds 5
}
#endregion
function Show-Header {
Clear-Host
Write-Host "`n"
Write-Host "========================================================" -ForegroundColor Green
Write-Host " NVIDIA DLSS4 Whitelist Workaround Script " -ForegroundColor Black -BackgroundColor Green
Write-Host "========================================================" -ForegroundColor Green
Write-Host "`n"
}
function Run-Script {
# Find all fingerprint.db files under the root folder
$FingerprintFiles = Get-ChildItem -Path $RootPath -Filter "fingerprint.db" -Recurse -ErrorAction SilentlyContinue
# Modify ApplicationStorage.json
Set-ItemProperty -Path $AppStorageJsonPath -Name IsReadOnly -Value $false
Write-Host "`n Modifying ApplicationStorage.json..." -ForegroundColor White
$contents = (Get-Content $AppStorageJsonPath )
$contents = $contents.Replace('"Disable_FG_Override":true', '"Disable_FG_Override":false')
$contents = $contents.Replace('"Disable_RR_Override":true', '"Disable_RR_Override":false')
$contents = $contents.Replace('"Disable_SR_Override":true', '"Disable_SR_Override":false')
$contents = $contents.Replace('"Disable_RR_Model_Override":true', '"Disable_RR_Model_Override":false')
$contents = $contents.Replace('"Disable_SR_Model_Override":true', '"Disable_SR_Model_Override":false')
[System.IO.File]::WriteAllLines($AppStorageJsonPath, $contents, $Utf8NoBomEncoding)
# Modify fingerprint.db
foreach ($file in $FingerprintFiles) {
Write-Host "`n Modifying $($file.FullName)..." -ForegroundColor White
Set-ItemProperty -Path $file.FullName -Name IsReadOnly -Value $false
$contents = (Get-Content $file.FullName)
$contents = $contents.Replace('<Disable_FG_Override>1</Disable_FG_Override>', '<Disable_FG_Override>0</Disable_FG_Override>')
$contents = $contents.Replace('<Disable_RR_Model_Override>1</Disable_RR_Model_Override>', '<Disable_RR_Model_Override>0</Disable_RR_Model_Override>')
$contents = $contents.Replace('<Disable_RR_Override>1</Disable_RR_Override>', '<Disable_RR_Override>0</Disable_RR_Override>')
$contents = $contents.Replace('<Disable_SR_Model_Override>1</Disable_SR_Model_Override>', '<Disable_SR_Model_Override>0</Disable_SR_Model_Override>')
$contents = $contents.Replace('<Disable_SR_Override>1</Disable_SR_Override>', '<Disable_SR_Override>0</Disable_SR_Override>')
[System.IO.File]::WriteAllLines($file.FullName, $contents, $Utf8NoBomEncoding)
Set-ItemProperty -Path $file.FullName -Name IsReadOnly -Value $true
}
# Restart services (requires admin rights)
if ($isAdmin)
{
try {
Write-Host "`n Restarting NVIDIA services..." -ForegroundColor White
Restart-Service -Force -Name "NVDisplay.ContainerLocalSystem" -ErrorAction Stop
Restart-Service -Force -Name "NvContainerLocalSystem" -ErrorAction Stop
Write-Host "`n Services restarted successfully" -ForegroundColor Green
}
catch {
Write-Host "`n ERROR: Failed to restart services" -ForegroundColor DarkRed
Write-Host " Details: $_" -ForegroundColor DarkRed
}
}
else {
Write-Host "`n WARNING: Services not restarted" -ForegroundColor DarkRed
Write-Host " Run as administrator for complete functionality" -ForegroundColor DarkRed
}
Write-Host "`n Operation completed!`n" -ForegroundColor Black -BackgroundColor Green
}
# Display menu
do {
Show-Header
Write-Host " MAIN MENU" -ForegroundColor Green
Write-Host "--------------------------------------------------------" -ForegroundColor Green
Write-Host " 1. Start driver upgrade mode" -ForegroundColor White
Write-Host " - Prepares for driver update" -ForegroundColor DarkGray
Write-Host " - Patches files after confirmation" -ForegroundColor DarkGray
Write-Host "`n 2. Run script immediately" -ForegroundColor White
Write-Host " - Patch files directly" -ForegroundColor DarkGray
Write-Host "`n 3. Exit" -ForegroundColor White
Write-Host " - Quits the tool" -ForegroundColor DarkGray
Write-Host "--------------------------------------------------------" -ForegroundColor Green
$choice = Read-Host "`n Please enter your choice (1-3)"
switch ($choice) {
'1' {
Show-Header
Write-Host " DRIVER UPGRADE MODE" -ForegroundColor Green
Write-Host "--------------------------------------------------------" -ForegroundColor Green
# Find all fingerprint.db files under the root folder
$FingerprintFiles = Get-ChildItem -Path $RootPath -Filter "fingerprint.db" -Recurse -ErrorAction SilentlyContinue
foreach ($file in $FingerprintFiles) {
Set-ItemProperty -Path $file.FullName -Name IsReadOnly -Value $false -ErrorAction SilentlyContinue
}
Write-Host "`n Read-only attribute removed from all fingerprint.db" -ForegroundColor White
Write-Host "`n Perform your driver upgrade now!" -ForegroundColor White
Write-Host "`n Press any key AFTER the driver is installed and NVIDIA APP has self-updated (as applicable) ..." -ForegroundColor White
$null = $Host.UI.RawUI.ReadKey('NoEcho,IncludeKeyDown')
Run-Script
pause
}
'2' {
Show-Header
Write-Host " PATCHING FILES" -ForegroundColor Green
Write-Host "--------------------------------------------------------" -ForegroundColor Green
Run-Script
pause
}
'3' {
Show-Header
Write-Host " Exiting... Thank you for using the tool!" -ForegroundColor Gray
Start-Sleep -Seconds 2
exit
}
default {
Write-Host "`n Invalid selection. Please choose 1, 2, or 3." -ForegroundColor DarkRed
Start-Sleep -Seconds 2
}
}
} while ($true)
@JPersson77
Copy link
Author

Hi @AlexandreBourrieau assuming you are using the "Driver upgrade mode" of the most recent script. NvApp crashed for me in relation to installing 572.83 as well. NvApp automatically launched after installation finished, but with a blocking error message (a dialog). Since NvApp launched immediately after driver install I did not have the the time to reapply the patch before NvApp launched.

It is unclear why the error message appeared at this point as the relevant files were at this time write-enabled (and they were indeed overwritten by the installer). My next step was to manually install NVIDIA_app_beta_v11.0.3.213, while still not having let the script patch files. I then received a similar error message while installing NvApp manually. However closing the error message etc and launching NvApp manually worked fine after this with no adverse effects noted. At this point I applied the patch again. It was now too late though for the patch and so I had to redo all my custom settings in NVPI (which is mostly just restoring the profiles NvApp creates to default)

So yeah I have a similar experience. I agree it seems plausible the script may have something to do with it, but then I don't know how/why since the idea of the "driver upgrade mode" is to remove the write-protection and ensure that the nvidia/nvapp installer can overwrite the files (which it did)

@AlexandreBourrieau
Copy link

AlexandreBourrieau commented Mar 24, 2025

Hi @AlexandreBourrieau assuming you are using the "Driver upgrade mode" of the most recent script. NvApp crashed for me in relation to installing 572.83 as well. NvApp automatically launched after installation finished, but with a blocking error message (a dialog). Since NvApp launched immediately after driver install I did not have the the time to reapply the patch before NvApp launched.

It is unclear why the error message appeared at this point as the relevant files were at this time write-enabled (and they were indeed overwritten by the installer). My next step was to manually install NVIDIA_app_beta_v11.0.3.213, while still not having let the script patch files. I then received a similar error message while installing NvApp manually. However closing the error message etc and launching NvApp manually worked fine after this with no adverse effects noted. At this point I applied the patch again. It was now too late though for the patch and so I had to redo all my custom settings in NVPI (which is mostly just restoring the profiles NvApp creates to default)

So yeah I have a similar experience. I agree it seems plausible the script may have something to do with it, but then I don't know how/why since the idea of the "driver upgrade mode" is to remove the write-protection and ensure that the nvidia/nvapp installer can overwrite the files (which it did)

Thanks you, it's a bit confusing for me I do not know how to do but thanks for taking time to reply ;)

My driver 572.83 is already installed, I have uninstall all other nvidia stuff using BCU, and I will try to :

  1. Apply your patch (press 1)
  2. Install Nvidia App : NVIDIA_app_beta_v11.0.3.213
  3. Manually add the game for which I want to enable DLSS4 to nvidia App
  4. Quit nvidia app
  5. Apply your patch to get DLSS4 enable (press 2)
  6. Launch nvidia app and activate DLSS4 for the game in nvidia app

Seems correct to you ?

EDIT 1 :

So I tried what I wrote above.

I managed to launch NvidiaApp, but in the game I added, I couldn't change the DLSS (everything was blank : This game cannot be optimized... ).

After a while, I got an error message, and now NvidiaApp isn't working at all even if I quit and re-launch it...

So it seems that if we apply a patch after adding a game manually, NvidiaApp is not functionnal anymore... weird...

EDIT 2: Back to NvidiaApp v11.0.2.341 and all is OK now...

@JPersson77
Copy link
Author

Just letting you know I'm still using this. and it works great with the latest driver (at the time 580.88)

@gitdunce
Copy link

gitdunce commented Aug 11, 2025

Yeah it is still working. I got confused about it not working the other day because Epic broke DLSS in Fortnite. Thank you.

@gugadev
Copy link

gugadev commented Aug 14, 2025

This is an absolute masterpiece. Thank you very much!

@noahgennat9-stack
Copy link

It's caused issues for my psvr2 on skyrim, how do i remove it's effects? Even having dlss on default causes bugs.

@Mordorah
Copy link

Mordorah commented Sep 9, 2025

It's caused issues for my psvr2 on skyrim, how do i remove it's effects? Even having dlss on default causes bugs.

This script edits 2 files made by NVAPP.

Ideally you can get rid of all of it's effects and fully fresh by using DDU on your system which will delete everything Driver + NVAPP.

https://www.wagnardsoft.com/display-driver-uninstaller-ddu

However, aside from just making the driver "think" that you can run Overrides this does nothing, so not sure what kind of issues you can be experiencing.

@tildebyte
Copy link

As of now (2025-11-08; but I have no idea when this actually happened),

-ApplicationOntology\data\fingerprint.db
+DAO\${Really_big_large_long_string_of_hex_digits}\fingerprint.db

One edit, and it continues to work as advertised.

@JPersson77
Copy link
Author

Thanks will check it out. Did not yet updrade to 581.80 (latest as of now)

@ForthtuN
Copy link

Doesen't seem to work anymore

@JPersson77
Copy link
Author

JPersson77 commented Nov 15, 2025

@tildebyte @ForthtuN The script has been updated to work with nvidia driver 581.80 and beyond.

Changelog:

  • Updated script to reflect changes by NVIDIA in driver version 581.80
  • Updated the readme to be clearer and more helpful I hope

@tildebyte
Copy link

🎉

@JPersson77
Copy link
Author

Changelog:

Minor update to fix a potential error message

@daviddipboye1984
Copy link

Just updated to the latest Nvidia Driver and I was expecting to have to run the script again, but it's still working. Thanks for posting this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment