Do not enable SPICE when GTK or SDL are the selected display. Fixes #466

QEMU 7.0 introduces a change/regression where it is not possible to use GL accerlation via GTK/SDL displays and also bring up SPICE: https://gitlab.com/qemu-project/qemu/-/issues/1036

This patch prevents Quickemu from bringing up SPICE when GTK or SDK are selected as the display.
pull/535/head
Martin Wimpress 2 years ago
parent 1b151955b0
commit 0ee102dc4b
No known key found for this signature in database
GPG Key ID: 61DF940515E06DA3
  1. 89
      quickemu

@ -806,42 +806,52 @@ function vm_boot() {
done done
fi fi
local SPICE="disable-ticketing=on" if [ "${OUTPUT}" == "none" ] || [ "${OUTPUT}" == "spice" ] || [ "${OUTPUT}" == "spice-app" ]; then
if [ -z "${SPICE_PORT}" ]; then local SPICE="disable-ticketing=on"
# Find a free port for spice # gl=on can be use with 'spice' too, but only over local connections (not tcp ports)
SPICE_PORT=$(get_port 5930 9) if [ "${OUTPUT}" == "spice-app" ]; then
fi SPICE+=",gl=${gl}"
fi
if [ -z "${SPICE_PORT}" ]; then # TODO: Don't use ports so local-only connections can be used with gl=on
echo " - SPICE: All SPICE ports have been exhausted." if [ -z "${SPICE_PORT}" ]; then
if [ "${OUTPUT}" == "none" ] || [ "${OUTPUT}" == "spice" ] || [ "${OUTPUT}" == "spice-app" ]; then # Find a free port for spice
echo " ERROR! Requested SPICE display, but no SPICE ports are free." SPICE_PORT=$(get_port 5930 9)
exit 1
fi fi
else
if [ "${OUTPUT}" == "spice-app" ]; then if [ -z "${SPICE_PORT}" ]; then
echo " - SPICE: Enabled" echo " - SPICE: All SPICE ports have been exhausted."
if [ "${OUTPUT}" == "none" ] || [ "${OUTPUT}" == "spice" ] || [ "${OUTPUT}" == "spice-app" ]; then
echo " ERROR! Requested SPICE display, but no SPICE ports are free."
exit 1
fi
else else
echo "spice,${SPICE_PORT}" >> "${VMDIR}/${VMNAME}.ports" if [ "${OUTPUT}" == "spice-app" ]; then
echo -n " - SPICE: On host: spicy --title \"${VMNAME}\" --port ${SPICE_PORT}" echo " - SPICE: Enabled"
if [ "${guest_os}" != "macos" ] && [ -n "${PUBLIC}" ]; then else
echo -n " --spice-shared-dir ${PUBLIC}" echo "spice,${SPICE_PORT}" >> "${VMDIR}/${VMNAME}.ports"
echo -n " - SPICE: On host: spicy --title \"${VMNAME}\" --port ${SPICE_PORT}"
if [ "${guest_os}" != "macos" ] && [ -n "${PUBLIC}" ]; then
echo -n " --spice-shared-dir ${PUBLIC}"
fi
echo "${FULLSPICY}"
SPICE="${SPICE},port=${SPICE_PORT},addr=127.0.0.1"
fi fi
echo "${FULLSPICY}"
SPICE="${SPICE},port=${SPICE_PORT},addr=127.0.0.1"
fi fi
fi
if [ -n "${PUBLIC}" ]; then if [ -n "${PUBLIC}" ]; then
case ${guest_os} in case ${guest_os} in
macos) macos)
if [ "${OUTPUT}" == "none" ] || [ "${OUTPUT}" == "spice" ] || [ "${OUTPUT}" == "spice-app" ]; then
# Reference: https://gitlab.gnome.org/GNOME/phodav/-/issues/5 # Reference: https://gitlab.gnome.org/GNOME/phodav/-/issues/5
echo " - WebDAV: On guest: build spice-webdavd (https://gitlab.gnome.org/GNOME/phodav/-/merge_requests/24)" echo " - WebDAV: On guest: build spice-webdavd (https://gitlab.gnome.org/GNOME/phodav/-/merge_requests/24)"
echo " - WebDAV: On guest: Finder -> Connect to Server -> http://localhost:9843/" echo " - WebDAV: On guest: Finder -> Connect to Server -> http://localhost:9843/"
;; fi
*) ;;
echo " - WebDAV: On guest: dav://localhost:9843/";; *)
esac echo " - WebDAV: On guest: dav://localhost:9843/";;
fi esac
fi fi
if [ "${guest_os}" != "windows" ] && [ -n "${PUBLIC}" ]; then if [ "${guest_os}" != "windows" ] && [ -n "${PUBLIC}" ]; then
@ -896,16 +906,21 @@ function vm_boot() {
${VIDEO} -display ${DISPLAY_RENDER} ${VIDEO} -display ${DISPLAY_RENDER}
-audiodev ${AUDIO_DEV} -audiodev ${AUDIO_DEV}
-device intel-hda -device hda-duplex,audiodev=audio0 -device intel-hda -device hda-duplex,audiodev=audio0
-rtc base=localtime,clock=host,driftfix=slew -rtc base=localtime,clock=host,driftfix=slew)
-spice ${SPICE}
-device virtio-serial-pci # Only enable SPICE is using SPICE display
-chardev socket,id=agent0,path="${VMDIR}/${VMNAME}-agent.sock",server=on,wait=off if [ "${OUTPUT}" == "none" ] || [ "${OUTPUT}" == "spice" ] || [ "${OUTPUT}" == "spice-app" ]; then
-device virtserialport,chardev=agent0,name=org.qemu.guest_agent.0 args+=(-spice ${SPICE}
-chardev spicevmc,id=vdagent0,name=vdagent -device virtio-serial-pci
-device virtserialport,chardev=vdagent0,name=com.redhat.spice.0 -chardev socket,id=agent0,path="${VMDIR}/${VMNAME}-agent.sock",server=on,wait=off
-chardev spiceport,id=webdav0,name=org.spice-space.webdav.0 -device virtserialport,chardev=agent0,name=org.qemu.guest_agent.0
-device virtserialport,chardev=webdav0,name=org.spice-space.webdav.0 -chardev spicevmc,id=vdagent0,name=vdagent
-device virtio-rng-pci,rng=rng0 -device virtserialport,chardev=vdagent0,name=com.redhat.spice.0
-chardev spiceport,id=webdav0,name=org.spice-space.webdav.0
-device virtserialport,chardev=webdav0,name=org.spice-space.webdav.0)
fi
args+=(-device virtio-rng-pci,rng=rng0
-object rng-random,id=rng0,filename=/dev/urandom -object rng-random,id=rng0,filename=/dev/urandom
-device ${USB_HOST_PASSTHROUGH_CONTROLLER},id=spicepass -device ${USB_HOST_PASSTHROUGH_CONTROLLER},id=spicepass
-chardev spicevmc,id=usbredirchardev1,name=usbredir -chardev spicevmc,id=usbredirchardev1,name=usbredir

Loading…
Cancel
Save