Fix NVIDIA CUDA Repo Debian 13

- Fixed critical abort in `_install_nvidia_cuda_repo` for Debian 13 (Trixie) when installing v590/v595 due to `nvidia-open` availability checks.
- Removed pre-install `apt-cache policy` verification that caused premature script termination on version mismatches.
- Eliminated manual creation of `/etc/apt/preferences.d/block-nvidia`, relying exclusively on official NVIDIA pinning packages (`nvidia-driver-pinning-${ver}`).
- Updated error handling to display real `apt` output on failure instead of generic abort messages, improving troubleshooting visibility.
- Synchronized documentation in `docs/gpu.md` to reflect the simplified CUDA repo flow and removed references to manual pinning or candidate checks.
This commit is contained in:
stornic56
2026-08-10 00:55:47 -05:00
committed by GitHub
parent f0be860f98
commit 2bcdb511b2
2 changed files with 14 additions and 39 deletions
+1 -1
View File
@@ -175,7 +175,7 @@ The NVIDIA driver installation process is inherently complex due to proprietary
#### **Blackwell Architecture & CUDA v590**
- **Detection**: `_helpers.sh` function `is_nvidia_blackwell()` identifies GPUs via PCI IDs `10de:24xx`, `0x29000x29BF`, and `0x2B800x31FF`.
- **Reason for v590**: Debian 13 (Trixie) stable drivers only support up to v550, which lacks Blackwell (GB20x) architecture. The NVIDIA CUDA repository provides production branch v590 with unified driver packages. Specifically, the goal is to install the latest version of the nvidia-driver from the 590 branch, which would be [590.48.01](https://download.nvidia.com/XFree86/Linux-x86_64/590.48.01/README/supportedchips.html).
- **CUDA Repository Enablement**: On Debian 12 (Bookworm) the `nvidia-cuda` repository is enabled via `extrepo`. On Debian 13 (Trixie) the official `cuda-keyring` package is used instead (`wget` + `dpkg -i`), since extrepo cannot configure the repo correctly on Trixie. After enabling, the script always runs an explicit `apt update` and verifies the APT candidate matches the requested branch (`595.*`) before writing APT pinning in `/etc/apt/preferences.d/block-nvidia` and installing `nvidia-driver-pinning-<ver>`, `nvidia-driver`, and `firmware-nvidia-gsp`. If the candidate does not match, the installation aborts cleanly.
- **CUDA Repository Enablement**: On Debian 12 (Bookworm) the `nvidia-cuda` repository is enabled via `extrepo`. On Debian 13 (Trixie) the official `cuda-keyring` package is used instead (`wget` + `dpkg -i`), since extrepo cannot configure the repo correctly on Trixie. After enabling, the script always runs an explicit `apt update`, then installs `nvidia-driver-pinning-<ver>` if available (official NVIDIA pinning, optional), and finally installs the unified metapackage `nvidia-open` plus `firmware-nvidia-gsp`. No manual pinning file is written; if `apt install` fails, the real apt error is shown and the installation aborts.
#### **Installation Flow**
```bash