Skip to content

[AMD/LINUX] Massive bitrate excursions when displaying mostly static content #3817

Description

@hanneshoch3

Is there an existing issue for this?

  • I have searched the existing issues

Is your issue described in the documentation?

  • 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 I use sunlight to stream over a 56 mbit/s connection with ~35 mbit/s set in Moonlight, everything works fine as long as there is lots of movement. When I open a map ingame for example and the picture becomes mostly static I can observe massive packet loss on the client side and massive bitrate excursions host side (via mangohud overlay), up to 90 mbit/s.
I tried all H/W encoders (H265, HEVC, AV1) on my 7900XT and the all show the same issue. I set the strict bitrate for AMD GPU in vaapi settings, but there is no difference at all. I also tried to set a higher minimum FPS limit (which increased minimum observed bandwidth), but also did not help at all.
Using software encoding it all works just as expected.
I run Arch and tried both sunshine and sunshine-git, as well as mesa and mesa-git, no differences.

Expected Behavior

No bitrate excursions and thus no frame/packetloss.

Additional Context

No response

Host Operating System

Linux

Operating System Version

Arch

Architecture

amd64/x86_64

Sunshine commit or version

2̶0̶2̶4̶.̶1̶1̶0̶2̶.̶1̶9̶0̶0̶0̶4̶.̶r̶0̶.̶g̶3̶9̶b̶a̶b̶4̶5̶-̶1̶

2025.426.10137.r0.gc6f3647-1

Package

Linux - AUR (Third Party)

GPU Type

AMD

GPU Model

7900XT

GPU Driver/Mesa Version

25.2.0_devel.204732.47db31b5564.d41d8cd-1

Capture Method

None

Config

adapter_name = /dev/dri/renderD128
address_family = both
channels = 1
fec_percentage = 25
fps = [30,60,90,120,144]
lan_encryption_mode = 2
min_threads = 8
notify_pre_releases = enabled
qp = 29
resolutions = [
    352x240,
    480x360,
    858x480,
    1280x720,
    1920x1080,
    3840x2160,
    2560x1440,
    3120x1440
]
sw_preset = ultrafast
upnp = enabled
vaapi_strict_rc_buffer = enabled
wan_encryption_mode = 2

Apps

Relevant log output

