Name card folders by GPU UUID, record serial in serial.txt
Folder identity switches from the physical serial (which neither nvflash nor nvidia-smi exposes on the 170HX) to the auto-read GPU UUID from nvidia-smi. The physical serial probe result (or N/A) is saved to <folder>/serial.txt and report.json. No manual serial prompt anymore; --serial only overrides the recorded serial. Unidentified runs fall back to unidentified/<bdf>/. AGENTS.md invariant and README updated to match.
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
Repo: https://git.qbuissondebon.eu.org/qbuissondebon/cmp170hx_check (SSH push: `git@git.ssh.qbuissondebon.eu.org:qbuissondebon/cmp170hx_check.git`)
|
||||
|
||||
Single-card checker for **NVIDIA CMP 170HX** cards (PCI IDs `10de:20c2` / `10de:2082`) — run it **one card at a time**: it waits for the card, verifies the PCIe capacitor mod, records PCIe bus health, backs up VBIOS, runs the cmpunlocker verification, offers the **opt-in** cmpunlocker unlock install (then a cold reboot and a re-run for the final PCIe check), and optionally stresses VRAM. Each card gets its own folder + JSON report named by serial, so the folders accumulate as you go through your batch (e.g. 23 cards).
|
||||
Single-card checker for **NVIDIA CMP 170HX** cards (PCI IDs `10de:20c2` / `10de:2082`) — run it **one card at a time**: it waits for the card, verifies the PCIe capacitor mod, records PCIe bus health, backs up VBIOS, runs the cmpunlocker verification, offers the **opt-in** cmpunlocker unlock install (then a cold reboot and a re-run for the final PCIe check), and optionally stresses VRAM. Each card gets its own folder + JSON report named by GPU UUID, so the folders accumulate as you go through your batch (e.g. 23 cards).
|
||||
|
||||
Reference harness (auto-cloned into `harness/` by preflight):
|
||||
|
||||
@@ -84,13 +84,13 @@ python3 check_cards.py --help # all flags
|
||||
Flow of a normal run:
|
||||
|
||||
1. Waits for a CMP 170HX on the bus — prompts you to insert/reseat the card, Enter triggers a PCI rescan (`q` quits)
|
||||
2. Serial auto-read from nvflash UUID; falls back to a manual label prompt
|
||||
3. VBIOS backup → `cards/<serial>/bios.rom` (nvflash, sysfs ROM fallback)
|
||||
2. Folder `cards/<GPU-UUID>/` from the auto-read GPU UUID (`nvidia-smi`); physical serial probed from nvflash and saved to `serial.txt` (`N/A` when the card exposes none) — never prompts
|
||||
3. VBIOS backup → `cards/<GPU-UUID>/bios.rom` (nvflash, sysfs ROM fallback)
|
||||
4. PCIe checks: link speed/width, AER counters, full config-space dump
|
||||
5. Link retrain test + full bus rescan test (device must survive both)
|
||||
6. Kernel log scrape (`dmesg`/`journalctl`) for this BDF: Xid / AER / NVRM lines
|
||||
7. `nvidia-smi` snapshot + `harness/cmpunlocker/verify.sh` (read-only)
|
||||
8. **Opt-in unlock**: `cmpunlocker unlock (install)` — skipped with a note when memory is already unlocked, otherwise asks `Run cmpunlocker install.sh now? (y/N)` (default **n**; `--unlock` runs it without asking). On yes: `git pull --ff-only` on the harness clone, then `install.sh` runs from `harness/cmpunlocker/` with **live terminal output** (full log → `cards/<serial>/install_unlocker.log`; the kernel-module build takes 5–15 min)
|
||||
8. **Opt-in unlock**: `cmpunlocker unlock (install)` — skipped with a note when memory is already unlocked, otherwise asks `Run cmpunlocker install.sh now? (y/N)` (default **n**; `--unlock` runs it without asking). On yes: `git pull --ff-only` on the harness clone, then `install.sh` runs from `harness/cmpunlocker/` with **live terminal output** (full log → `cards/<GPU-UUID>/install_unlocker.log`; the kernel-module build takes 5–15 min)
|
||||
9. **After a successful install**: the VRAM stress is skipped — **cold reboot the host** (`sudo shutdown -h now`, then power it back on) and **re-run the same command** for the final PCIe check, which must report **Gen2 x16**
|
||||
10. **Last step, optional**: `Run 5-min Vulkan VRAM stress test now? (y/N)` — refused by default, `--vulkan always|never` to override
|
||||
11. Result printed + `report.json` written into the card's folder
|
||||
@@ -111,7 +111,8 @@ Exit codes: `0` PASS/WARN · `1` FAIL · `2` no card found · `3` preflight bloc
|
||||
|
||||
```
|
||||
cards/
|
||||
└── <serial>/
|
||||
└── <GPU-UUID>/
|
||||
├── serial.txt # physical serial, or N/A
|
||||
├── bios.rom # VBIOS backup (+ sha256 in report)
|
||||
├── report.json # full result: link, AER before/after, retrain,
|
||||
│ # rescan, dmesg, verify, vulkan, PASS/WARN/FAIL
|
||||
@@ -131,7 +132,7 @@ cards/
|
||||
| `--preflight` | setup only: sudo precondition + package install + harness clone, then exit |
|
||||
| `--demo` | run the whole pipeline against fake hardware (self-test) |
|
||||
| `--nvflash PATH` | explicit nvflash binary |
|
||||
| `--serial XYZ` | override serial (skips nvflash auto-read) |
|
||||
| `--serial XYZ` | override physical serial recorded in `serial.txt` (folder stays UUID-named) |
|
||||
| `--vulkan ask\|always\|never` | VRAM test policy (default: ask, last step) |
|
||||
| `--unlock` | run the cmpunlocker `install.sh` step without prompting (default: ask y/N) |
|
||||
| `--skip-bios` | skip VBIOS backup |
|
||||
@@ -142,5 +143,5 @@ cards/
|
||||
|
||||
This tool **reads** card state by default. The one step that changes the card is **opt-in**:
|
||||
|
||||
- **Unlock install (opt-in, explicit confirmation)** — runs only if you answer `y` to `Run cmpunlocker install.sh now? (y/N)` (default `n`) or pass `--unlock`. It executes `install.sh` **from the harness clone** (`harness/cmpunlocker/`, refreshed first with `git pull --ff-only`, no extra installer flags), needs root (sudo credentials are cached first), streams its output live, and saves the full log to `cards/<serial>/install_unlocker.log`. It is skipped entirely when memory is already unlocked, when the harness is not cloned, and in `--demo` mode. A successful install replaces kernel modules — the step then skips VRAM stress and asks you to cold reboot and re-run.
|
||||
- **Unlock install (opt-in, explicit confirmation)** — runs only if you answer `y` to `Run cmpunlocker install.sh now? (y/N)` (default `n`) or pass `--unlock`. It executes `install.sh` **from the harness clone** (`harness/cmpunlocker/`, refreshed first with `git pull --ff-only`, no extra installer flags), needs root (sudo credentials are cached first), streams its output live, and saves the full log to `cards/<GPU-UUID>/install_unlocker.log`. It is skipped entirely when memory is already unlocked, when the harness is not cloned, and in `--demo` mode. A successful install replaces kernel modules — the step then skips VRAM stress and asks you to cold reboot and re-run.
|
||||
- **Everything else remains read-only**: `verify.sh` runs without installing anything, no modules are patched and no firmware is flashed (nvflash is only ever used with `--save`). The only other writes are local files (reports, logs), PCI link retrain/rescan sysfs triggers, and package installation during `--preflight` (explicitly gated behind the sudo precondition).
|
||||
|
||||
Reference in New Issue
Block a user