LizardByte / LizardByte/Sunshine

sway wayland sunshine outputs corrupted image

Open
#5,258 4 comments 6 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
41.3k
Forks
2.1k
Avg merge
23h 47m
Merged PRs (30d)
124

Description

### Is there an existing issue for this?

- [x] I have searched the existing issues

### Is your issue described in the documentation?

- [x] I have read the documentation

### Is your issue present in the latest beta/pre-release?

This issue is present in the latest pre-release

### Describe the Bug

Sunshine with capture method `wlroots` and software encoding (`libx264`) gives a black screen with horizontal lines in Moonlight.

Setting capture method to `kms` works fine.

I also tested both software encoding (`libx264`) and VAAPI (`hevc_vaapi`). Both fail with `wlroots` and both work with `kms`, so the issue appears to be related to the capture backend rather than the encoder.

Sunshine repeatedly logs:

```text
-------- Start of Wayland monitor list --------
... snip ...
Error: [wayland] Frame capture failed
```

Sway logs:

```text
00:09:48.184 [ERROR] [wlr] [EGL] command: eglCreateImageKHR, error: EGL_BAD_MATCH (0x3009), message: "createImageFromDmaBufs failed"
00:09:48.184 [ERROR] [wlr] [render/egl.c:818] eglCreateImageKHR failed
```

Environment:

* Sway 1.12
* Sunshine 2026.605.170308 (commit fa4fbbdd41dbb3df4a6dd8f0c09a05a5b0879ed3)

### Expected Behavior

sunshine to moonlight works fine.

### Additional Context

* `wayvnc` works correctly on the same system.
* An older Sunshine version (`2025.924.154138`) also failed with `wlroots`, but additionally segfaulted when a Moonlight client connected.
* Updating the system and Sunshine to the latest release removed the segfault, but `wlroots` capture is still broken.
* i have an nvidia card. but it's set in draining mode. So it can't be used by anything.

### Host Operating System

Linux

### Operating System Version

Linux navnarch 7.0.11-arch1-1 #1 SMP PREEMPT_DYNAMIC Tue, 02 Jun 2026 18:26:58 +0000 x86_64 GNU/Linux

### Architecture

amd64/x86_64

### Package

Linux - LizardByte/pacman-repo

### GPU Type

Intel

### GPU Model

Intel HD Graphics 530

### GPU Driver/Mesa Version

Version: 26.1.2

### Capture Method

wlroots (FreeBSD/Linux)

### Apps

```json

```

### Log output

```shell

```

### Online logs
[sunshine.log](https://github.com/user-attachments/files/28661923/sunshine.log)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source file or test is named. Start by reproducing Sunshine with the wlroots capture method on Sway, comparing it with kms and checking the Sunshine and Sway logs for the Frame capture failed and EGL_BAD_MATCH errors. Done means wlroots capture produces an intact image in Moonlight with both software and VAAPI encoding.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, linux
Domain
computer-graphics, desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.