keylase / nvidia-patch

This patch removes restriction on maximum number of simultaneous NVENC video encoding sessions imposed by Nvidia to consumer-grade GPUs.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

run error: ./patch.sh: 8: Syntax error: newline unexpected

rockmyhouse opened this issue · comments

Describe the bug
First time running patch and it errors when running the command:
./patch.sh: 8: Syntax error: newline unexpected
The file was run with privileges.

To Reproduce
Steps to reproduce the behavior:

  1. myname@nas2:~/nvidia_driver$ sudo chmod +x patch.sh
  2. myname@nas2:~/nvidia_driver$ sudo ./patch.sh

Expected behavior
clean execution of patch script.

Output listings
myname@nas2:~/nvidia_driver$ sudo ./patch.sh
./patch.sh: 8: Syntax error: newline unexpected

Environment (please complete the following information):

  • OS: Ubuntu 22.04.4 LTS (GNU/Linux 5.15.0-105-generic x86_64)
  • GPU model: GeForce GTX 1050 Ti
  • Patch commit used: d56fe0c8aeb306238e63ae535251f181
  • Nvidia driver version: 535.171.04

Additional context
I'm a novice linux user and may be doing this wrong :)

Can you do cat patch.sh to make sure your patch was downloaded correctly.

Some folks in the past have downloaded the html page instead of raw file from github :)

@jailuthra That was the issue. I tried redoing it on Saturday before posting but it did not work. I downloaded it a third time and re-applied it again today and it worked fine. Thanks for the quick reply and support.

myname@nas2:/nvidia_driver$ sudo chmod +x patch.sh
[sudo] password for myname:
myname@nas2:
/nvidia_driver$ sudo ./patch.sh
Detected nvidia driver version: 535.171.04
libnvidia-encode.so
Attention! Backup not found. Copying current libnvidia-encode.so to backup.
7107f1ecf68754eaf1f98c0d1aeac4e0de4a7511 /opt/nvidia/libnvidia-encode-backup/libnvidia-encode.so.535.171.04
c1741694df468c5203e6157a2d459023592a9565 /usr/lib/x86_64-linux-gnu/libnvidia-encode.so.535.171.04
Patched!
myname@nas2:~/nvidia_driver$