forked from shoober420/windows11-scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDisableHDR.bat
More file actions
44 lines (26 loc) · 1.92 KB
/
DisableHDR.bat
File metadata and controls
44 lines (26 loc) · 1.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
rem # Disable HDR
rem # !!! WARNING !!!
rem # RECOMMENDED TO DISABLE ONBOARD INTEGRATED GPU IN BIOS IF POSSIBLE
rem # Double check to make sure the correct dedicated GPU hardware ID was selected or performance will suffer
rem # !!! WARNING !!!
rem # wmic path win32_videocontroller get PNPDeviceID,Name
PAUSE
rem # HighPerfAdapter must match Hardware ID in Device Manager for dedicated GPU
rem # Device Manager > Display Adapters > "GPUNAME" > Properties > Details > Property > Hardware Ids
rem # HighPerfAdapter="VEN&DEV&SUBSYS" / PCI\VEN_10DE&DEV_2684&SUBSYS_89321043 / HighPerfAdapter=10DE&2684&89321043
rem # reg add "HKCU\Software\Microsoft\DirectX\UserGpuPreferences" /v "DirectXUserGlobalSettings" /t REG_SZ /d "HighPerfAdapter=10DE&2684&89321043"
rem # AutoHDR requires SwapEffectUpgradeEnable to be turned on
PAUSE
rem # garlin: https://www.elevenforum.com/members/garlin.5387/
rem # https://www.elevenforum.com/t/find-gpu-ven-dev-subsys-values-for-highperfadapter-option-using-wmic-or-other-method.30127/post-521164
rem # https://www.elevenforum.com/t/pnputil-uninstall-integrated-gpu.33072/
for /f "tokens=1-6 delims=_&" %%a in ('wmic path win32_videocontroller where "not AdapterDACType like 'Internal'" get PNPDeviceID ^| find "PCI"') do (
reg add "HKCU\Software\Microsoft\DirectX\UserGpuPreferences" /v "DirectXUserGlobalSettings" /t REG_SZ /d "HighPerfAdapter=%%b&%%d&%%f;AutoHDREnable=0;VRROptimizeEnable=0;SwapEffectUpgradeEnable=0"
)
rem # Turn On or Off Optimizations for Windowed Games
reg add "HKCU\Software\Microsoft\DirectX\GraphicsSettings" /v "SwapEffectUpgradeCache" /t REG_DWORD /d "0" /f
rem # Disable HDR Video Streaming
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\VideoSettings" /v "EnableHDRForPlayback" /t REG_DWORD /d "0" /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\VideoSettings" /v "DisableHDROnBattery" /t REG_DWORD /d "1" /f
wmic path win32_videocontroller get PNPDeviceID,Name
PAUSE