Repository navigation
Conversation
Owner
|
NO SLOP! |
Author
|
Manually replace your very slow Gen2 activation method with a faster one. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replace the default 600-iteration Gen2 "window hammer" service with a bounded, endpoint-first retrain and conditional FLR/second-driver-pass sequence. This avoids waiting for the hammer counter when the endpoint still reports a Gen1-only policy, and supports every enumerated supported CMP 170HX rather than a fixed GPU count.
Changes
tools/gen2-second-pass.sh, adapted from the activation method inrjohny55/cmp170hx-unlocker. It initializes the already-patched driver, tries endpoint-first then upstream-port retraining, and checks target-speed readback. If necessary, it unbinds the idle cards, unloads the NVIDIA modules, performs FLR, initializes the same driver again, and repeats retraining.gen2.serviceand installer, keepingtools/service.sh install/remove/status/verifyand thesystemd.mask=gen2.servicerecovery option. Installing the service does not run activation in the current session. The old hammer source remains available in the repository, but is no longer the installed/default helper.10de:20c2and10de:2082on each invocation. An optional positive count is an extra inventory guard; it is not hard-coded to one or four GPUs. Generation and lane width are independent: the same speed/retrain masks work at x4/x8/x16 without trying to force lane width.flock, restore previously loaded NVIDIA modules on exit, and log failures instead of reporting false success. Resetting the driver is intended for early boot or an idle maintenance window, not a live desktop/GPU workload.Before=basic.target). This PR does not make activation asynchronous/non-blocking: GPU clients should not race an FLR/driver reload. It removes the long repeated window-hunting approach, but further boot targets still wait for this one-shot operation.Testing
Local validation of this proposed integration:
bash -nand ShellCheck 0.11.0 passed; pytest passed 45 tests plus 31 subtests. Fixtures exercise 1/2/4/8 mixed supported cards, x4/x8/x16, first-pass and FLR/second-pass success, already-Gen2 no-op, unsupported devices, stale/empty inventory, active clients, client-inspection errors, missing FLR, PCI I/O failures, failed driver initialization, failed second pass, module restoration and a link dropping during the stability check. No real PCI device or loaded driver is touched by these fixtures.Command:
PATH=/tmp/shellcheck-v0.11.0:$PATH python -m pytest -q tests/test_lint.py tests/test_compile.py tests/test_gen2_second_pass.py tests/test_patches.py -k 'not passthrough_module_builds and not patches_apply' -p no:cacheprovider. Six existing kernel-module/patch-matrix cases were not run locally: this container has no/lib/modulesheaders and the driver patch files are unchanged. The existing GitHub CI remains responsible for those checks; no full kernel-build result is claimed here.The underlying endpoint-first/second-driver-pass method was previously exercised on physical hardware. The newly adapted installer/extra fail-closed checks in this branch have only been tested with fixtures, not reinstalled on the live servers during PR preparation.
Hardware tested on (underlying activation method):
10de:20c2, 65536 MiB per card.6.8.0-142-generic, patched NVIDIA open driver610.57.04. A later eight-card startup smoke check also used615.71.09; that host required a separate serialized-probe driver fix, which is deliberately not part of this PR. No hardware result is claimed for the author's latest615.78.08here.Reproducible records for the underlying method:
Only startup/retrain smoke checks are claimed. Long-term link/workload stability and platform-specific FLR behavior still need validation; this is not a benchmark against every BIOS, card sample or upstream revision.