mirror of
				https://github.com/oSoWoSo/DistroHopper.git
				synced 2024-08-14 22:46:53 +00:00 
			
		
		
		
	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.
This commit is contained in:
		
							parent
							
								
									1b151955b0
								
							
						
					
					
						commit
						0ee102dc4b
					
				
					 1 changed files with 56 additions and 41 deletions
				
			
		
							
								
								
									
										97
									
								
								quickemu
									
										
									
									
									
								
							
							
						
						
									
										97
									
								
								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 | ||||||
|  |       SPICE+=",gl=${gl}" | ||||||
|  |     fi | ||||||
|  | 
 | ||||||
|  |     # TODO: Don't use ports so local-only connections can be used with gl=on | ||||||
|  |     if [ -z "${SPICE_PORT}" ]; then | ||||||
|  |       # Find a free port for spice | ||||||
|  |       SPICE_PORT=$(get_port 5930 9) | ||||||
|  |     fi | ||||||
|  | 
 | ||||||
|  |     if [ -z "${SPICE_PORT}" ]; then | ||||||
|  |       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 | ||||||
|  |       if [ "${OUTPUT}" == "spice-app" ]; then | ||||||
|  |         echo " - SPICE:    Enabled" | ||||||
|  |       else | ||||||
|  |         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 | ||||||
|   fi |   fi | ||||||
| 
 | 
 | ||||||
|   if [ -z "${SPICE_PORT}" ]; then |   if [ -n "${PUBLIC}" ]; then | ||||||
|     echo " - SPICE:    All SPICE ports have been exhausted." |     case ${guest_os} in | ||||||
|     if [ "${OUTPUT}" == "none" ] || [ "${OUTPUT}" == "spice" ] || [ "${OUTPUT}" == "spice-app" ]; then |       macos) | ||||||
|       echo "             ERROR! Requested SPICE display, but no SPICE ports are free." |         if [ "${OUTPUT}" == "none" ] || [ "${OUTPUT}" == "spice" ] || [ "${OUTPUT}" == "spice-app" ]; then | ||||||
|       exit 1 |  | ||||||
|     fi |  | ||||||
|   else |  | ||||||
|     if [ "${OUTPUT}" == "spice-app" ]; then |  | ||||||
|       echo " - SPICE:    Enabled" |  | ||||||
|     else |  | ||||||
|       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 |  | ||||||
| 
 |  | ||||||
|     if [ -n "${PUBLIC}" ]; then |  | ||||||
|       case ${guest_os} in |  | ||||||
|         macos) |  | ||||||
|           # 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…
	
	Add table
		Add a link
		
	
		Reference in a new issue