fangorn/sunshine-qemu
public
ref:9cc1e1adc5bae0a2705d2abaf6497a5b4faa3252
fix(linux): open libvirt p2p displays with virDomainOpenGraphics
Found by running Sunshine against a real system libvirt (10.0) as an
unprivileged member of the libvirt group: the D-Bus handshake on the
socket from virDomainOpenGraphicsFD failed with 'Exhausted all
available authentication mechanisms'. QEMU authenticates p2p clients
with EXTERNAL, comparing the uid the client claims with the socket's
peer credentials, and those belong to whoever created the pair:
libvirtd, for virDomainOpenGraphicsFD. Sunshine now creates the pair
itself and hands one end to libvirt with virDomainOpenGraphics, which
passes it to QEMU with the same add_client.
Verified: qemu:///system domain with <graphics type='dbus' p2p='yes'>
(QEMU 8.2) streamed to the E2E client with the pattern matched, and
qemu:///session bus mode (QEMU 11.1). Docs: libvirt 10.0 rejects
<input type='touch'>.
Refs #6
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BPNw4PCgkEfhyCjQT19wsb
SHA:
9cc1e1adc5bae0a2705d2abaf6497a5b4faa3252
Author:
Cole Christensen <cole.christensen@gmail.com>
Date:
2026-09-13 10:32
Parents:
b91a635
8 files changed
+59
-36
| Type | ||
|---|---|---|
|
|
docs/configuration.md | +4 −4 |
|
||
|
|
docs/qemu.md | +7 −6 |
|
||
|
|
src/platform/linux/qemu/p2p.cpp | +16 −7 |
|
||
|
|
src/platform/linux/qemu/p2p.h | +5 −4 |
|
||
|
|
src/platform/linux/qemu/session.h | +1 −1 |
|
||
|
|
tests/e2e/README.md | +1 −1 |
|
||
|
|
tests/unit/platform/linux/qemu/fake_libvirt/fake_libvirt.c | +10 −8 |
|
||
|
|
tests/unit/platform/linux/qemu/test_p2p.cpp | +15 −5 |
|
||