Skip to content

Commit cbe8fe6

Browse files
committed
update nvidia detection to handle hosts that use runtime with no GPU
1 parent 40f5df9 commit cbe8fe6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

root/defaults/startwm.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ if [ ! -f "${STARTUP_FILE}" ]; then
4343
fi
4444

4545
# Enable Nvidia GPU support if detected
46-
if which nvidia-smi && [ "${DISABLE_ZINK}" == "false" ]; then
46+
if which nvidia-smi > /dev/null 2>&1 && ls -A /dev/dri 2>/dev/null && [ "${DISABLE_ZINK}" == "false" ]; then
4747
export LIBGL_KOPPER_DRI2=1
4848
export MESA_LOADER_DRIVER_OVERRIDE=zink
4949
export GALLIUM_DRIVER=zink

0 commit comments

Comments
 (0)