LizardByte / LizardByte/Sunshine

VAAPI encoder crashes on AMD Polaris (RX 590)

Open
#5,316 11 comments 0 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

When using vaapi + kwin, starting streaming crashes immediately on AMD Polaris series graphics cards (RX 590 GME).
Configure vaapi encoder, kwin capture
Start Sunshine streaming
The entire software crashes.

### Expected Behavior

The VAAPI encoder should work normally.

### Additional Context

Changing n_dmabuf_infos > 0 at pipewire.cpp:883 to 0 forces the va_ram_t path (CPU copy path), and VAAPI encoding works normally again without crashing.
https://github.com/aningQwQ/Sunshine/tree/pr1

### Host Operating System

Linux

### Operating System Version

fedora44-kde-7.0.12-201.fc44.x86_64 (64 位)

### Architecture

amd64/x86_64

### Package

Linux - Fedora Copr

### GPU Type

AMD

### GPU Model

RX 590

### GPU Driver/Mesa Version

Mesa 26.0.8

### Capture Method

Kwin

### Apps

```json

```

### Log output

```shell
(Could not obtain due to webui crash, see online logs below)
```

### Online logs

https://gist.github.com/aningQwQ/9f7cdb5834603d4ff8561dae9954ec71

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

Start by reviewing the n_dmabuf_infos handling at pipewire.cpp:883 and the linked online logs for the KWin capture and VAAPI crash. Reproduce streaming with VAAPI on an AMD RX 590 under Linux, then confirm that KWin capture starts without crashing while retaining the normal DMA-BUF path.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, linux
Domain
audio-video-rtc, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.