From 699bbf408af588e3026e23b879006a8550ac89f9 Mon Sep 17 00:00:00 2001 From: Umgak Date: Wed, 14 Jun 2023 22:40:05 -0500 Subject: [PATCH 1/3] win: add dch 536.23 --- drivers.json | 9 +++++++++ win/README.md | 5 +++-- win/win10_x64/536.23/nvencodeapi.1337 | 6 ++++++ win/win10_x64/536.23/nvencodeapi64.1337 | 5 +++++ 4 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 win/win10_x64/536.23/nvencodeapi.1337 create mode 100644 win/win10_x64/536.23/nvencodeapi64.1337 diff --git a/drivers.json b/drivers.json index 25dca0f..ffa0790 100644 --- a/drivers.json +++ b/drivers.json @@ -3866,6 +3866,15 @@ "patch64_url": "win10_x64/535.98/nvencodeapi64.1337", "patch32_url": "win10_x64/535.98/nvencodeapi.1337", "driver_url": "https://international.download.nvidia.com/Windows/535.98/535.98-desktop-win10-win11-64bit-international-dch-whql.exe" + }, + { + "os": "win10", + "product": "GeForce", + "version": "536.23", + "variant": "DCH", + "patch64_url": "win10_x64/536.23/nvencodeapi64.1337", + "patch32_url": "win10_x64/536.23/nvencodeapi.1337", + "driver_url": "https://international.download.nvidia.com/Windows/536.23/536.23-desktop-win10-win11-64bit-international-dch-whql.exe" } ] } diff --git a/win/README.md b/win/README.md index 5c5bb32..34efb53 100644 --- a/win/README.md +++ b/win/README.md @@ -1,7 +1,7 @@ NVENC and NvFBC patches for Windows Nvidia drivers ================================================== -![GitHub last commit](https://img.shields.io/github/last-commit/keylase/nvidia-patch.svg) ![Latest GeForce version](https://img.shields.io/badge/latest%20GeForce%20version-535.98-brightgreen.svg) ![Latest Quadro version](https://img.shields.io/badge/latest%20Quadro%20version-526.67-blue.svg) +![GitHub last commit](https://img.shields.io/github/last-commit/keylase/nvidia-patch.svg) ![Latest GeForce version](https://img.shields.io/badge/latest%20GeForce%20version-536.23-brightgreen.svg) ![Latest Quadro version](https://img.shields.io/badge/latest%20Quadro%20version-526.67-blue.svg) NVENC patch removes restriction on maximum number of simultaneous NVENC video encoding sessions imposed by Nvidia to consumer-grade GPUs. @@ -40,7 +40,7 @@ If you like this project, best way to contribute is by sending PRs and fixing do 5. Apply x86 library patch to corresponding file in `%WINDIR%\SysWOW64\` in the same way as previous one. - *If patching fails, close all applications using nvencodeapi.dll, such as OBS Studio, Plex or Discord.* -**Example:** for 64bit Windows 10 running driver version 535.98, use `win10_x64/535.98/nvencodeapi64.1337` against `C:\WINDOWS\system32\nvencodeapi64.dll` **and** `win10_x64/535.98/nvencodeapi.1337` against `C:\WINDOWS\SysWOW64\nvencodeapi.dll`. +**Example:** for 64bit Windows 10 running driver version 536.23, use `win10_x64/536.23/nvencodeapi64.1337` against `C:\WINDOWS\system32\nvencodeapi64.dll` **and** `win10_x64/536.23/nvencodeapi.1337` against `C:\WINDOWS\SysWOW64\nvencodeapi.dll`. You can also use FFmpeg to [verify that NVENC session limit is removed](https://github.com/keylase/nvidia-patch/wiki/Verify-NVENC-patch). @@ -211,6 +211,7 @@ Credits to [TroubleChute channel](https://www.youtube.com/channel/UCkih2oVTbXPEp | GeForce | 531.79 DCH | [x64 library patch](https://raw.githubusercontent.com/keylase/nvidia-patch/master/win/win10_x64/531.79/nvencodeapi64.1337) | [x86 library patch](https://raw.githubusercontent.com/keylase/nvidia-patch/master/win/win10_x64/531.79/nvencodeapi.1337) | [Driver link](https://international.download.nvidia.com/Windows/531.79/531.79-desktop-win10-win11-64bit-international-dch-whql.exe) | | GeForce | 532.03 DCH | [x64 library patch](https://raw.githubusercontent.com/keylase/nvidia-patch/master/win/win10_x64/532.03/nvencodeapi64.1337) | [x86 library patch](https://raw.githubusercontent.com/keylase/nvidia-patch/master/win/win10_x64/532.03/nvencodeapi.1337) | [Driver link](https://international.download.nvidia.com/Windows/532.03/532.03-desktop-win10-win11-64bit-international-dch-whql.exe) | | GeForce | 535.98 DCH | [x64 library patch](https://raw.githubusercontent.com/keylase/nvidia-patch/master/win/win10_x64/535.98/nvencodeapi64.1337) | [x86 library patch](https://raw.githubusercontent.com/keylase/nvidia-patch/master/win/win10_x64/535.98/nvencodeapi.1337) | [Driver link](https://international.download.nvidia.com/Windows/535.98/535.98-desktop-win10-win11-64bit-international-dch-whql.exe) | +| GeForce | 536.23 DCH | [x64 library patch](https://raw.githubusercontent.com/keylase/nvidia-patch/master/win/win10_x64/536.23/nvencodeapi64.1337) | [x86 library patch](https://raw.githubusercontent.com/keylase/nvidia-patch/master/win/win10_x64/536.23/nvencodeapi.1337) | [Driver link](https://international.download.nvidia.com/Windows/536.23/536.23-desktop-win10-win11-64bit-international-dch-whql.exe) | | Product series | Version | x64 library patch | x86 library patch | Driver link | diff --git a/win/win10_x64/536.23/nvencodeapi.1337 b/win/win10_x64/536.23/nvencodeapi.1337 new file mode 100644 index 0000000..efb0579 --- /dev/null +++ b/win/win10_x64/536.23/nvencodeapi.1337 @@ -0,0 +1,6 @@ +>nvencodeapi.dll +000000000003D777:89->33 +000000000003D778:45->C0 +000000000003D779:08->89 +000000000003D77A:85->45 +000000000003D77B:C0->08 \ No newline at end of file diff --git a/win/win10_x64/536.23/nvencodeapi64.1337 b/win/win10_x64/536.23/nvencodeapi64.1337 new file mode 100644 index 0000000..700f032 --- /dev/null +++ b/win/win10_x64/536.23/nvencodeapi64.1337 @@ -0,0 +1,5 @@ +>nvencodeapi64.dll +0000000000042A91:8B->33 +0000000000042A92:F0->C0 +0000000000042A93:85->8B +0000000000042A94:C0->F0 \ No newline at end of file From b368b4ea0904f97dd98b2b717fd1ec2e810ac5c7 Mon Sep 17 00:00:00 2001 From: Umgak Date: Thu, 15 Jun 2023 01:17:14 -0500 Subject: [PATCH 2/3] fix for changed compression on nvenc dlls in installer archives --- win/tools/autopatch/autopatch.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/win/tools/autopatch/autopatch.py b/win/tools/autopatch/autopatch.py index 6542b0a..7f02b3d 100755 --- a/win/tools/autopatch/autopatch.py +++ b/win/tools/autopatch/autopatch.py @@ -33,8 +33,8 @@ def parse_args(): parser.add_argument("-T", "--target", nargs="+", default=[ - "Display.Driver/nvencodeapi64.dl_", - "Display.Driver/nvencodeapi.dl_", + "Display.Driver/nvencodeapi64.dll", + "Display.Driver/nvencodeapi.dll", ], help="target location(s) in archive") parser.add_argument("-N", "--target-name", @@ -156,7 +156,8 @@ def make_patch(archive, *, tmpdir, arch_tgt, sevenzip=sevenzip) as tgt: - f = expand(tgt, sevenzip=sevenzip) + with open(tgt, 'rb') as fo: + f = fo.read() offset = f.find(search) if offset == -1: raise PatternNotFoundException("Pattern not found.") From 9e20a7068f8d6b3a0a74107368f3eb03f824532a Mon Sep 17 00:00:00 2001 From: Jai Luthra Date: Sat, 17 Jun 2023 00:39:33 +0530 Subject: [PATCH 3/3] win: autopatch: Support both dll/dl_ as targets --- win/tools/autopatch/autopatch.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/win/tools/autopatch/autopatch.py b/win/tools/autopatch/autopatch.py index 7f02b3d..81c3209 100755 --- a/win/tools/autopatch/autopatch.py +++ b/win/tools/autopatch/autopatch.py @@ -156,8 +156,11 @@ def make_patch(archive, *, tmpdir, arch_tgt, sevenzip=sevenzip) as tgt: - with open(tgt, 'rb') as fo: - f = fo.read() + if tgt.endswith(".dll"): + with open(tgt, 'rb') as fo: + f = fo.read() + else: + f = expand(tgt, sevenzip=sevenzip) offset = f.find(search) if offset == -1: raise PatternNotFoundException("Pattern not found.")