HOWTO: Keylase Nvidia Patch

Here’s what I’ve done on 24.10:

  1. Create a folder in the root of your app dataset (anywhere works technically). Mine is /mnt/System/nvidia-patch
  2. Put the patch.sh from Keylase GitHub in the folder your created.
  3. Copy and paste the following into a new file run.sh in the same folder, replacing the </path/to/folder/from/step/1> with the path to the folder you created in step 1:
#!/bin/sh

PATCH_DIR="</path/to/folder/from/step/1>"

sed -i -r "s,^backup_path=.*,backup_path=\"$PATCH_DIR/libnvidia-encode-backup\",g" "$PATCH_DIR/patch.sh" && \
if [ -d "$PATCH_DIR/patched-lib" ]; then rm -r "$PATCH_DIR/patched-lib"; fi && \
mkdir -p "$PATCH_DIR/patched-lib" && \
PATCH_OUTPUT_DIR="$PATCH_DIR/patched-lib" "$PATCH_DIR/patch.sh" && \
cd "$PATCH_DIR/patched-lib" && \
for f in * ; do
    suffix="${f##*.so}"
    name="$(basename "$f" "$suffix")"
    mount --bind "$f" "/usr/lib/x86_64-linux-gnu/$f"
    mount --bind "$f" "/usr/lib/x86_64-linux-gnu/$name"
    mount --bind "$f" "/usr/lib/x86_64-linux-gnu/$name.1"
done && \
ldconfig
  1. Add the run.sh script you just created as a pre-init script in the WebUI.
  2. Reboot and done!
4 Likes