Replaces the clamp-and-crop fix from 14a6f2a9 with the real fix: when
the display controller is hardware-scaling a plane at scanout (its
CRTC destination rect differs from the plane's native buffer size --
e.g. a game's native-resolution exclusive-fullscreen swapchain
stretched to fill a higher-resolution output), kmsgrab's raw DMA-BUF
import bypasses that scaler entirely and only ever sees the pre-scale
buffer. Reproduce the same upscale with a linear-filtered
glBlitFramebuffer into a scratch texture sized to the configured
capture resolution, before the existing GetTextureSubImage readback,
so the captured frame matches what the display actually shows instead
of being cropped to the plane's native corner.
The scratch texture/FBOs are lazily created on first use and reused
across frames; the common case (plane already fills the output, no
scaling needed) is unaffected and takes the same path as before.
Untested against real hardware in this session -- built by
cross-referencing this project's own glad config (gl:compatibility=4.6,
confirming BlitFramebuffer/GL_READ_FRAMEBUFFER/GL_DRAW_FRAMEBUFFER are
generated) and the existing FBO helper patterns already used elsewhere
in this file, but needs a live test to confirm the blit against an
EGLImage-backed source texture behaves as expected on this driver.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
ℹ️ About
Sunshine is a self-hosted game stream host for Moonlight. Offering low-latency, cloud gaming server capabilities with support for AMD, Intel, and Nvidia GPUs for hardware encoding. Software encoding is also available. You can connect to Sunshine from any Moonlight client on a variety of devices. A web UI is provided to allow configuration, and client pairing, from your favorite web browser. Pair from the local server or any mobile device.
LizardByte has the full documentation hosted on Read the Docs
🎮 Feature Compatibility
| Feature | FreeBSD | Linux | macOS | Windows |
|---|---|---|---|---|
|
What type of gamepads can be emulated on the host. Clients may support other gamepads. |
||||
| DualShock / DS4 (PlayStation 4) | ➖ | ➖ | ❌ | ✅ |
| DualSense / DS5 (PlayStation 5) | ❌ | ✅ | ❌ | ❌ |
| Nintendo Switch Pro | ✅ | ✅ | ❌ | ❌ |
| Xbox 360 | ➖ | ➖ | ❌ | ✅ |
| Xbox One/Series | ✅ | ✅ | ❌ | ❌ |
| Encoding API | GPU Vendor | FreeBSD | Linux | macOS | Windows |
|---|---|---|---|---|---|
| AMF | AMD | ➖ | ➖ | ➖ | ✅ |
| Media Foundation | Qualcomm | ➖ | ➖ | ➖ | ✅ |
| NVENC | NVIDIA | ➖ | ✅ | ➖ | ✅ |
| QuickSync | Intel | ➖ | ➖ | ➖ | ✅ |
| VAAPI | AMD | ✅ | ✅ | ➖ | ➖ |
| Intel | ✅ | ✅ | ➖ | ➖ | |
| NVIDIA | ➖ | ✅ | ➖ | ➖ | |
| Video Toolbox | Apple | ➖ | ➖ | ✅ | ➖ |
| Intel | ➖ | ➖ | ✅ | ➖ | |
| Vulkan Video | AMD | 🟡 | ✅ | ➖ | ➖ |
| Intel | 🟡 | 🟡 | ➖ | ➖ | |
| NVIDIA | ➖ | 🟡 | ➖ | ➖ | |
| Software | Any | ✅ | ✅ | ✅ | ✅ |
| Capture Method | FreeBSD | Linux | macOS | Windows |
|---|---|---|---|---|
| DXGI Desktop Duplication | ➖ | ➖ | ➖ | ✅ |
| KMS/DRM | ✅ | ✅ | ➖ | ➖ |
| NvFBC (X11 only) | ➖ | ✅ | ➖ | ➖ |
| ScreenCaptureKit | ➖ | ➖ | ✅ | ➖ |
| Wayland (wlroots) | ✅ | ✅ | ➖ | ➖ |
| Windows.Graphics.Capture | ➖ | ➖ | ➖ | 🟡 |
| ↳ Portable | ➖ | ➖ | ➖ | ✅ |
| ↳ Service | ➖ | ➖ | ➖ | ❌ |
| X11 | ✅ | ✅ | ➖ | ➖ |
| XDG Desktop Portal | ✅ | ✅ | ➖ | ➖ |
| KWin Screencast | ✅ | ✅ | ➖ | ➖ |
| Capture Method | VAAPI | Vulkan Video | NVENC (CUDA) | Software |
|---|---|---|---|---|
| KMS/DRM | ✅ | ✅ | ✅ | ✅ |
| NvFBC | ❌ | ❌ | ✅ | ❌ |
| Wayland (wlroots) | ✅ | ❌ | ✅ | ✅ |
| X11 | ✅ | ❌ | ✅ | ✅ |
| XDG Desktop Portal | ✅ | ✅ | ✅ | ✅ |
| KWin Screencast | ✅ | ✅ | ✅ | ✅ |
Legend: ✅ Supported | 🟡 Partial Support | ❌ Not Yet Supported | ➖ Not Applicable
🖥️ System Requirements
Warning
These tables are a work in progress. Do not purchase hardware based on this information.
| Component | Requirement |
|---|---|
| GPU | AMD: VCE 1.0 or higher, see: obs-amd hardware support |
|
Intel: FreeBSD/Linux: VAAPI-compatible, see: VAAPI hardware support Windows: Skylake or newer with QuickSync encoding support |
|
| Nvidia: NVENC enabled cards, see: nvenc support matrix | |
| CPU | AMD: Ryzen 3 or higher |
| Intel: Core i3 or higher | |
| RAM | 4GB or more |
| OS | FreeBSD: 14.4+ |
| Linux/Debian: 13+ (trixie) | |
| Linux/Fedora: 43+ | |
| Linux/Ubuntu: 22.04+ (jammy) | |
| macOS: 14.2+ | |
| Windows: 11+ (Windows Server does not support virtual gamepads) | |
| Network | Host: 5GHz, 802.11ac |
| Client: 5GHz, 802.11ac |
| Component | Requirement |
|---|---|
| GPU | AMD: Video Coding Engine 3.1 or higher |
|
Intel: FreeBSD/Linux: HD Graphics 510 or higher Windows: Skylake or newer with QuickSync encoding support |
|
|
Nvidia: FreeBSD/Linux: GeForce RTX 2000 series or higher Windows: Geforce GTX 1080 or higher |
|
| CPU | AMD: Ryzen 5 or higher |
| Intel: Core i5 or higher | |
| Network | Host: CAT5e ethernet or better |
| Client: CAT5e ethernet or better |
| Component | Requirement |
|---|---|
| GPU | AMD: Video Coding Engine 3.4 or higher |
| Intel: HD Graphics 730 or higher | |
| Nvidia: Pascal-based GPU (GTX 10-series) or higher | |
| CPU | AMD: Ryzen 5 or higher |
| Intel: Core i5 or higher | |
| Network | Host: CAT5e ethernet or better |
| Client: CAT5e ethernet or better |
❓ Support
Our support methods are listed in our LizardByte Docs.
💲 Sponsors and Supporters
👥 Contributors
Thank you to all the contributors who have helped make Sunshine better!
GitHub
CrowdIn
| Previous | Next |
|---|---|
| Getting Started |