$ show keylase/nvidia-patch
This repository provides patches and tools to remove artificial limitations on Nvidia consumer-grade GPUs, specifically targeting the NVENC encoder session limits and NvFBC (framebuffer capture) restrictions. It offers both Linux and Windows solutions: Linux patching scripts modify driver libraries in-place, while Windows solutions use binary patching of nvencodeapi.dll and a proxy DLL for NvFBC. The project includes automation tools for driver version tracking, patch generation, and documentation updates. The core functionality revolves around version-specific binary patches applied to Nvidia driver components. For Linux, the patch.sh and patch-fbc.sh scripts use sed to replace specific byte sequences in driver libraries based on associative arrays mapping driver versions to patch patterns. Windows patches are distributed as .1337 files specifying hex offsets and replacement bytes, applied by external tools. The repository also includes a NvFBC wrapper DLL that exports original NvFBC functions by jumping to the actual driver implementations, bypassing signature checks. Beyond the patches, the repository maintains a comprehensive driver version database (drivers.json) tracking which versions include the NVENC and NvFBC patches. Automation tools like nv-driver-locator.py monitor for new driver releases, autopatch.py generates new patch files from binary differences, and readme_autogen.py dynamically generates documentation from templates and driver data. This combination of manual patching tools and automation infrastructure creates a self-sustaining system for keeping pace with Nvidia driver updates.
The LLM identified 3 files worth highlighting for reuse:
Generates README documentation from JSON data using Jinja2-style templates. Demonstrates clean separation of data and presentation, allowing easy updates to documentation when driver data changes. The component is reusable for any project needing automated documentation from structured data.
Monitors Nvidia's official download pages for new driver releases and downloads them. Features version parsing, change detection, and optional email notifications. Demonstrates a robust pattern for tracking software versions from web sources that can be adapted to other vendors or software.
Creates .1337 patch files by comparing original and modified DLLs, outputting hex offset and byte replacement instructions. Shows skill in binary diff analysis and patch generation, providing a reusable tool for creating binary patches for any DLL or executable given two versions.