Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions rhel10/nvidia-driver
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,11 @@ _resolve_kernel_version() {
return 0
}

_set_daemons_status() {
mkdir -p /run/nvidia/validations
echo "${1}" > /run/nvidia/validations/.driver-daemons-status
}

# Install the kernel modules header/builtin/order files and generate the kernel version string.
_install_prerequisites() (
local tmp_dir=$(mktemp -d)
Expand Down Expand Up @@ -787,6 +792,7 @@ _start_daemons() {
echo "Starting NVIDIA fabric manager daemon..."
nv-fabricmanager -c /usr/share/nvidia/nvswitch/fabricmanager.cfg || return 1
fi
_set_daemons_status "Ready"
}

_store_driver_digest() {
Expand Down Expand Up @@ -877,6 +883,7 @@ _load() {
}

init() {
_set_daemons_status "NotReady"
_prepare_exclusive

if _should_skip_kernel_module_reload; then
Expand Down
8 changes: 7 additions & 1 deletion rhel8/nvidia-driver
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,11 @@ _resolve_kernel_version() {
return 0
}

_set_daemons_status() {
mkdir -p /run/nvidia/validations
echo "${1}" > /run/nvidia/validations/.driver-daemons-status
}

# Install the kernel modules header/builtin/order files and generate the kernel version string.
_install_prerequisites() (
local tmp_dir=$(mktemp -d)
Expand Down Expand Up @@ -393,7 +398,6 @@ _load_driver() {

echo "Loading ipmi and i2c_core kernel modules..."
modprobe -a i2c_core ipmi_msghandler ipmi_devintf

echo "Loading NVIDIA driver kernel modules..."
set -o xtrace +o nounset
modprobe nvidia
Expand Down Expand Up @@ -764,6 +768,7 @@ _start_daemons() {
echo "Starting NVIDIA fabric manager daemon..."
nv-fabricmanager -c /usr/share/nvidia/nvswitch/fabricmanager.cfg || return 1
fi
_set_daemons_status "Ready"
}

_store_driver_digest() {
Expand Down Expand Up @@ -854,6 +859,7 @@ _load() {
}

init() {
_set_daemons_status "NotReady"
_prepare_exclusive

if _should_skip_kernel_module_reload; then
Expand Down
7 changes: 7 additions & 0 deletions rhel9/nvidia-driver
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,11 @@ _resolve_kernel_version() {
return 0
}

_set_daemons_status() {
mkdir -p /run/nvidia/validations
echo "${1}" > /run/nvidia/validations/.driver-daemons-status
}

# Install the kernel modules header/builtin/order files and generate the kernel version string.
_install_prerequisites() (
local tmp_dir=$(mktemp -d)
Expand Down Expand Up @@ -783,6 +788,7 @@ _start_daemons() {
echo "Starting NVIDIA fabric manager daemon..."
nv-fabricmanager -c /usr/share/nvidia/nvswitch/fabricmanager.cfg || return 1
fi
_set_daemons_status "Ready"
}

_store_driver_digest() {
Expand Down Expand Up @@ -873,6 +879,7 @@ _load() {
}

init() {
_set_daemons_status "NotReady"
_prepare_exclusive

if _should_skip_kernel_module_reload; then
Expand Down
9 changes: 8 additions & 1 deletion ubuntu22.04/nvidia-driver
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,11 @@ _resolve_kernel_version() {
return 0
}

_set_daemons_status() {
mkdir -p /run/nvidia/validations
echo "${1}" > /run/nvidia/validations/.driver-daemons-status
}

# Install the kernel modules header/builtin/order files and generate the kernel version string.
_install_prerequisites() (
local tmp_dir=$(mktemp -d)
Expand Down Expand Up @@ -362,7 +367,6 @@ _load_driver() {

echo "Loading ipmi and i2c_core kernel modules..."
modprobe -a i2c_core ipmi_msghandler ipmi_devintf

echo "Loading NVIDIA driver kernel modules..."
set -o xtrace +o nounset
modprobe nvidia
Expand Down Expand Up @@ -726,6 +730,7 @@ _start_daemons() {
echo "Starting NVIDIA fabric manager daemon..."
nv-fabricmanager -c /usr/share/nvidia/nvswitch/fabricmanager.cfg || return 1
fi
_set_daemons_status "Ready"
}

# Check if fast path should be used (driver already loaded with matching config)
Expand Down Expand Up @@ -800,6 +805,8 @@ init() {
trap "echo 'Caught signal'; exit 1" HUP INT QUIT PIPE TERM
trap "_shutdown" EXIT

_set_daemons_status "NotReady"

if _should_skip_kernel_module_reload; then
echo "The NVIDIA driver is already loaded with the desired configuration, performing userspace-only install"
_unmount_rootfs
Expand Down
9 changes: 8 additions & 1 deletion ubuntu24.04/nvidia-driver
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,11 @@ _resolve_kernel_version() {
return 0
}

_set_daemons_status() {
mkdir -p /run/nvidia/validations
echo "${1}" > /run/nvidia/validations/.driver-daemons-status
}

# Install the kernel modules header/builtin/order files and generate the kernel version string.
_install_prerequisites() (
local tmp_dir=$(mktemp -d)
Expand Down Expand Up @@ -303,7 +308,6 @@ _load_driver() {

echo "Loading ipmi and i2c_core kernel modules..."
modprobe -a i2c_core ipmi_msghandler ipmi_devintf

echo "Loading NVIDIA driver kernel modules..."
set -o xtrace +o nounset
modprobe nvidia
Expand Down Expand Up @@ -654,6 +658,7 @@ _start_daemons() {
echo "Starting NVIDIA fabric manager daemon..."
nv-fabricmanager -c /usr/share/nvidia/nvswitch/fabricmanager.cfg || return 1
fi
_set_daemons_status "Ready"
}

# Check if fast path should be used (driver already loaded with matching config)
Expand Down Expand Up @@ -751,6 +756,8 @@ init() {
trap "echo 'Caught signal'; exit 1" HUP INT QUIT PIPE TERM
trap "_shutdown" EXIT

_set_daemons_status "NotReady"

if _should_skip_kernel_module_reload; then
echo "The NVIDIA driver is already loaded with the desired configuration, performing userspace-only install"
_unmount_rootfs
Expand Down
9 changes: 8 additions & 1 deletion ubuntu26.04/nvidia-driver
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,11 @@ _resolve_kernel_version() {
return 0
}

_set_daemons_status() {
mkdir -p /run/nvidia/validations
echo "${1}" > /run/nvidia/validations/.driver-daemons-status
}

# Install the kernel modules header/builtin/order files and generate the kernel version string.
_install_prerequisites() (
local tmp_dir=$(mktemp -d)
Expand Down Expand Up @@ -315,7 +320,6 @@ _load_driver() {

echo "Loading ipmi and i2c_core kernel modules..."
modprobe -a i2c_core ipmi_msghandler ipmi_devintf

echo "Loading NVIDIA driver kernel modules..."
set -o xtrace +o nounset
modprobe nvidia
Expand Down Expand Up @@ -714,6 +718,7 @@ _start_daemons() {
echo "Starting NVIDIA fabric manager daemon..."
nv-fabricmanager -c /usr/share/nvidia/nvswitch/fabricmanager.cfg || return 1
fi
_set_daemons_status "Ready"
}

# Check if fast path should be used (driver already loaded with matching config)
Expand Down Expand Up @@ -845,6 +850,8 @@ init() {
trap "echo 'Caught signal'; exit 1" HUP INT QUIT PIPE TERM
trap "_shutdown" EXIT

_set_daemons_status "NotReady"

if _should_skip_kernel_module_reload; then
echo "The NVIDIA driver is already loaded with the desired configuration, performing userspace-only install"
_unmount_rootfs
Expand Down