Merge pull request #24 from Snawoot/readme_revamp

revamp docs and help
This commit is contained in:
Vladislav Yarmak 2019-01-05 16:05:10 +02:00 committed by GitHub
commit 7b2e145e16
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 38 additions and 10 deletions

View File

@ -23,12 +23,33 @@ Requirements:
Tested on Ubuntu 18.04 LTS (GNU/Linux 4.15.0-23-generic x86\_64) Tested on Ubuntu 18.04 LTS (GNU/Linux 4.15.0-23-generic x86\_64)
## step-by-step : ## Synopsis
```
# bash ./patch.sh -h
SYNOPSIS
patch.sh [OPTION]...
DESCRIPTION
The patch for Nvidia drivers to increase encoder sessions
-s Silent mode (No output)
-r Rollback to original (Restore lib from backup)
-h Print this help message
```
## Step-by-Step guide
Examples are provided for driver version 410.78. All commands are runned as root.
### Download driver ### Download driver
[https://download.nvidia.com/XFree86/Linux-x86\_64/410.78/NVIDIA-Linux-x86\_64-410.78.run](https://download.nvidia.com/XFree86/Linux-x86_64/410.78/NVIDIA-Linux-x86_64-410.78.run) [https://download.nvidia.com/XFree86/Linux-x86\_64/410.78/NVIDIA-Linux-x86\_64-410.78.run](https://download.nvidia.com/XFree86/Linux-x86_64/410.78/NVIDIA-Linux-x86_64-410.78.run)
### Install driver (410.78) ### Install driver
```bash ```bash
mkdir /opt/nvidia && cd /opt/nvidia mkdir /opt/nvidia && cd /opt/nvidia
wget https://download.nvidia.com/XFree86/Linux-x86_64/410.78/NVIDIA-Linux-x86_64-410.78.run wget https://download.nvidia.com/XFree86/Linux-x86_64/410.78/NVIDIA-Linux-x86_64-410.78.run
@ -37,21 +58,27 @@ chmod +x ./NVIDIA-Linux-x86_64-410.78.run
``` ```
### Check driver ### Check driver
```bash ```bash
nvidia-smi nvidia-smi
``` ```
### Patch libnvidia-encode.so (with backup) Output should show no errors and details about your driver and GPU.
### Patch driver
This patch performs backup of original file prior to making changes.
```bash ```bash
bash ./patch.sh bash ./patch.sh
``` ```
### Silent patch libnvidia-encode.so You're all set!
```bash
bash ./patch.sh -s ## Rollback
```
If something got broken you may restore patched driver from backup:
### Rollback libnvidia-encode.so (restore from backup)
```bash ```bash
bash ./patch.sh -r bash ./patch.sh -r
``` ```

View File

@ -12,15 +12,16 @@ SYNOPSIS
patch.sh [OPTION]... patch.sh [OPTION]...
DESCRIPTION DESCRIPTION
The patch for libnvidia-encode to increase encoder sessions The patch for Nvidia drivers to increase encoder sessions
-s Silent mode (No output) -s Silent mode (No output)
-r Rollback to original (Restore lib from backup) -r Rollback to original (Restore lib from backup)
-h Print this help message
' '
} }
while getopts 'rs' flag; do while getopts 'rsh' flag; do
case "${flag}" in case "${flag}" in
r) rollback_flag='true' ;; r) rollback_flag='true' ;;
s) silent_flag='true' ;; s) silent_flag='true' ;;