From 70b5d8148c44c0c1c25b3a4e2b41e858aede81f8 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Fri, 20 Mar 2020 21:48:27 +0000 Subject: [PATCH] Default to gl=on and clean up graphics status Actually, `gl=on` and `virgil=on` are both required to enable full acceleration. `virgil=on` is not currently working with GTK, so set to off if GTK is used. --- quickemu | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/quickemu b/quickemu index d993f1f..2bf91c7 100755 --- a/quickemu +++ b/quickemu @@ -89,7 +89,7 @@ function vm_boot() { local VMNAME=$(basename ${VM} .conf) local VMDIR=$(dirname ${disk_img}) local BIOS="" - local GL="off" + local GL="on" local VIRGL="on" local UI="sdl" local QEMU_VER=$(${QEMU} -version | head -n1 | cut -d' ' -f4 | cut -d'(' -f1) @@ -165,8 +165,6 @@ function vm_boot() { ram="3G" fi echo " - RAM: ${ram}" - echo " - UI: ${UI}" - echo " - VIRGL: ${VIRGL}" local xres=1152 local yres=648 @@ -186,7 +184,17 @@ function vm_boot() { yres=648 fi fi - echo " - Display: ${xres}x${yres}" + + # GL is not working with GTK currently + if [ "${UI}" == "gtk" ]; then + GL="off" + else + echo " - Display: ${xres}x${yres}" + fi + echo " - GL: ${GL}" + echo " - Virgil3D: ${VIRGL}" + echo " - Output: ${UI^^}" + # Set the hostname of the VM local NET="user,hostname=${VMNAME}" @@ -215,7 +223,7 @@ function vm_boot() { ${QEMU} -name ${VMNAME},process=${VMNAME} \ ${BIOS} \ -cdrom "${iso}" \ - -drive "file=${disk_img},format=qcow2,if=virtio,aio=native,cache.direct=on" \ + -drive id=disk,file=${disk_img},format=qcow2,if=virtio,aio=native,cache.direct=on \ -enable-kvm \ -machine q35,accel=kvm \ -cpu host,kvm=on \