Skip to content

Conversation

@slawomir-andreasik
Copy link
Contributor

@slawomir-andreasik slawomir-andreasik commented Nov 12, 2025

Add SPICE Protocol Support

Summary

This PR adds the qemu-system-modules-spice package to enable SPICE protocol support in the QEMU base image, addressing a critical requirement for GPU passthrough use cases with Looking Glass.

Problem

Currently, users attempting to use SPICE with containers based on this image encounter errors:

ERROR: qemu-system-x86_64: -spice unix=on,addr=/tmp/spice.sock,disable-ticketing: There is no option group 'spice'
qemu-system-x86_64: Perhaps you want to install qemu-system-modules-spice package?

This limitation blocks an important use case that depends on this base image:

GPU Passthrough + Looking Glass Integration

Looking Glass is a popular open-source solution for GPU passthrough that provides near-native graphics performance in virtual machines. According to the official Looking Glass B7 installation guide:

"Looking Glass makes use of the SPICE protocol to provide keyboard and mouse input, audio input and output, and display fallback."

The documentation is explicit: without SPICE, you cannot send keyboard/mouse events to the guest. This makes SPICE an essential requirement (not optional) for GPU passthrough setups using Looking Glass, particularly for:

  • Anti-cheat compatible gaming (Looking Glass doesn't trigger anti-cheat systems)
  • Ultra-low latency display with proper input handling
  • Modern Wayland/compositor environments (SPICE provides relative mouse mode required by Looking Glass)
  • Audio input/output via SPICE agent

Solution

The fix is a single line addition: install qemu-system-modules-spice alongside existing dependencies. This enables QEMU's -spice option without affecting any existing functionality.

qemu-system-x86 \
qemu-system-modules-spice && \

Use Cases Enabled

This change enables downstream projects (like dockurr/windows and others) to:

  1. Support GPU passthrough workflows - Integrate Looking Glass for gaming VMs with proper input handling via SPICE

Impact

  • Backward compatible - Simply adds an optional package; existing functionality unchanged
  • Widely tested - SPICE module has been successfully used in community builds
  • Addresses real user needs - Multiple downstream projects require this capability

Context

This change benefits all downstream projects that build on qemux/qemu by enabling SPICE support at the base layer, rather than requiring each project to add it separately.

Testing

The SPICE module has been tested successfully with:

  • GPU passthrough + Looking Glass configurations
  • SPICE socket connectivity (unix=on,addr=/tmp/spice.sock)
  • Input device handling (mouse, keyboard via SPICE agent)
  • Audio routing via SPICE

Note on SPICE Deprecation

While SPICE development has slowed, it remains:

  • Actively maintained in Debian/Ubuntu repositories
  • Essential for Looking Glass (no alternative exists)
  • Required by a significant user base for GPU passthrough use cases

Including this module keeps the base image flexible for users who need SPICE, while not impacting those who don't.


This single-line change unblocks an important class of GPU passthrough use cases while maintaining the project's clean architecture and minimal footprint.

@kroese
Copy link
Collaborator

kroese commented Nov 12, 2025

Thanks!

@kroese kroese merged commit c329bad into qemus:master Nov 12, 2025
2 checks passed
@kroese
Copy link
Collaborator

kroese commented Nov 22, 2025

I have to revert this. It makes the image MUCH larger, which is unwanted as only a small percentage of the users will need it. So to deliver an image that is almost double in size will not make any sense in that case.

Also, the QEMU developers have said multiple times that SPICE is deprecated and obsolete, and the spice code has not been updated in years. So it really looks like abandoned technology (even though not all of its features are fully replaced yet by virtio-gpu-dod).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants