New driver support (version 620.70.10)

Aperta
#1,157 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
78/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
debian, json, linux, python, shell

Direzione di ricerca

Start with patch.sh, patch-fbc.sh, and drivers.json, using the proposed 620.70.10 entries, then inspect tools/readme-autogen/add_driver.py for the separate --skip-url-check URL bug. Run the provided update_patch.sh, add_driver.py, and readme_autogen.py commands, followed by the NVENC patch tests described in the issue. Done means the generated README includes 620.70.10, both patch scripts report SUPPORTED, and the concurrent h264_nvenc test completes successfully.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Please provide details about your environment (please complete the following information)

  • Nvidia driver version: 620.70.10 (620.70.10-1 from the CUDA debian13/x86_64 apt repo)
  • GPU Model: GeForce RTX 5070
  • OS: Debian 13
  • I'm willing to participate in testing of new patch version

Summary

The 620.70.06 NVENC and NvFBC patch strings work unchanged on 620.70.10. I've tested this locally (results below) and am filing the changes here with a suggested fix, since I don't have push access.

NVIDIA hasn't published a public .run for 620.70.10 (international., us. and download.nvidia.com all return 404), so the driver link points to the CUDA repo package, as was done for 615.71.10:
https://developer.download.nvidia.com/compute/cuda/repos/debian13/x86_64/cuda-drivers_620.70.10-1_amd64.deb

Suggested fix

This is the result of the "Generate Linux patches" copy-mode steps (update_patch.sh -v 620.70.10 -o 620.70.06 for both scripts, then add_driver.py and readme_autogen.py):

--- a/patch.sh
+++ b/patch.sh
@@ -319,6 +319,7 @@ declare -A patch_list=(
     ["620.70.06"]='s/\xe8\xd1\x19\xfe\xff\x41\x89\xc6\x85\xc0/\xe8\xd1\x19\xfe\xff\x29\xc0\x41\x89\xc6/g'
+    ["620.70.10"]='s/\xe8\xd1\x19\xfe\xff\x41\x89\xc6\x85\xc0/\xe8\xd1\x19\xfe\xff\x29\xc0\x41\x89\xc6/g'
 )
--- a/patch-fbc.sh
+++ b/patch-fbc.sh
@@ -280,6 +280,7 @@ declare -A patch_list=(
     ["620.70.06"]='s/\x85\xc0\x0f\x85\x1c\x01\x00\x00\x48\x8d/\x85\xc0\x90\x90\x90\x90\x90\x90\x48\x8d/g'
+    ["620.70.10"]='s/\x85\xc0\x0f\x85\x1c\x01\x00\x00\x48\x8d/\x85\xc0\x90\x90\x90\x90\x90\x90\x48\x8d/g'
 )
--- a/drivers.json
+++ b/drivers.json
@@ -1511,6 +1511,12 @@
                     "driver_url": "https://international.download.nvidia.com/XFree86/Linux-x86_64/595.112.07/NVIDIA-Linux-x86_64-595.112.07.run"
+                },
+                {
+                    "version": "620.70.10",
+                    "nvenc_patch": true,
+                    "nvfbc_patch": true,
+                    "driver_url": "https://developer.download.nvidia.com/compute/cuda/repos/debian13/x86_64/cuda-drivers_620.70.10-1_amd64.deb"
                 }

Then regenerate README.md with readme_autogen.py. That bumps the latest-version badge to 620.70.10 and adds the table row.

Running the workflow won't add the drivers.json entry

The cuda-drivers_*.deb is a ~130 KB metapackage, so add_driver.py rejects it with Bad driver length: 131500 (the check requires at least 50 MB). It then returns exit code 0 without writing drivers.json. A workflow run with mode=copy, old_version=620.70.06 would therefore succeed and commit the patch lines but no driver entry. Running it locally with --skip-url-check fixes that, but only with the small fix below.

add_driver.py: --skip-url-check drops the -U URL

url starts as "" and only gets set inside the validation loop. With --skip-url-check the loop never runs, so the -U override is thrown away and the driver is recorded with no driver_url (the README row ends up with an empty "Driver link" cell). The error hint says the flag is for submitting an unchecked URL, so the URL should be kept:

--- a/tools/readme-autogen/add_driver.py
+++ b/tools/readme-autogen/add_driver.py
@@ -131,7 +131,7 @@ def main():
         urls = [Template(i).substitute(version=args.version) for i in url_tmpl if i]
     else:
         urls = [args.url]
-    url = ""
+    url = urls[0] if urls else ""
     if urls and not args.skip_url_check:

With that change, this produces the drivers.json entry above:

python3 add_driver.py -L --skip-url-check -U https://developer.download.nvidia.com/compute/cuda/repos/debian13/x86_64/cuda-drivers_620.70.10-1_amd64.deb 620.70.10

(Separately, it might be worth making the URL and validation failure paths exit non-zero, so the workflow fails loudly instead of committing a partial update.)

Testing

  • Pattern match: each search pattern occurs exactly once in the stock 620.70.10 libraries (libnvidia-encode.so at 0x2514a, libnvidia-fbc.so at 0x901c), and neither library was already patched. ./patch.sh -c 620.70.10 and ./patch-fbc.sh -c 620.70.10 both report SUPPORTED with the change applied.
  • Byte diff:
    • NVENC: 41 89 c6 85 c0 → 29 c0 41 89 c6 at 0x2514f (same edit as 620.70.06).
    • NvFBC: the jne rel32 at 0x901e → 6 × 90.
  • Unpatched baseline: tools/patch-tester/patch-tester.sh fails on the 13th session with OpenEncodeSessionEx failed: incompatible client key (21).
  • Patched (sudo ./patch.sh): patch-tester.sh exits 0, and all 13 concurrent h264_nvenc encodes (1M–13M) complete all 1250 frames. The installed library is byte-identical to the dry-run output.
  • NvFBC: I only verified this with the pattern and byte checks above. I didn't test it on the live driver.

Push access

If the maintainers want, I'm happy to open these as PRs myself (driver support plus the separate add_driver.py fix). I'd appreciate push access to do so, or I can submit from a fork, whichever you prefer.

Lingua principale
Python
Stelle
4.8k
Fork
375
Merge medio
2g 4h
PR unite (30g)
9

Preparare l'ambiente

  • Include un Dockerfile o un file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di keylase/nvidia-patch

Tutte le issue di keylase/nvidia-patch

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.