fangorn/sunshine-qemu
public
ref:main
Deferred: macOS host support (QEMU+HVF) #10
open
Opened by cole.christensen@gmail.com
Links
Deferred: macOS host support (QEMU+HVF → Sunshine on macOS)
Parent: #1. Deferred; not a requirement for the current phases. Don’t start this without the owner’s go-ahead.
Findings (2026-09-12, Apple M4, Homebrew QEMU 11.1.1)
- Homebrew QEMU on macOS includes
-display dbusand-audiodev dbus(checked with-display help/-audiodev help). - No DMABUF on macOS: QEMU’s GPU scanout paths are Linux (
CONFIG_GBM) or Windows (D3D11) only, inui/dbus-listener.c. Frames arrive asScanout/Updatepixel copies over the socket, orListener.Unix.Maponly if QEMU can create shareable memory on macOS (unverified; memfd is Linux-only). - No virgl guest 3D on macOS QEMU, so this is a remote-desktop use case, not gaming.
- Sunshine’s macOS platform layer is
src/platform/macos/(AVFoundation capture, VideoToolbox vianv12_zero_device, input through libvirtualhid). It’s upstream’s least mature platform.
What keeps this cheap later
- #2’s QemuSession, audio and input code must depend only on GLib/gio, POSIX and Sunshine’s
platfinterfaces, with no Linux-only headers outside the capture vram path. Keep it in a directory that could move fromplatform/linux/qemu/toplatform/common/qemu/without edits.
Rough scope if picked up
macOS display_t for shm frames → VideoToolbox; verify the Unix.Map fallback on macOS; build SUNSHINE_ENABLE_QEMU on macOS with Homebrew glib; a p2p or session-bus setup on macOS (no system D-Bus by default).