Add support for nvidia driver selection at boot time - #1041
Merged
vigh-m merged 3 commits intoSep 18, 2026
Merged
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
vigh-m
force-pushed
the
nvidia-multi-driver/core-kit
branch
from
September 11, 2026 22:42
ea035aa to
8fa54ff
Compare
qianxjcraig
reviewed
Sep 16, 2026
vigh-m
force-pushed
the
nvidia-multi-driver/core-kit
branch
4 times, most recently
from
September 17, 2026 20:18
42589aa to
a2aa8d4
Compare
vigh-m
marked this pull request as ready for review
September 17, 2026 20:19
piyush-jena
reviewed
Sep 17, 2026
piyush-jena
reviewed
Sep 17, 2026
qianxjcraig
approved these changes
Sep 17, 2026
ginglis13
reviewed
Sep 18, 2026
ginglis13
left a comment
Contributor
There was a problem hiding this comment.
still working through the PR, just two initial nits
ginglis13
reviewed
Sep 18, 2026
ginglis13
reviewed
Sep 18, 2026
ginglis13
reviewed
Sep 18, 2026
ginglis13
reviewed
Sep 18, 2026
maherthomsi
reviewed
Sep 18, 2026
vigh-m
force-pushed
the
nvidia-multi-driver/core-kit
branch
from
September 18, 2026 22:42
a2aa8d4 to
de0d119
Compare
ginglis13
approved these changes
Sep 18, 2026
ginglis13
left a comment
Contributor
There was a problem hiding this comment.
LGTM, thanks for the testing deets
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 ecs-gpu-init and generate-cdi-specs after drivers.target so they wait for the GPU devices and kernel modules to load, on both multi- and single-driver variants. 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 18, 2026 23:05
de0d119 to
03e9fd9
Compare
ginglis13
approved these changes
Sep 18, 2026
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.Tested with workload tests via the following:
Backward compatibility (namespaced kernel-kit + existing core-kit/Twoliter)
Image feature — happy path
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.