use nvidia-smi to gate zink

This commit is contained in:
thelamer 2025-06-18 09:15:17 -04:00
parent ea0b315017
commit c4c87f882b
No known key found for this signature in database

View File

@ -42,19 +42,11 @@ if [ ! -f "${STARTUP_FILE}" ]; then
chmod +x $STARTUP_FILE
fi
# Check for any render nodes
for node in /dev/dri/renderD*; do
if [ -e "$node" ]; then
render_node_exists=true
break
fi
done
# Enable Zink support if detected
if [ "$render_node_exists" = true ] && [ "${DISABLE_ZINK}" == "false" ]; then
# Enable Nvidia GPU support if detected
if which nvidia-smi && [ "${DISABLE_ZINK}" == "false" ]; then
export LIBGL_KOPPER_DRI2=1
export MESA_LOADER_DRIVER_OVERRIDE=zink
export GALLIUM_DRIVER=zink
unset LD_PRELOAD
fi
# Start DE