Skip to content

Commit

Permalink
feat: Custom VGA adaptor (#573)
Browse files Browse the repository at this point in the history
  • Loading branch information
kroese authored Jan 17, 2024
1 parent 3706ca8 commit f3e17e3
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/display.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,19 @@ set -Eeuo pipefail

# Docker environment variables

: "${GPU:="N"}" # GPU passthrough
: "${GPU:="N"}" # GPU passthrough
: "${VGA:="virtio"}" # VGA adaptor
: "${DISPLAY:="none"}" # Display type

if [[ "$GPU" != [Yy1]* ]] || [[ "$ARCH" != "amd64" ]]; then

DISPLAY_OPTS="-display $DISPLAY -vga none"
[[ "${DISPLAY,,}" == "none" ]] && VGA="none"
DISPLAY_OPTS="-display $DISPLAY -vga $VGA"
return 0

fi

DISPLAY_OPTS="-display egl-headless,rendernode=/dev/dri/renderD128 -vga virtio"
DISPLAY_OPTS="-display egl-headless,rendernode=/dev/dri/renderD128 -vga $VGA"

[ ! -d /dev/dri ] && mkdir -m 755 /dev/dri

Expand Down

0 comments on commit f3e17e3

Please sign in to comment.