use nvidia-smi to gate zink

This commit is contained in:
thelamer 2025-06-18 09:15:00 -04:00
parent 8e4f3a30dc
commit 3f805a6a79
No known key found for this signature in database

View File

@ -42,15 +42,8 @@ if [ ! -f "${STARTUP_FILE}" ]; then
chmod +x $STARTUP_FILE chmod +x $STARTUP_FILE
fi fi
# Check for any render nodes # Enable Nvidia GPU support if detected
for node in /dev/dri/renderD*; do if which nvidia-smi && [ "${DISABLE_ZINK}" == "false" ]; then
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
export LIBGL_KOPPER_DRI2=1 export LIBGL_KOPPER_DRI2=1
export MESA_LOADER_DRIVER_OVERRIDE=zink export MESA_LOADER_DRIVER_OVERRIDE=zink
export GALLIUM_DRIVER=zink export GALLIUM_DRIVER=zink