ref:main

Deferred: macOS host support (QEMU+HVF) #10

open Opened by cole.christensen@gmail.com

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 dbus and -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, in ui/dbus-listener.c. Frames arrive as Scanout/Update pixel copies over the socket, or Listener.Unix.Map only 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 via nv12_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 platf interfaces, with no Linux-only headers outside the capture vram path. Keep it in a directory that could move from platform/linux/qemu/ to platform/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).