From 40bfe0d3d4d1e1cb2e5431a52d6443b00b034786 Mon Sep 17 00:00:00 2001 From: Kroese Date: Thu, 25 Jan 2024 17:28:47 +0100 Subject: [PATCH] feat: GPU pass-through (#385) --- src/display.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/display.sh b/src/display.sh index 0280020..f0247eb 100644 --- a/src/display.sh +++ b/src/display.sh @@ -26,7 +26,9 @@ if [[ "$GPU" != [Yy1]* ]] || [[ "$ARCH" != "amd64" ]]; then return 0 fi -DISPLAY_OPTS="-display egl-headless,rendernode=/dev/dri/renderD128 -vga $VGA" +[[ "${VGA,,}" == "virtio" ]] && VGA="virtio-vga-gl" +DISPLAY_OPTS="-display egl-headless,rendernode=/dev/dri/renderD128" +DISPLAY_OPTS="$DISPLAY_OPTS -vga none -device $VGA" [[ "${DISPLAY,,}" == "vnc" ]] && DISPLAY_OPTS="$DISPLAY_OPTS -vnc :0" [[ "${DISPLAY,,}" == "web" ]] && DISPLAY_OPTS="$DISPLAY_OPTS -vnc :0,websocket=5700"