Add support for nvidia driver selection at boot time - #1041
Draft
vigh-m wants to merge 3 commits into
Draft
Conversation
vigh-m
force-pushed
the
nvidia-multi-driver/core-kit
branch
2 times, most recently
from
September 11, 2026 21:59
4637cf1 to
ea035aa
Compare
Add `match-nvidia-branch`, which resolves the active NVIDIA driver branch (settings.kernel.drivers.nvidia.branch, else PCI device detection) and writes a marker file. Make `match-nvidia-driver` flavour matching branch-aware so co-installed lts and pb drivers select the right units. Signed-off-by: Vighnesh Maheshwari <vighmah@amazon.com>
Order these GPU servces after drivers.target to ensure that they wait for the GPU devices and kernel modules to be loaded regardless of a multi driver or single driver variant definition Signed-off-by: Vighnesh Maheshwari <vighmah@amazon.com>
On dual-branch images both NVIDIA driver branches (lts and pb) are co-installed, and one is selected at boot via the services in this subpackage - nvidia-select-branch.service: a oneshot, ordered before drivers.target, that runs `ghostdog match-nvidia-branch` to pick the branch and write the marker file. - nvidia-<branch>-.service.d/10-branch-gate.conf: a systemd prefix drop-in. The trailing dash means the drop-in applies to every unit whose name begins with nvidia-<branch>- (the overlay service and all per-branch module-load units), gating them on ConditionPathExists=/run/nvidia/branch-<branch> and ordering them after nvidia-select-branch.service. - drivers.target drop-in ordering drivers.target after the selection oneshot. The subpackage is pulled in only on nvidia/nvidia-fips variants built with the nvidia-dual-branch image feature; single-driver images omit it and run their units unconditionally. Signed-off-by: Vighnesh Maheshwari <vighmah@amazon.com>
vigh-m
force-pushed
the
nvidia-multi-driver/core-kit
branch
from
September 11, 2026 22:42
ea035aa to
8fa54ff
Compare
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.
Description of changes:
Adds boot-time NVIDIA driver-branch selection for dual-branch images.
The kernel-kit change (bottlerocket-kernel-kit#536) makes the
ltsandpbdriver branches co-installable and namespaces each branch's units asnvidia-<branch>-*ghostdog
match-nvidia-branchmatch-nvidia-branchsubcommand. It resolves the target branch fromsettings.kernel.drivers.nvidia.branch(added in bottlerocket-settings-sdk#154), falling back to instance-type detection when the setting is unset/run/nvidia/branch-<branch>marker fileos package wiring
nvidia-select-branchsubpackage requiringnvidia-lts,nvidia-pb, only installed whennvidia-dual-branchimage feature is enabled (twoliter#747), and building and nvidia variantnvidia-select-branch.serviceto executeghostdog match-nvidia-branchin a dual driver imageService reordering
ecs-gpu-init.serviceandgenerate-cdi-specs.servicenow orderAfter=drivers.targetinstead of the branch-specificload-*-kernel-modules.serviceunits, since those unit names are now per-branch.Testing done:
Terms of contribution:
By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.