mirror of
https://github.com/keylase/nvidia-patch.git
synced 2024-11-09 19:48:20 +00:00
Merge remote-tracking branch 'upstream/master'
Updating a local fork for additional changes
This commit is contained in:
commit
bdb3a4f5b5
26
README.md
26
README.md
@ -1,7 +1,7 @@
|
||||
NVENC and NvFBC patches for Nvidia drivers
|
||||
==========================================
|
||||
|
||||
![GitHub last commit](https://img.shields.io/github/last-commit/keylase/nvidia-patch.svg) ![Latest version](https://img.shields.io/badge/latest%20linux%20driver%20version-470.63.01-brightgreen.svg)
|
||||
![GitHub last commit](https://img.shields.io/github/last-commit/keylase/nvidia-patch.svg) ![Latest version](https://img.shields.io/badge/latest%20linux%20driver%20version-470.74-brightgreen.svg)
|
||||
|
||||
[NVENC patch](patch.sh) removes restriction on maximum number of simultaneous NVENC video encoding sessions imposed by Nvidia to consumer-grade GPUs.
|
||||
|
||||
@ -149,6 +149,7 @@ git clone https://ipfs.io/ipns/Qmed4r8yrBP162WK1ybd1DJWhLUi4t6mGuBoB9fLtjxR7u nv
|
||||
| 470.57.02 | YES | YES | [Driver link](https://international.download.nvidia.com/XFree86/Linux-x86_64/470.57.02/NVIDIA-Linux-x86_64-470.57.02.run) |
|
||||
| 470.62.02 | YES | YES | |
|
||||
| 470.63.01 | YES | YES | [Driver link](https://international.download.nvidia.com/XFree86/Linux-x86_64/470.63.01/NVIDIA-Linux-x86_64-470.63.01.run) |
|
||||
| 470.74 | YES | YES | [Driver link](https://international.download.nvidia.com/XFree86/Linux-x86_64/470.74/NVIDIA-Linux-x86_64-470.74.run) |
|
||||
|
||||
## Synopsis
|
||||
|
||||
@ -156,7 +157,7 @@ git clone https://ipfs.io/ipns/Qmed4r8yrBP162WK1ybd1DJWhLUi4t6mGuBoB9fLtjxR7u nv
|
||||
# bash ./patch.sh -h
|
||||
|
||||
SYNOPSIS
|
||||
patch.sh [-s] [-r|-h|-c VERSION|-l]
|
||||
patch.sh [-s] [-r|-h|-c VERSION|-l|-f]
|
||||
|
||||
DESCRIPTION
|
||||
The patch for Nvidia drivers to remove NVENC session limit
|
||||
@ -169,6 +170,7 @@ DESCRIPTION
|
||||
-l List supported driver versions
|
||||
-d VERSION Use VERSION driver version when looking for libraries
|
||||
instead of using nvidia-smi to detect it.
|
||||
-f Enable support for Flatpak NVIDIA drivers.
|
||||
|
||||
```
|
||||
|
||||
@ -176,7 +178,7 @@ DESCRIPTION
|
||||
# bash ./patch-fbc.sh -h
|
||||
|
||||
SYNOPSIS
|
||||
patch-fbc.sh [-s] [-r|-h|-c VERSION|-l]
|
||||
patch-fbc.sh [-s] [-r|-h|-c VERSION|-l|-f]
|
||||
|
||||
DESCRIPTION
|
||||
The patch for Nvidia drivers to allow FBC on consumer devices
|
||||
@ -189,7 +191,7 @@ DESCRIPTION
|
||||
-l List supported driver versions
|
||||
-d VERSION Use VERSION driver version when looking for libraries
|
||||
instead of using nvidia-smi to detect it.
|
||||
|
||||
-f Enable support for Flatpak NVIDIA drivers.
|
||||
|
||||
```
|
||||
|
||||
@ -247,6 +249,22 @@ Essentially all you need to do during build is:
|
||||
|
||||
`docker-entrypoint.sh` script does on-the-fly patching by means of manipulating dynamic linker to workaround read-only mount of Nvidia runtime. Finally it passes original docker command to shell, like if entrypoint was not restricted by `ENTRYPOINT` directive. So `docker run --runtime=nvidia -it mycontainer echo 123` will print `123`. Also it can be just invoked from your entrypoint script, if you have any.
|
||||
|
||||
## Flatpak support
|
||||
|
||||
If you use a Flatpak app that uses NVENC/NvFBC (e.g. OBS Studio, Kdenlive), it's recommended that you patch the NVIDIA drivers for Flatpak as well. To do so, just pass the `-f` parameter to either `patch.sh` or `patch-fbc.sh`, like so:
|
||||
|
||||
```bash
|
||||
bash ./patch.sh -f
|
||||
bash ./patch-fbc.sh -f
|
||||
```
|
||||
|
||||
In case something goes wrong, you can restore the original Flatpak drivers by adding the `-r` paramater:
|
||||
|
||||
```
|
||||
bash ./patch.sh -f -r
|
||||
bash ./patch-fbc.sh -f -r
|
||||
```
|
||||
|
||||
## Benchmarks
|
||||
|
||||
* [Plex Media Server: nVidia Hardware Transcoding Calculator for Plex Estimates](https://www.elpamsoft.com/?p=Plex-Hardware-Transcoding) - useful benchmark of achieved simultaneous transcodes with various stream quality and hardware with patched drivers.
|
||||
|
60
drivers.json
60
drivers.json
@ -620,6 +620,12 @@
|
||||
"version": "470.62.02",
|
||||
"nvenc_patch": true,
|
||||
"nvfbc_patch": true
|
||||
},
|
||||
{
|
||||
"version": "470.74",
|
||||
"nvenc_patch": true,
|
||||
"nvfbc_patch": true,
|
||||
"driver_url": "https://international.download.nvidia.com/XFree86/Linux-x86_64/470.74/NVIDIA-Linux-x86_64-470.74.run"
|
||||
}
|
||||
],
|
||||
"example": {
|
||||
@ -3149,6 +3155,60 @@
|
||||
"patch64_url": "win7_x64/471.96/nvencodeapi64.1337",
|
||||
"patch32_url": "win7_x64/471.96/nvencodeapi.1337",
|
||||
"driver_url": "https://international.download.nvidia.com/Windows/471.96/471.96-desktop-win8-win7-64bit-international-whql.exe"
|
||||
},
|
||||
{
|
||||
"os": "win10",
|
||||
"product": "GeForce",
|
||||
"version": "472.12",
|
||||
"variant": "Studio Driver",
|
||||
"patch64_url": "win10_x64/nsd_472.12/nvencodeapi64.1337",
|
||||
"patch32_url": "win10_x64/nsd_472.12/nvencodeapi.1337",
|
||||
"driver_url": "https://international.download.nvidia.com/Windows/472.12/472.12-desktop-win10-win11-64bit-international-nsd-whql.exe"
|
||||
},
|
||||
{
|
||||
"os": "win10",
|
||||
"product": "GeForce",
|
||||
"version": "472.12",
|
||||
"variant": "",
|
||||
"patch64_url": "win10_x64/472.12/nvencodeapi64.1337",
|
||||
"patch32_url": "win10_x64/472.12/nvencodeapi.1337",
|
||||
"driver_url": "https://international.download.nvidia.com/Windows/472.12/472.12-desktop-win10-win11-64bit-international-whql.exe"
|
||||
},
|
||||
{
|
||||
"os": "win7",
|
||||
"product": "GeForce",
|
||||
"version": "472.12",
|
||||
"variant": "",
|
||||
"patch64_url": "win7_x64/472.12/nvencodeapi64.1337",
|
||||
"patch32_url": "win7_x64/472.12/nvencodeapi.1337",
|
||||
"driver_url": "https://international.download.nvidia.com/Windows/472.12/472.12-desktop-win8-win7-64bit-international-whql.exe"
|
||||
},
|
||||
{
|
||||
"os": "win10",
|
||||
"product": "Quadro",
|
||||
"version": "472.12",
|
||||
"variant": "",
|
||||
"patch64_url": "win10_x64/quadro_472.12/nvencodeapi64.1337",
|
||||
"patch32_url": "win10_x64/quadro_472.12/nvencodeapi.1337",
|
||||
"driver_url": "https://international.download.nvidia.com/Windows/Quadro_Certified/472.12/472.12-quadro-rtx-desktop-notebook-win10-win11-64bit-international-whql.exe"
|
||||
},
|
||||
{
|
||||
"os": "ws2012",
|
||||
"product": "Quadro",
|
||||
"version": "472.12",
|
||||
"variant": "",
|
||||
"patch64_url": "ws2012_x64/quadro_472.12/nvencodeapi64.1337",
|
||||
"patch32_url": "ws2012_x64/quadro_472.12/nvencodeapi.1337",
|
||||
"driver_url": "https://international.download.nvidia.com/Windows/Quadro_Certified/472.12/472.12-quadro-rtx-winserv-2012r2-64bit-international-whql.exe"
|
||||
},
|
||||
{
|
||||
"os": "ws2016",
|
||||
"product": "Quadro",
|
||||
"version": "472.12",
|
||||
"variant": "",
|
||||
"patch64_url": "ws2016_x64/quadro_472.12/nvencodeapi64.1337",
|
||||
"patch32_url": "ws2016_x64/quadro_472.12/nvencodeapi.1337",
|
||||
"driver_url": "https://international.download.nvidia.com/Windows/Quadro_Certified/472.12/472.12-quadro-rtx-winserv-2016-2019-64bit-international-whql.exe"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
51
patch-fbc.sh
51
patch-fbc.sh
@ -7,10 +7,12 @@ set -euo pipefail ; # <- this semicolon and comment make options apply
|
||||
backup_path="/opt/nvidia/libnvidia-fbc-backup"
|
||||
silent_flag=''
|
||||
manual_driver_version=''
|
||||
flatpak_flag=''
|
||||
backup_suffix=''
|
||||
|
||||
print_usage() { printf '
|
||||
SYNOPSIS
|
||||
patch-fbc.sh [-s] [-r|-h|-c VERSION|-l]
|
||||
patch-fbc.sh [-s] [-r|-h|-c VERSION|-l|-f]
|
||||
|
||||
DESCRIPTION
|
||||
The patch for Nvidia drivers to allow FBC on consumer devices
|
||||
@ -23,14 +25,14 @@ DESCRIPTION
|
||||
-l List supported driver versions
|
||||
-d VERSION Use VERSION driver version when looking for libraries
|
||||
instead of using nvidia-smi to detect it.
|
||||
|
||||
-f Enable support for Flatpak NVIDIA drivers.
|
||||
'
|
||||
}
|
||||
|
||||
# shellcheck disable=SC2209
|
||||
opmode="patch"
|
||||
|
||||
while getopts 'rshc:ld:' flag; do
|
||||
while getopts 'rshc:ld:f' flag; do
|
||||
case "${flag}" in
|
||||
r) opmode="${opmode}rollback" ;;
|
||||
s) silent_flag='true' ;;
|
||||
@ -38,6 +40,7 @@ while getopts 'rshc:ld:' flag; do
|
||||
c) opmode="${opmode}checkversion" ; checked_version="$OPTARG" ;;
|
||||
l) opmode="${opmode}listversions" ;;
|
||||
d) manual_driver_version="$OPTARG" ;;
|
||||
f) flatpak_flag='true' ;;
|
||||
*) echo "Incorrect option specified in command line" ; exit 2 ;;
|
||||
esac
|
||||
done
|
||||
@ -46,6 +49,11 @@ if [[ $silent_flag ]]; then
|
||||
exec 1> /dev/null
|
||||
fi
|
||||
|
||||
if [[ $flatpak_flag ]]; then
|
||||
backup_suffix='.flatpak'
|
||||
echo "WARNING: Flatpak flag enabled (-f), modifying ONLY the Flatpak driver."
|
||||
fi
|
||||
|
||||
declare -A patch_list=(
|
||||
["435.27.08"]='s/\x85\xc0\x89\xc3\x0f\x85\x68\xfa\xff\xff/\x31\xc0\x89\xc3\x0f\x85\x68\xfa\xff\xff/'
|
||||
["440.26"]='s/\x85\xc0\x89\xc3\x0f\x85\xa9\xfa\xff\xff/\x31\xc0\x89\xc3\x0f\x85\xa9\xfa\xff\xff/'
|
||||
@ -119,6 +127,7 @@ declare -A patch_list=(
|
||||
["470.57.02"]='s/\x83\xfe\x01\x73\x08\x48/\x83\xfe\x00\x72\x08\x48/'
|
||||
["470.62.02"]='s/\x83\xfe\x01\x73\x08\x48/\x83\xfe\x00\x72\x08\x48/'
|
||||
["470.63.01"]='s/\x83\xfe\x01\x73\x08\x48/\x83\xfe\x00\x72\x08\x48/'
|
||||
["470.74"]='s/\x83\xfe\x01\x73\x08\x48/\x83\xfe\x00\x72\x08\x48/'
|
||||
)
|
||||
|
||||
declare -A object_list=(
|
||||
@ -194,6 +203,7 @@ declare -A object_list=(
|
||||
["470.57.02"]='libnvidia-fbc.so'
|
||||
["470.62.02"]='libnvidia-fbc.so'
|
||||
["470.63.01"]='libnvidia-fbc.so'
|
||||
["470.74"]='libnvidia-fbc.so'
|
||||
)
|
||||
|
||||
check_version_supported () {
|
||||
@ -201,6 +211,14 @@ check_version_supported () {
|
||||
[[ "${patch_list[$ver]+isset}" && "${object_list[$ver]+isset}" ]]
|
||||
}
|
||||
|
||||
get_flatpak_driver_path () {
|
||||
# Flatpak's package versioning replaces '.' by '-'
|
||||
version="$(echo "$1" | tr '.' '-')"
|
||||
if path=$(flatpak info --show-location "org.freedesktop.Platform.GL.nvidia-${version}" 2>/dev/null); then
|
||||
echo "$path/files/lib"
|
||||
fi
|
||||
}
|
||||
|
||||
get_supported_versions () {
|
||||
for drv in "${!patch_list[@]}"; do
|
||||
[[ "${object_list[$drv]+isset}" ]] && echo "$drv"
|
||||
@ -244,6 +262,17 @@ patch_common () {
|
||||
patch="${patch_list[$driver_version]}"
|
||||
object="${object_list[$driver_version]}"
|
||||
|
||||
if [[ $flatpak_flag ]]; then
|
||||
driver_dir=$(get_flatpak_driver_path "$driver_version")
|
||||
if [ -z "$driver_dir" ]; then
|
||||
echo "ERROR: Flatpak package for driver $driver_version does not appear to be installed."
|
||||
echo "Try rebooting your computer and/or running 'flatpak update'."
|
||||
exit 1
|
||||
fi
|
||||
# return early because the code below is out of scope for the Flatpak driver
|
||||
return 0
|
||||
fi
|
||||
|
||||
declare -a driver_locations=(
|
||||
'/usr/lib/x86_64-linux-gnu'
|
||||
'/usr/lib/x86_64-linux-gnu/nvidia/current/'
|
||||
@ -265,10 +294,10 @@ patch_common () {
|
||||
|
||||
rollback () {
|
||||
patch_common
|
||||
if [[ -f "$backup_path/$object.$driver_version" ]]; then
|
||||
cp -p "$backup_path/$object.$driver_version" \
|
||||
if [[ -f "$backup_path/$object.$driver_version$backup_suffix" ]]; then
|
||||
cp -p "$backup_path/$object.$driver_version$backup_suffix" \
|
||||
"$driver_dir/$object.$driver_version"
|
||||
echo "Restore from backup $object.$driver_version"
|
||||
echo "Restore from backup $object.$driver_version$backup_suffix"
|
||||
else
|
||||
echo "Backup not found. Try to patch first."
|
||||
exit 1
|
||||
@ -277,8 +306,8 @@ rollback () {
|
||||
|
||||
patch () {
|
||||
patch_common
|
||||
if [[ -f "$backup_path/$object.$driver_version" ]]; then
|
||||
bkp_hash="$(sha1sum "$backup_path/$object.$driver_version" | cut -f1 -d\ )"
|
||||
if [[ -f "$backup_path/$object.$driver_version$backup_suffix" ]]; then
|
||||
bkp_hash="$(sha1sum "$backup_path/$object.$driver_version$backup_suffix" | cut -f1 -d\ )"
|
||||
drv_hash="$(sha1sum "$driver_dir/$object.$driver_version" | cut -f1 -d\ )"
|
||||
if [[ "$bkp_hash" != "$drv_hash" ]] ; then
|
||||
echo "Backup exists and driver file differ from backup. Skipping patch."
|
||||
@ -288,10 +317,10 @@ patch () {
|
||||
echo "Attention! Backup not found. Copying current $object to backup."
|
||||
mkdir -p "$backup_path"
|
||||
cp -p "$driver_dir/$object.$driver_version" \
|
||||
"$backup_path/$object.$driver_version"
|
||||
"$backup_path/$object.$driver_version$backup_suffix"
|
||||
fi
|
||||
sha1sum "$backup_path/$object.$driver_version"
|
||||
sed "$patch" "$backup_path/$object.$driver_version" > \
|
||||
sha1sum "$backup_path/$object.$driver_version$backup_suffix"
|
||||
sed "$patch" "$backup_path/$object.$driver_version$backup_suffix" > \
|
||||
"${PATCH_OUTPUT_DIR-$driver_dir}/$object.$driver_version"
|
||||
sha1sum "${PATCH_OUTPUT_DIR-$driver_dir}/$object.$driver_version"
|
||||
ldconfig
|
||||
|
50
patch.sh
50
patch.sh
@ -7,10 +7,12 @@ set -euo pipefail ; # <- this semicolon and comment make options apply
|
||||
backup_path="/opt/nvidia/libnvidia-encode-backup"
|
||||
silent_flag=''
|
||||
manual_driver_version=''
|
||||
flatpak_flag=''
|
||||
backup_suffix=''
|
||||
|
||||
print_usage() { printf '
|
||||
SYNOPSIS
|
||||
patch.sh [-s] [-r|-h|-c VERSION|-l]
|
||||
patch.sh [-s] [-r|-h|-c VERSION|-l|-f]
|
||||
|
||||
DESCRIPTION
|
||||
The patch for Nvidia drivers to remove NVENC session limit
|
||||
@ -23,13 +25,14 @@ DESCRIPTION
|
||||
-l List supported driver versions
|
||||
-d VERSION Use VERSION driver version when looking for libraries
|
||||
instead of using nvidia-smi to detect it.
|
||||
-f Enable support for Flatpak NVIDIA drivers.
|
||||
'
|
||||
}
|
||||
|
||||
# shellcheck disable=SC2209
|
||||
opmode="patch"
|
||||
|
||||
while getopts 'rshc:ld:' flag; do
|
||||
while getopts 'rshc:ld:f' flag; do
|
||||
case "${flag}" in
|
||||
r) opmode="${opmode}rollback" ;;
|
||||
s) silent_flag='true' ;;
|
||||
@ -37,6 +40,7 @@ while getopts 'rshc:ld:' flag; do
|
||||
c) opmode="${opmode}checkversion" ; checked_version="$OPTARG" ;;
|
||||
l) opmode="${opmode}listversions" ;;
|
||||
d) manual_driver_version="$OPTARG" ;;
|
||||
f) flatpak_flag='true' ;;
|
||||
*) echo "Incorrect option specified in command line" ; exit 2 ;;
|
||||
esac
|
||||
done
|
||||
@ -45,6 +49,11 @@ if [[ $silent_flag ]]; then
|
||||
exec 1> /dev/null
|
||||
fi
|
||||
|
||||
if [[ $flatpak_flag ]]; then
|
||||
backup_suffix='.flatpak'
|
||||
echo "WARNING: Flatpak flag enabled (-f), modifying ONLY the Flatpak driver."
|
||||
fi
|
||||
|
||||
declare -A patch_list=(
|
||||
["375.39"]='s/\x85\xC0\x89\xC5\x75\x18/\x29\xC0\x89\xC5\x90\x90/g'
|
||||
["390.77"]='s/\x85\xC0\x89\xC5\x75\x18/\x29\xC0\x89\xC5\x90\x90/g'
|
||||
@ -156,6 +165,7 @@ declare -A patch_list=(
|
||||
["470.57.02"]='s/\xe8\x25\x1C\xff\xff\x85\xc0\x41\x89\xc4/\xe8\x25\x1C\xff\xff\x29\xc0\x41\x89\xc4/g'
|
||||
["470.62.02"]='s/\xe8\x25\x1C\xff\xff\x85\xc0\x41\x89\xc4/\xe8\x25\x1C\xff\xff\x29\xc0\x41\x89\xc4/g'
|
||||
["470.63.01"]='s/\xe8\x25\x1C\xff\xff\x85\xc0\x41\x89\xc4/\xe8\x25\x1C\xff\xff\x29\xc0\x41\x89\xc4/g'
|
||||
["470.74"]='s/\xe8\x25\x1C\xff\xff\x85\xc0\x41\x89\xc4/\xe8\x25\x1C\xff\xff\x29\xc0\x41\x89\xc4/g'
|
||||
)
|
||||
|
||||
declare -A object_list=(
|
||||
@ -267,6 +277,7 @@ declare -A object_list=(
|
||||
["470.57.02"]='libnvidia-encode.so'
|
||||
["470.62.02"]='libnvidia-encode.so'
|
||||
["470.63.01"]='libnvidia-encode.so'
|
||||
["470.74"]='libnvidia-encode.so'
|
||||
)
|
||||
|
||||
check_version_supported () {
|
||||
@ -274,6 +285,14 @@ check_version_supported () {
|
||||
[[ "${patch_list[$ver]+isset}" && "${object_list[$ver]+isset}" ]]
|
||||
}
|
||||
|
||||
get_flatpak_driver_path () {
|
||||
# Flatpak's package versioning replaces '.' by '-'
|
||||
version="$(echo "$1" | tr '.' '-')"
|
||||
if path=$(flatpak info --show-location "org.freedesktop.Platform.GL.nvidia-${version}" 2>/dev/null); then
|
||||
echo "$path/files/lib"
|
||||
fi
|
||||
}
|
||||
|
||||
get_supported_versions () {
|
||||
for drv in "${!patch_list[@]}"; do
|
||||
[[ "${object_list[$drv]+isset}" ]] && echo "$drv"
|
||||
@ -317,6 +336,17 @@ patch_common () {
|
||||
patch="${patch_list[$driver_version]}"
|
||||
object="${object_list[$driver_version]}"
|
||||
|
||||
if [[ $flatpak_flag ]]; then
|
||||
driver_dir=$(get_flatpak_driver_path "$driver_version")
|
||||
if [ -z "$driver_dir" ]; then
|
||||
echo "ERROR: Flatpak package for driver $driver_version does not appear to be installed."
|
||||
echo "Try rebooting your computer and/or running 'flatpak update'."
|
||||
exit 1
|
||||
fi
|
||||
# return early because the code below is out of scope for the Flatpak driver
|
||||
return 0
|
||||
fi
|
||||
|
||||
declare -a driver_locations=(
|
||||
'/usr/lib/x86_64-linux-gnu'
|
||||
'/usr/lib/x86_64-linux-gnu/nvidia/current/'
|
||||
@ -338,10 +368,10 @@ patch_common () {
|
||||
|
||||
rollback () {
|
||||
patch_common
|
||||
if [[ -f "$backup_path/$object.$driver_version" ]]; then
|
||||
cp -p "$backup_path/$object.$driver_version" \
|
||||
if [[ -f "$backup_path/$object.$driver_version$backup_suffix" ]]; then
|
||||
cp -p "$backup_path/$object.$driver_version$backup_suffix" \
|
||||
"$driver_dir/$object.$driver_version"
|
||||
echo "Restore from backup $object.$driver_version"
|
||||
echo "Restore from backup $object.$driver_version$backup_suffix"
|
||||
else
|
||||
echo "Backup not found. Try to patch first."
|
||||
exit 1
|
||||
@ -350,8 +380,8 @@ rollback () {
|
||||
|
||||
patch () {
|
||||
patch_common
|
||||
if [[ -f "$backup_path/$object.$driver_version" ]]; then
|
||||
bkp_hash="$(sha1sum "$backup_path/$object.$driver_version" | cut -f1 -d\ )"
|
||||
if [[ -f "$backup_path/$object.$driver_version$backup_suffix" ]]; then
|
||||
bkp_hash="$(sha1sum "$backup_path/$object.$driver_version$backup_suffix" | cut -f1 -d\ )"
|
||||
drv_hash="$(sha1sum "$driver_dir/$object.$driver_version" | cut -f1 -d\ )"
|
||||
if [[ "$bkp_hash" != "$drv_hash" ]] ; then
|
||||
echo "Backup exists and driver file differ from backup. Skipping patch."
|
||||
@ -361,10 +391,10 @@ patch () {
|
||||
echo "Attention! Backup not found. Copying current $object to backup."
|
||||
mkdir -p "$backup_path"
|
||||
cp -p "$driver_dir/$object.$driver_version" \
|
||||
"$backup_path/$object.$driver_version"
|
||||
"$backup_path/$object.$driver_version$backup_suffix"
|
||||
fi
|
||||
sha1sum "$backup_path/$object.$driver_version"
|
||||
sed "$patch" "$backup_path/$object.$driver_version" > \
|
||||
sha1sum "$backup_path/$object.$driver_version$backup_suffix"
|
||||
sed "$patch" "$backup_path/$object.$driver_version$backup_suffix" > \
|
||||
"${PATCH_OUTPUT_DIR-$driver_dir}/$object.$driver_version"
|
||||
sha1sum "${PATCH_OUTPUT_DIR-$driver_dir}/$object.$driver_version"
|
||||
ldconfig
|
||||
|
@ -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-471.96-brightgreen.svg) ![Latest Quadro version](https://img.shields.io/badge/latest%20Quadro%20version-471.68-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-472.12-brightgreen.svg) ![Latest Quadro version](https://img.shields.io/badge/latest%20Quadro%20version-472.12-blue.svg)
|
||||
|
||||
NVENC patch removes restriction on maximum number of simultaneous NVENC video encoding sessions imposed by Nvidia to consumer-grade GPUs.
|
||||
|
||||
@ -54,7 +54,7 @@ git clone https://ipfs.io/ipns/Qmed4r8yrBP162WK1ybd1DJWhLUi4t6mGuBoB9fLtjxR7u nv
|
||||
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 471.96, use `win10_x64/471.96/nvencodeapi64.1337` against `C:\WINDOWS\system32\nvencodeapi64.dll` **and** `win10_x64/471.96/nvencodeapi.1337` against `C:\WINDOWS\SysWOW64\nvencodeapi.dll`.
|
||||
**Example:** for 64bit Windows 10 running driver version 472.12, use `win10_x64/472.12/nvencodeapi64.1337` against `C:\WINDOWS\system32\nvencodeapi64.dll` **and** `win10_x64/472.12/nvencodeapi.1337` against `C:\WINDOWS\SysWOW64\nvencodeapi.dll`.
|
||||
|
||||
If you experience issues with streaming software based on Nvidia streaming facilities (Nvidia Shield TV, Moonlight), you also have to import few registry values in order to workaround binary signature mismatch. See [**skip\_sig\_check** (clickable)](skip_sig_check) directory for instructions.
|
||||
|
||||
@ -181,6 +181,8 @@ Credits to [TroubleChute channel](https://www.youtube.com/channel/UCkih2oVTbXPEp
|
||||
| GeForce | 471.68 | [x64 library patch](https://raw.githubusercontent.com/keylase/nvidia-patch/master/win/win10_x64/471.68/nvencodeapi64.1337) | [x86 library patch](https://raw.githubusercontent.com/keylase/nvidia-patch/master/win/win10_x64/471.68/nvencodeapi.1337) | [Driver link](https://international.download.nvidia.com/Windows/471.68/471.68-desktop-win10-win11-64bit-international-whql.exe) |
|
||||
| GeForce | 471.68 Studio Driver | [x64 library patch](https://raw.githubusercontent.com/keylase/nvidia-patch/master/win/win10_x64/nsd_471.68/nvencodeapi64.1337) | [x86 library patch](https://raw.githubusercontent.com/keylase/nvidia-patch/master/win/win10_x64/nsd_471.68/nvencodeapi.1337) | [Driver link](https://international.download.nvidia.com/Windows/471.68/471.68-desktop-win10-win11-64bit-international-nsd-whql.exe) |
|
||||
| GeForce | 471.96 | [x64 library patch](https://raw.githubusercontent.com/keylase/nvidia-patch/master/win/win10_x64/471.96/nvencodeapi64.1337) | [x86 library patch](https://raw.githubusercontent.com/keylase/nvidia-patch/master/win/win10_x64/471.96/nvencodeapi.1337) | [Driver link](https://international.download.nvidia.com/Windows/471.96/471.96-desktop-win10-win11-64bit-international-whql.exe) |
|
||||
| GeForce | 472.12 | [x64 library patch](https://raw.githubusercontent.com/keylase/nvidia-patch/master/win/win10_x64/472.12/nvencodeapi64.1337) | [x86 library patch](https://raw.githubusercontent.com/keylase/nvidia-patch/master/win/win10_x64/472.12/nvencodeapi.1337) | [Driver link](https://international.download.nvidia.com/Windows/472.12/472.12-desktop-win10-win11-64bit-international-whql.exe) |
|
||||
| GeForce | 472.12 Studio Driver | [x64 library patch](https://raw.githubusercontent.com/keylase/nvidia-patch/master/win/win10_x64/nsd_472.12/nvencodeapi64.1337) | [x86 library patch](https://raw.githubusercontent.com/keylase/nvidia-patch/master/win/win10_x64/nsd_472.12/nvencodeapi.1337) | [Driver link](https://international.download.nvidia.com/Windows/472.12/472.12-desktop-win10-win11-64bit-international-nsd-whql.exe) |
|
||||
|
||||
|
||||
| Product series | Version | x64 library patch | x86 library patch | Driver link |
|
||||
@ -225,6 +227,7 @@ Credits to [TroubleChute channel](https://www.youtube.com/channel/UCkih2oVTbXPEp
|
||||
| Quadro | 465.89 | [x64 library patch](https://raw.githubusercontent.com/keylase/nvidia-patch/master/win/win10_x64/quadro_465.89/nvencodeapi64.1337) | [x86 library patch](https://raw.githubusercontent.com/keylase/nvidia-patch/master/win/win10_x64/quadro_465.89/nvencodeapi.1337) | [Driver link](https://international.download.nvidia.com/Windows/Quadro_Certified/465.89/465.89-quadro-rtx-desktop-notebook-win10-64bit-international-whql.exe) |
|
||||
| Quadro | 471.11 | [x64 library patch](https://raw.githubusercontent.com/keylase/nvidia-patch/master/win/win10_x64/quadro_471.11/nvencodeapi64.1337) | [x86 library patch](https://raw.githubusercontent.com/keylase/nvidia-patch/master/win/win10_x64/quadro_471.11/nvencodeapi.1337) | [Driver link](https://international.download.nvidia.com/Windows/Quadro_Certified/471.11/471.11-quadro-rtx-desktop-notebook-win10-64bit-international-whql.exe) |
|
||||
| Quadro | 471.68 | [x64 library patch](https://raw.githubusercontent.com/keylase/nvidia-patch/master/win/win10_x64/quadro_471.68/nvencodeapi64.1337) | [x86 library patch](https://raw.githubusercontent.com/keylase/nvidia-patch/master/win/win10_x64/quadro_471.68/nvencodeapi.1337) | [Driver link](https://international.download.nvidia.com/Windows/Quadro_Certified/471.68/471.68-quadro-rtx-desktop-notebook-win10-win11-64bit-international-whql.exe) |
|
||||
| Quadro | 472.12 | [x64 library patch](https://raw.githubusercontent.com/keylase/nvidia-patch/master/win/win10_x64/quadro_472.12/nvencodeapi64.1337) | [x86 library patch](https://raw.githubusercontent.com/keylase/nvidia-patch/master/win/win10_x64/quadro_472.12/nvencodeapi.1337) | [Driver link](https://international.download.nvidia.com/Windows/Quadro_Certified/472.12/472.12-quadro-rtx-desktop-notebook-win10-win11-64bit-international-whql.exe) |
|
||||
|
||||
|
||||
### Windows 7, Windows 8, Windows 8.1 drivers
|
||||
@ -297,6 +300,7 @@ Credits to [TroubleChute channel](https://www.youtube.com/channel/UCkih2oVTbXPEp
|
||||
| GeForce | 471.41 | [x64 library patch](https://raw.githubusercontent.com/keylase/nvidia-patch/master/win/win7_x64/471.41/nvencodeapi64.1337) | [x86 library patch](https://raw.githubusercontent.com/keylase/nvidia-patch/master/win/win7_x64/471.41/nvencodeapi.1337) | [Driver link](https://international.download.nvidia.com/Windows/471.41/471.41-desktop-win8-win7-64bit-international-whql.exe) |
|
||||
| GeForce | 471.68 | [x64 library patch](https://raw.githubusercontent.com/keylase/nvidia-patch/master/win/win7_x64/471.68/nvencodeapi64.1337) | [x86 library patch](https://raw.githubusercontent.com/keylase/nvidia-patch/master/win/win7_x64/471.68/nvencodeapi.1337) | [Driver link](https://international.download.nvidia.com/Windows/471.68/471.68-desktop-win8-win7-64bit-international-whql.exe) |
|
||||
| GeForce | 471.96 | [x64 library patch](https://raw.githubusercontent.com/keylase/nvidia-patch/master/win/win7_x64/471.96/nvencodeapi64.1337) | [x86 library patch](https://raw.githubusercontent.com/keylase/nvidia-patch/master/win/win7_x64/471.96/nvencodeapi.1337) | [Driver link](https://international.download.nvidia.com/Windows/471.96/471.96-desktop-win8-win7-64bit-international-whql.exe) |
|
||||
| GeForce | 472.12 | [x64 library patch](https://raw.githubusercontent.com/keylase/nvidia-patch/master/win/win7_x64/472.12/nvencodeapi64.1337) | [x86 library patch](https://raw.githubusercontent.com/keylase/nvidia-patch/master/win/win7_x64/472.12/nvencodeapi.1337) | [Driver link](https://international.download.nvidia.com/Windows/472.12/472.12-desktop-win8-win7-64bit-international-whql.exe) |
|
||||
|
||||
|
||||
| Product series | Version | x64 library patch | x86 library patch | Driver link |
|
||||
@ -347,6 +351,7 @@ Credits to [TroubleChute channel](https://www.youtube.com/channel/UCkih2oVTbXPEp
|
||||
| Quadro | 471.11 | [x64 library patch](https://raw.githubusercontent.com/keylase/nvidia-patch/master/win/ws2012_x64/quadro_471.11/nvencodeapi64.1337) | [x86 library patch](https://raw.githubusercontent.com/keylase/nvidia-patch/master/win/ws2012_x64/quadro_471.11/nvencodeapi.1337) | [Driver link](https://international.download.nvidia.com/Windows/Quadro_Certified/471.11/471.11-quadro-rtx-winserv-2012r2-64bit-international-whql.exe) |
|
||||
| Quadro | 471.41 | [x64 library patch](https://raw.githubusercontent.com/keylase/nvidia-patch/master/win/ws2012_x64/quadro_471.41/nvencodeapi64.1337) | [x86 library patch](https://raw.githubusercontent.com/keylase/nvidia-patch/master/win/ws2012_x64/quadro_471.41/nvencodeapi.1337) | [Driver link](https://international.download.nvidia.com/Windows/Quadro_Certified/471.41/471.41-quadro-rtx-winserv-2012r2-64bit-international-whql.exe) |
|
||||
| Quadro | 471.68 | [x64 library patch](https://raw.githubusercontent.com/keylase/nvidia-patch/master/win/ws2012_x64/quadro_471.68/nvencodeapi64.1337) | [x86 library patch](https://raw.githubusercontent.com/keylase/nvidia-patch/master/win/ws2012_x64/quadro_471.68/nvencodeapi.1337) | [Driver link](https://international.download.nvidia.com/Windows/Quadro_Certified/471.68/471.68-quadro-rtx-winserv-2012r2-64bit-international-whql.exe) |
|
||||
| Quadro | 472.12 | [x64 library patch](https://raw.githubusercontent.com/keylase/nvidia-patch/master/win/ws2012_x64/quadro_472.12/nvencodeapi64.1337) | [x86 library patch](https://raw.githubusercontent.com/keylase/nvidia-patch/master/win/ws2012_x64/quadro_472.12/nvencodeapi.1337) | [Driver link](https://international.download.nvidia.com/Windows/Quadro_Certified/472.12/472.12-quadro-rtx-winserv-2012r2-64bit-international-whql.exe) |
|
||||
|
||||
|
||||
### Windows Server 2016, 2019 drivers
|
||||
@ -382,6 +387,7 @@ Credits to [TroubleChute channel](https://www.youtube.com/channel/UCkih2oVTbXPEp
|
||||
| Quadro | 471.11 | [x64 library patch](https://raw.githubusercontent.com/keylase/nvidia-patch/master/win/ws2016_x64/quadro_471.11/nvencodeapi64.1337) | [x86 library patch](https://raw.githubusercontent.com/keylase/nvidia-patch/master/win/ws2016_x64/quadro_471.11/nvencodeapi.1337) | [Driver link](https://international.download.nvidia.com/Windows/Quadro_Certified/471.11/471.11-quadro-rtx-winserv-2016-2019-64bit-international-whql.exe) |
|
||||
| Quadro | 471.41 | [x64 library patch](https://raw.githubusercontent.com/keylase/nvidia-patch/master/win/ws2016_x64/quadro_471.41/nvencodeapi64.1337) | [x86 library patch](https://raw.githubusercontent.com/keylase/nvidia-patch/master/win/ws2016_x64/quadro_471.41/nvencodeapi.1337) | [Driver link](https://international.download.nvidia.com/Windows/Quadro_Certified/471.41/471.41-quadro-rtx-winserv-2016-2019-64bit-international-whql.exe) |
|
||||
| Quadro | 471.68 | [x64 library patch](https://raw.githubusercontent.com/keylase/nvidia-patch/master/win/ws2016_x64/quadro_471.68/nvencodeapi64.1337) | [x86 library patch](https://raw.githubusercontent.com/keylase/nvidia-patch/master/win/ws2016_x64/quadro_471.68/nvencodeapi.1337) | [Driver link](https://international.download.nvidia.com/Windows/Quadro_Certified/471.68/471.68-quadro-rtx-winserv-2016-2019-64bit-international-whql.exe) |
|
||||
| Quadro | 472.12 | [x64 library patch](https://raw.githubusercontent.com/keylase/nvidia-patch/master/win/ws2016_x64/quadro_472.12/nvencodeapi64.1337) | [x86 library patch](https://raw.githubusercontent.com/keylase/nvidia-patch/master/win/ws2016_x64/quadro_472.12/nvencodeapi.1337) | [Driver link](https://international.download.nvidia.com/Windows/Quadro_Certified/472.12/472.12-quadro-rtx-winserv-2016-2019-64bit-international-whql.exe) |
|
||||
|
||||
|
||||
## Benchmarks
|
||||
|
6
win/win10_x64/472.12/nvencodeapi.1337
Normal file
6
win/win10_x64/472.12/nvencodeapi.1337
Normal file
@ -0,0 +1,6 @@
|
||||
>nvencodeapi.dll
|
||||
000000000003D738:89->33
|
||||
000000000003D739:45->C0
|
||||
000000000003D73A:08->89
|
||||
000000000003D73B:85->45
|
||||
000000000003D73C:C0->08
|
5
win/win10_x64/472.12/nvencodeapi64.1337
Normal file
5
win/win10_x64/472.12/nvencodeapi64.1337
Normal file
@ -0,0 +1,5 @@
|
||||
>nvencodeapi64.dll
|
||||
00000000000437AC:8B->33
|
||||
00000000000437AD:F0->C0
|
||||
00000000000437AE:85->8B
|
||||
00000000000437AF:C0->F0
|
6
win/win10_x64/nsd_472.12/nvencodeapi.1337
Normal file
6
win/win10_x64/nsd_472.12/nvencodeapi.1337
Normal file
@ -0,0 +1,6 @@
|
||||
>nvencodeapi.dll
|
||||
000000000003D738:89->33
|
||||
000000000003D739:45->C0
|
||||
000000000003D73A:08->89
|
||||
000000000003D73B:85->45
|
||||
000000000003D73C:C0->08
|
5
win/win10_x64/nsd_472.12/nvencodeapi64.1337
Normal file
5
win/win10_x64/nsd_472.12/nvencodeapi64.1337
Normal file
@ -0,0 +1,5 @@
|
||||
>nvencodeapi64.dll
|
||||
00000000000437AC:8B->33
|
||||
00000000000437AD:F0->C0
|
||||
00000000000437AE:85->8B
|
||||
00000000000437AF:C0->F0
|
6
win/win10_x64/quadro_472.12/nvencodeapi.1337
Normal file
6
win/win10_x64/quadro_472.12/nvencodeapi.1337
Normal file
@ -0,0 +1,6 @@
|
||||
>nvencodeapi.dll
|
||||
000000000003D738:89->33
|
||||
000000000003D739:45->C0
|
||||
000000000003D73A:08->89
|
||||
000000000003D73B:85->45
|
||||
000000000003D73C:C0->08
|
5
win/win10_x64/quadro_472.12/nvencodeapi64.1337
Normal file
5
win/win10_x64/quadro_472.12/nvencodeapi64.1337
Normal file
@ -0,0 +1,5 @@
|
||||
>nvencodeapi64.dll
|
||||
00000000000437AC:8B->33
|
||||
00000000000437AD:F0->C0
|
||||
00000000000437AE:85->8B
|
||||
00000000000437AF:C0->F0
|
5
win/win7_x64/472.12/nvencodeapi.1337
Normal file
5
win/win7_x64/472.12/nvencodeapi.1337
Normal file
@ -0,0 +1,5 @@
|
||||
>nvencodeapi.dll
|
||||
00000000000242C9:8B->33
|
||||
00000000000242CA:D8->C0
|
||||
00000000000242CB:85->8B
|
||||
00000000000242CC:DB->D8
|
5
win/win7_x64/472.12/nvencodeapi64.1337
Normal file
5
win/win7_x64/472.12/nvencodeapi64.1337
Normal file
@ -0,0 +1,5 @@
|
||||
>nvencodeapi64.dll
|
||||
0000000000028A25:8B->33
|
||||
0000000000028A26:F0->C0
|
||||
0000000000028A27:85->8B
|
||||
0000000000028A28:C0->F0
|
5
win/ws2012_x64/quadro_472.12/nvencodeapi.1337
Normal file
5
win/ws2012_x64/quadro_472.12/nvencodeapi.1337
Normal file
@ -0,0 +1,5 @@
|
||||
>nvencodeapi.dll
|
||||
00000000000242C9:8B->33
|
||||
00000000000242CA:D8->C0
|
||||
00000000000242CB:85->8B
|
||||
00000000000242CC:DB->D8
|
5
win/ws2012_x64/quadro_472.12/nvencodeapi64.1337
Normal file
5
win/ws2012_x64/quadro_472.12/nvencodeapi64.1337
Normal file
@ -0,0 +1,5 @@
|
||||
>nvencodeapi64.dll
|
||||
0000000000028A25:8B->33
|
||||
0000000000028A26:F0->C0
|
||||
0000000000028A27:85->8B
|
||||
0000000000028A28:C0->F0
|
6
win/ws2016_x64/quadro_472.12/nvencodeapi.1337
Normal file
6
win/ws2016_x64/quadro_472.12/nvencodeapi.1337
Normal file
@ -0,0 +1,6 @@
|
||||
>nvencodeapi.dll
|
||||
000000000003D738:89->33
|
||||
000000000003D739:45->C0
|
||||
000000000003D73A:08->89
|
||||
000000000003D73B:85->45
|
||||
000000000003D73C:C0->08
|
5
win/ws2016_x64/quadro_472.12/nvencodeapi64.1337
Normal file
5
win/ws2016_x64/quadro_472.12/nvencodeapi64.1337
Normal file
@ -0,0 +1,5 @@
|
||||
>nvencodeapi64.dll
|
||||
00000000000437AC:8B->33
|
||||
00000000000437AD:F0->C0
|
||||
00000000000437AE:85->8B
|
||||
00000000000437AF:C0->F0
|
Loading…
Reference in New Issue
Block a user