Rendering artifact on VA-API HEVC AMD Linux
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
On both the latest version and the pre-release version, using HEVC hardware encoding on my AMD GPU (with VA-API) causes the display to be slightly scaled down, showing a green line at the bottom and black bars on the side of the screen. This happened after updating sunshine to 2025.924.154138 from the official LizardByte repo.
This issue does not occur when using software encoding, or when using H264 on VA-API.
Downgrading to an older version of sunshine (2025.628.4510-7 in the screenshot) instantly solves the issue:
Running Sunshine on my laptop (also running Arch Linux) shows the exact same issue.
Expected Behavior
Correct encoding.
Additional Context
No response
Host Operating System
Linux
Operating System Version
Latest Arch Linux
Architecture
amd64/x86_64
Sunshine commit or version
2025.929.5023 commit: c16f0add0fe28ee1d77d2364bd9eb582e8991b2b
Package
Linux - pkg.tar.zst
GPU Type
AMD
GPU Model
XFX AMD Radeon RX 580 8GB
GPU Driver/Mesa Version
1:25.2.3-2
Capture Method
KMS (Linux)
Config
encoder = vaapi
hevc_mode = 0
upnp = enabled
Apps
Relevant log output
[2025-09-30 10:27:58.151]: Info: Found H.264 encoder: h264_vaapi [vaapi]
[2025-09-30 10:27:58.151]: Info: Found HEVC encoder: hevc_vaapi [vaapi]
[2025-09-30 10:27:58.427]: Info: Video encryption enabled
[2025-09-30 10:27:58.427]: Info: New streaming session started [active sessions: 1]
[2025-09-30 10:27:58.535]: Info: CLIENT CONNECTED
[2025-09-30 10:27:58.536]: Info: /dev/dri/card1 -> amdgpu
[2025-09-30 10:27:58.537]: Info: Screencasting with KMS
[2025-09-30 10:27:58.537]: Info: /dev/dri/card1 -> amdgpu
[2025-09-30 10:27:58.537]: Info: Found monitor for DRM screencasting
[2025-09-30 10:27:58.537]: Info: Found connector ID [97]
[2025-09-30 10:27:58.538]: Info: Found cursor plane [59]
[2025-09-30 10:27:58.545]: Info: Creating encoder [hevc_vaapi]
[2025-09-30 10:27:58.545]: Info: Color coding: SDR (Rec. 601)
[2025-09-30 10:27:58.545]: Info: Color depth: 8-bit
[2025-09-30 10:27:58.545]: Info: Color range: MPEG
[2025-09-30 10:27:58.563]: Info: vaapi vendor: Mesa Gallium driver 25.2.3-arch1.2 for AMD Radeon RX 580 Series (radeonsi, polaris10, ACO, DRM 3.64, 6.16.8-zen3-1-zen)
[2025-09-30 10:27:58.563]: Info: Streaming bitrate is 24588000
[2025-09-30 10:27:58.563]: Info: Using normal encoding mode
[2025-09-30 10:27:58.563]: Info: Using default rate control
[2025-09-30 10:27:58.577]: Info: Minimum FPS target set to ~30fps (33.3333ms)
[2025-09-30 10:27:58.834]: Info: Setting default sink to: [sink-sunshine-stereo]
[2025-09-30 10:27:58.835]: Info: Found default monitor by name: sink-sunshine-stereo.monitor
[2025-09-30 10:27:58.877]: Info: Opus initialized: 48 kHz, 2 channels, 512 kbps (total), LOWDELAY
Likely due to a change in ffmpeg
For me even the posted version causes the same issue on AMD.
I can confirm that this started happening to me after upgrading to 2025.924.154138, built from source through the AUR package. Arch Linux with AMD GPU.
[2025-09-30 22:37:30.473]: Info: vaapi vendor: Mesa Gallium driver 25.2.3-arch1.2 for AMD Radeon RX 9070 XT (radeonsi, gfx1201, LLVM 20.1.8, DRM 3.64, 6.16.8-arch3-1)
Likely due to a change in ffmpeg
Unlikely, ffmpeg version n7.1.1 does not show this issue, at least not in the nv12 format using the exact same GPU.
ffmpeg -hwaccel vaapi -vaapi_device /dev/dri/renderD128 -i Video_2025-09-25_11-43-00.mp4 -vf 'format=nv12,hwupload' -c:v hevc_vaapi output.mkv
We're using FFmpeg 8.x now and don't use the system provided FFmpeg.
Experiencing the same green line here, also with AMD GPU, in the following situations:
- Streaming at 1080p to moonlight-android
- Streaming at 1080p to Moonlight Flatpak (screenshot)
The artifact does not show up for me in the following situations:
- ~~Streaming at 1080p to moonlight-qt v6.1.0-1~~ EDIT: I've observed it is now showing the artifact when using HEVC on an AMD iGPU
- Streaming at 720p to moonlight-android
- Streaming at 720p to Moonlight Flatpak (screenshot)
hi, I'm also experiencing this artifact when streaming to my steamdeck(running cachyos/arch) or my raspberry pi.
the PC i'm streaming from is also running Arch(EndevourOS) with a Ryzen 9 3900X and a Radeon RX 9070.
Confirming I've got the same issue for 1080p only on multiple clients. Host is amd 6700xt on Nobara OS.
Experiencing the same with AMD 780m on Fedora 42 for specifically 1080p
Same here with 7900XT, Arch and 1080p, fine on 4K
Also having this issue on Bazzite at 1080p. Rolling back package did work for the time being. 6900XT for video card
Same here with 9070 XT with CachyOS. Streaming in 1080p to Moonlight running on AppleTV. Sunshine 2025.628.4510-7 works. Sunshine 2025.924.154138-1 shows the green line at the bottom.
Can reproduce with RX580, Ultramarine Linux with Terra Mesa.
I can also confirm: Used moonlight on pixel 7 and dell insprion 7300 intel i5 gen 12, both using HVEC encoding no matter hardware or software encoded (1080p 60).
Host computer is running garuda linux (arch based) with 9070xt and 5700x3D on sunshine versions 2025.924.154138-1 and 2025.1025.34515-1 and seeing this green bar on the bottom. Never seen this before.
I can confirm the green line with my RX6650 on Ubuntu 24.04.3 (kernel 6.14, mesa 25.0.7, no kisak PPA) when encoding 1080p in h265.
I couldn't find an unaffected version. I tried the most recent stable and pre-releases.
These kinds of alignment issues (where ffmpeg made assumptions about block sizes that differed from what AMD is actually using) seem to have plagued the platform for years: https://fftrac-bg.ffmpeg.org/ticket/8506
They are supposed to have been fixed in Sunshine (including changes in libva and ffmpeg): https://github.com/LizardByte/Sunshine/issues/2636 https://github.com/LizardByte/build-deps/pull/363
Since some libva change in x.21 is also involved and Ubuntu 24.04 ships with x.20 I also tried install Intel's graphics PPA for 24.04 in order to have x.22 but this didn't help. I tried a build from before ffmpeg8 and a recent one. No combination fixed it on my system.
See also the interesting comment here: https://github.com/LizardByte/build-deps/pull/482#issuecomment-3223439576 It clearly singles out the move to ffmpeg8 as source of the regression (but I can't confirm that for Ubuntu 24.04 where all versions seem to be affected). That comment has a link to a pre-ffmpeg8-build of sunshine that is still available for download.
If I remember correctly h265 on my system has been affected for a long time but it was not immediately obvious because the additional 8 px were black in older versions but at some point they got their obnoxious green colour.
AMD requires 64x16 blocks for hardware encoding if I'm not mistaken. Does changing the horizontal resolution add a vertical green bar too or not? To discern whether the cropping through HEVC metadata is only partially or fully broken.
I can confirm this green bar happened at bottom on 1920x1080 resolution with FFmpeg VAAPI HEVC. If the weight and height both not multiples of 64x16, like 1936x1080 it looks like this:
Image from OBS output
I'm on Fedora 42, ffmpeg 7.1.2, mesa-vulkan-drivers-freeworld 25.1.9-1.fc42, AMD RX 5700
ffmpeg in sunshine now needs to be build with libva-1.21+, but I don't know if it is relevant. https://github.com/FFmpeg/FFmpeg/commit/bcfbf2bac8f9eeeedc407b40596f5c7aaa0d5b47
ffmpeg in sunshine now needs to be build with libva-1.21+, but I don't know if it is relevant. FFmpeg/FFmpeg@bcfbf2b
Our pre-compiled version is using 2.14.0: https://packages.ubuntu.com/search?keywords=libva-dev&searchon=names&suite=jammy§ion=all
@ReenigneArcher They have weird versioning. VAAPI-1.21+ translates to libva-2.21+, and that's likely what broke it. Maybe defining the symbol manually and removing version check like in https://github.com/LizardByte/build-deps/pull/363 will be enough to fix it.
@ns6089 That makes sense, thanks for clarifying that! I was planning to solve this by just compiling libva prior to ffmpeg in the build-deps repo, but I'm hitting an issue I don't know how to solve for the FreeBSD build on aarch64.
https://github.com/LizardByte/build-deps/pull/535
I just noticed that in the logcat for Moonlight, it says the incoming stream is 1920 x 1088
I can recreate this issue with latest sunshine from Pac-Man on cachyOS (arch) on both steamdeck and android with AYN Thor at 1080p. Issue goes away if I stream 720p but I don’t wanna do that
I just noticed that in the logcat for Moonlight, it says the incoming stream is 1920 x 1088
I have been experiencing this green line issue at the bottom of my Sunshine stream for a while, saw your comment and adjusted my streaming resolution from 1920 x 1080 to 1920 x 1088 and the green stripe is gone! May not work for everyone but a handy workaround for me for the moment, thanks for the info @XT-Martinez
How did you set your streaming resolution? Isn't it controlled by Moonlight? (You can't edit it arbitrarily in Moonlight)
How did I not see that? Thank you.
I didn't know that either. Thanks, @jaredhenderson, that' a nice workaround.
I confirm this issue on 6700 xt on opensuse tumbleweed (latest at the time of writing)
It works for me if I force the codec to anything else that isn't HEVC.
I mention this because the android version of Moonlight does not allow to set custom resolutions.