[SRU][canonical-kernel-snaps/main][PATCH 1/1] nvidia-user: Replace invalid OCL_ICD path list in mangler with guarded single path
Aaron Jauregui
aaron.jauregui at canonical.com
Mon Aug 17 04:50:34 UTC 2026
OCL_ICD_VENDORS was being resolved to a path list, which is invalid.
Instead, only set it to a single path. Also add a guard to the variable
export in order to prevent overwriting the variable if it is already
set, and to prevent setting it to a non-existent path.
BugLink: https://bugs.launchpad.net/bugs/2163398
Signed-off-by: Aaron Jauregui <aaron.jauregui at canonical.com>
---
hooks/nvidia-user/kernel-gpu-2404-provider-mangler | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/hooks/nvidia-user/kernel-gpu-2404-provider-mangler b/hooks/nvidia-user/kernel-gpu-2404-provider-mangler
index c7e7b48..7c6f938 100755
--- a/hooks/nvidia-user/kernel-gpu-2404-provider-mangler
+++ b/hooks/nvidia-user/kernel-gpu-2404-provider-mangler
@@ -3,7 +3,11 @@
ARCH_TRIPLET="$(uname -m)-linux-gnu"
-export OCL_ICD_VENDORS=${OCL_ICD_VENDORS:+$OCL_ICD_VENDORS:}${COMPONENT_PATH}/etc/OpenCL/vendors
+# LP: #2163398 OpenCL path was resolving to an invalid path list, and pointing
+# to nonexistent dir. Guard path to prevent this
+if [ -z "${OCL_ICD_VENDORS:-}" ] && [ -d "${COMPONENT_PATH}/etc/OpenCL/vendors" ]; then
+ export OCL_ICD_VENDORS=${COMPONENT_PATH}/etc/OpenCL/vendors
+fi
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}${COMPONENT_PATH}/usr/lib/${ARCH_TRIPLET}:${COMPONENT_PATH}/usr/lib/${ARCH_TRIPLET}/vdpau
export __EGL_VENDOR_LIBRARY_DIRS=${__EGL_VENDOR_LIBRARY_DIRS:+$__EGL_VENDOR_LIBRARY_DIRS:}${COMPONENT_PATH}/usr/share/glvnd/egl_vendor.d
export __EGL_EXTERNAL_PLATFORM_CONFIG_DIRS=${__EGL_EXTERNAL_PLATFORM_CONFIG_DIRS:+$__EGL_EXTERNAL_PLATFORM_CONFIG_DIRS:}${COMPONENT_PATH}/usr/share/egl/egl_external_platform.d
--
2.43.0
More information about the kernel-team
mailing list