[2025-04-27 15:44:35.271]: Info: Video encryption enabled
[2025-04-27 15:44:35.271]: Info: New streaming session started [active sessions: 1]
[2025-04-27 15:44:35.501]: Info: Found default monitor by name: bluez_output.F4_9D_8A_09_CD_47.1.monitor
[2025-04-27 15:44:35.504]: Info: CLIENT CONNECTED
[2025-04-27 15:44:35.508]: Info: /dev/dri/card1 -> amdgpu
[2025-04-27 15:44:35.509]: Info: /dev/dri/card0 -> amdgpu
[2025-04-27 15:44:35.509]: Info: Found display [wayland-0]
[2025-04-27 15:44:35.509]: Info: Found interface: zxdg_output_manager_v1(31) version 3
[2025-04-27 15:44:35.509]: Info: Found interface: zwp_linux_dmabuf_v1(52) version 4
[2025-04-27 15:44:35.509]: Info: Found interface: wl_output(59) version 4
[2025-04-27 15:44:35.509]: Info: Resolution: 3840x2160
[2025-04-27 15:44:35.509]: Info: Offset: 0x0
[2025-04-27 15:44:35.509]: Info: Logical size: 2560x1440
[2025-04-27 15:44:35.509]: Info: Name: DP-1
[2025-04-27 15:44:35.509]: Info: Found monitor: ASUSTek COMPUTER INC VG28UQL1A
[2025-04-27 15:44:35.509]: Info: -------- Start of KMS monitor list --------
[2025-04-27 15:44:35.509]: Info: --------- End of KMS monitor list ---------
[2025-04-27 15:44:35.509]: Info: Screencasting with KMS
[2025-04-27 15:44:35.510]: Info: /dev/dri/card1 -> amdgpu
[2025-04-27 15:44:35.510]: Info: /dev/dri/card0 -> amdgpu
[2025-04-27 15:44:35.510]: Info: Found monitor for DRM screencasting
[2025-04-27 15:44:35.510]: Info: Found connector ID [107]
[2025-04-27 15:44:35.510]: Info: Found cursor plane [90]
[2025-04-27 15:44:35.514]: Info: Creating encoder [av1_vaapi]
[2025-04-27 15:44:35.514]: Info: Color coding: SDR (Rec. 601)
[2025-04-27 15:44:35.514]: Info: Color depth: 8-bit
[2025-04-27 15:44:35.514]: Info: Color range: MPEG
[2025-04-27 15:44:35.515]: Info: Opus initialized: 48 kHz, 2 channels, 512 kbps (total), LOWDELAY
[2025-04-27 15:44:35.521]: Info: vaapi vendor: Mesa Gallium driver 25.2.0-devel for AMD Radeon RX 7900 XT (radeonsi, navi31, LLVM 19.1.7, DRM 3.61, 6.14.4-1-cachyos)
[2025-04-27 15:44:35.522]: Info: Streaming bitrate is 23363000
[2025-04-27 15:44:35.522]: Info: Using normal encoding mode
[2025-04-27 15:44:35.522]: Info: Using VBR with single frame VBV size
[2025-04-27 15:44:35.522]: Warning: [av1_vaapi @ 0x705bb0006bc0] Multiple slices were requested but this codec does not support controlling slices.
[2025-04-27 15:44:46.021]: Warning: Skipping FEC for abnormally large encoded frame (needed 5 FEC blocks)
[2025-04-27 15:44:46.137]: Warning: Skipping FEC for abnormally large encoded frame (needed 5 FEC blocks)
[2025-04-27 15:44:46.571]: Warning: Skipping FEC for abnormally large encoded frame (needed 5 FEC blocks)
[2025-04-27 15:44:46.937]: Warning: Skipping FEC for abnormally large encoded frame (needed 5 FEC blocks)
[2025-04-27 15:44:47.304]: Warning: Skipping FEC for abnormally large encoded frame (needed 5 FEC blocks)
[2025-04-27 15:44:48.952]: Warning: Skipping FEC for abnormally large encoded frame (needed 6 FEC blocks)
[2025-04-27 15:44:49.038]: Warning: Skipping FEC for abnormally large encoded frame (needed 6 FEC blocks)
[2025-04-27 15:44:49.735]: Warning: Skipping FEC for abnormally large encoded frame (needed 5 FEC blocks)
[2025-04-27 15:44:49.838]: Warning: Skipping FEC for abnormally large encoded frame (needed 7 FEC blocks)
[2025-04-27 15:44:50.402]: Warning: Skipping FEC for abnormally large encoded frame (needed 6 FEC blocks)
[2025-04-27 15:44:51.302]: Warning: Skipping FEC for abnormally large encoded frame (needed 5 FEC blocks)
[2025-04-27 15:44:51.452]: Warning: Skipping FEC for abnormally large encoded frame (needed 6 FEC blocks)
[2025-04-27 15:44:52.121]: Warning: Skipping FEC for abnormally large encoded frame (needed 5 FEC blocks)
[2025-04-27 15:44:52.418]: Warning: Skipping FEC for abnormally large encoded frame (needed 5 FEC blocks)
[2025-04-27 15:44:56.985]: Warning: Skipping FEC for abnormally large encoded frame (needed 5 FEC blocks)
[2025-04-27 15:44:57.072]: Warning: Skipping FEC for abnormally large encoded frame (needed 7 FEC blocks)
[2025-04-27 15:44:57.206]: Warning: Skipping FEC for abnormally large encoded frame (needed 7 FEC blocks)
[2025-04-27 15:44:57.702]: Warning: Skipping FEC for abnormally large encoded frame (needed 5 FEC blocks)
[2025-04-27 15:44:57.789]: Warning: Skipping FEC for abnormally large encoded frame (needed 7 FEC blocks)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions