update 1.2.2.2 beta

This commit is contained in:
MacRimi
2026-07-04 22:58:07 +02:00
parent d59b1af8a9
commit 877f7a3d81
3 changed files with 78 additions and 0 deletions

View File

@@ -1811,6 +1811,30 @@ sanitize_nvidia_host_stack_for_vfio() {
else
msg_ok "$(translate 'NVIDIA host services already aligned for VFIO mode')" | tee -a "$screen_capture"
fi
# Sync components_status.json — the host driver stays on disk but is
# not in use for this GPU because it now belongs to a VM. Per-BDF
# model: on multi-GPU hosts where another NVIDIA card still uses the
# nvidia driver, keep the status as "installed" — the driver is
# genuinely in use elsewhere. Only flip to "vfio_passthrough" when no
# NVIDIA GPU is bound to the host driver anymore.
if declare -F update_component_status >/dev/null 2>&1; then
local _nvd_ver _nvd_new_status
_nvd_ver=$(jq -r '.nvidia_driver.version // ""' \
/usr/local/share/proxmenux/components_status.json 2>/dev/null)
_nvd_new_status="vfio_passthrough"
# Any NVIDIA PCI device still using the nvidia driver on the host?
if lspci -nnk 2>/dev/null | awk '
/NVIDIA/{gpu=1; next}
gpu && /Kernel driver in use: nvidia$/ {found=1; exit}
/^[^\t]/{gpu=0}
END{exit !found}
'; then
_nvd_new_status="installed"
fi
update_component_status "nvidia_driver" "$_nvd_new_status" \
"${_nvd_ver:-}" "gpu" '{"patched":false}' >>"$LOG_FILE" 2>&1 || true
fi
}
# Per-BDF VFIO binder + legacy NVIDIA blacklist migration are defined in

View File

@@ -338,6 +338,18 @@ EOF
else
msg_ok "$(translate 'NVIDIA host services/autoload already aligned for VFIO mode')" | tee -a "$screen_capture"
fi
# Sync components_status.json — the host driver stays on disk but is
# not in use because the GPU now belongs to a VM. Prevents the update
# notification path (and any future logic gated on nvidia_driver.status)
# from acting on a state that no longer matches reality.
if declare -F update_component_status >/dev/null 2>&1; then
local _nvd_ver
_nvd_ver=$(jq -r '.nvidia_driver.version // ""' \
/usr/local/share/proxmenux/components_status.json 2>/dev/null)
update_component_status "nvidia_driver" "vfio_passthrough" \
"${_nvd_ver:-}" "gpu" '{"patched":false}' >>"$LOG_FILE" 2>&1 || true
fi
}
_restore_nvidia_host_stack_for_lxc() {
@@ -402,6 +414,21 @@ _restore_nvidia_host_stack_for_lxc() {
else
msg_ok "$(translate 'NVIDIA host services/autoload already aligned for native mode')" | tee -a "$screen_capture"
fi
# Sync components_status.json back to installed — the host has reclaimed
# the GPU and the nvidia stack is being reloaded. Restores the state to
# what it was before the VFIO switch so the update notification path and
# the auto-reinstall gate see the driver as active on the host again.
if declare -F update_component_status >/dev/null 2>&1; then
local _nvd_ver
_nvd_ver=$(nvidia-smi --query-gpu=driver_version --format=csv,noheader 2>/dev/null | head -1)
if [[ -z "$_nvd_ver" ]]; then
_nvd_ver=$(jq -r '.nvidia_driver.version // ""' \
/usr/local/share/proxmenux/components_status.json 2>/dev/null)
fi
update_component_status "nvidia_driver" "installed" \
"${_nvd_ver:-}" "gpu" '{"patched":false}' >>"$LOG_FILE" 2>&1 || true
fi
}
_add_amd_softdep() {

View File

@@ -316,6 +316,18 @@ EOF
else
msg_ok "$(translate 'NVIDIA host services/autoload already aligned for VFIO mode')" | tee -a "$screen_capture"
fi
# Sync components_status.json — the host driver stays on disk but is
# not in use because the GPU now belongs to a VM. Prevents the update
# notification path (and any future logic gated on nvidia_driver.status)
# from acting on a state that no longer matches reality.
if declare -F update_component_status >/dev/null 2>&1; then
local _nvd_ver
_nvd_ver=$(jq -r '.nvidia_driver.version // ""' \
/usr/local/share/proxmenux/components_status.json 2>/dev/null)
update_component_status "nvidia_driver" "vfio_passthrough" \
"${_nvd_ver:-}" "gpu" '{"patched":false}' >>"$LOG_FILE" 2>&1 || true
fi
}
_restore_nvidia_host_stack_for_lxc() {
@@ -376,6 +388,21 @@ _restore_nvidia_host_stack_for_lxc() {
else
msg_ok "$(translate 'NVIDIA host services/autoload already aligned for native mode')" | tee -a "$screen_capture"
fi
# Sync components_status.json back to installed — the host has reclaimed
# the GPU and the nvidia stack is being reloaded. Restores the state to
# what it was before the VFIO switch so the update notification path and
# the auto-reinstall gate see the driver as active on the host again.
if declare -F update_component_status >/dev/null 2>&1; then
local _nvd_ver
_nvd_ver=$(nvidia-smi --query-gpu=driver_version --format=csv,noheader 2>/dev/null | head -1)
if [[ -z "$_nvd_ver" ]]; then
_nvd_ver=$(jq -r '.nvidia_driver.version // ""' \
/usr/local/share/proxmenux/components_status.json 2>/dev/null)
fi
update_component_status "nvidia_driver" "installed" \
"${_nvd_ver:-}" "gpu" '{"patched":false}' >>"$LOG_FILE" 2>&1 || true
fi
}
_add_amd_softdep() {