From b6f5b1aeb8f57ef238cddf82c1beaa4f566c8b4d Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Tue, 16 Apr 2024 23:48:30 +0100 Subject: [PATCH] fix: use vmware-svga for old Ubuntu releases. Fixes #966 --- quickemu | 6 ++++-- quickget | 8 ++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/quickemu b/quickemu index 632afe5..eeb5efe 100755 --- a/quickemu +++ b/quickemu @@ -479,7 +479,7 @@ function vm_boot() { # Make any OS specific adjustments case ${guest_os} in - batocera|*bsd|freedos|haiku|linux|*solaris) + batocera|*bsd|freedos|haiku|linux*|*solaris) CPU="-cpu host,kvm=on" if [ "${HOST_CPU_VENDOR}" == "AuthenticAMD" ]; then CPU="${CPU},topoext" @@ -742,7 +742,9 @@ function vm_boot() { fi # https://www.kraxel.org/blog/2019/09/display-devices-in-qemu/ - if [ "${guest_os}" == "linux" ]; then + if [ "${guest_os}" == "linux_old" ]; then + DISPLAY_DEVICE="vmware-svga" + elif [ "${guest_os}" == "linux" ]; then case ${OUTPUT} in none|spice|spice-app) DISPLAY_DEVICE="virtio-gpu";; diff --git a/quickget b/quickget index 7b06e26..0be3446 100755 --- a/quickget +++ b/quickget @@ -1576,6 +1576,14 @@ function make_vm_config() { truenas*) GUEST="truenas" IMAGE_TYPE="iso";; + ubuntu*) + GUEST="linux" + IMAGE_TYPE="iso" + local SHORT_RELEASE="$(echo "${RELEASE}" | sed s'/\.//g')" + if [ ${SHORT_RELEASE} -lt 1604 ]; then + GUEST="linux_old" + fi + ;; windows) GUEST="windows" IMAGE_TYPE="iso";;