Skip to content

feat(linux): Add Vulkan video encoder for Linux#4603

Open
neatnoise wants to merge 14 commits intoLizardByte:masterfrom
neatnoise:vulkan-pr
Open

feat(linux): Add Vulkan video encoder for Linux#4603
neatnoise wants to merge 14 commits intoLizardByte:masterfrom
neatnoise:vulkan-pr

Conversation

@neatnoise
Copy link

@neatnoise neatnoise commented Jan 19, 2026

Description

This PR adds Vulkan video encoding support for Linux, providing an alternative to VAAPI encoding.

Changes:

  • Vulkan encoder: New FFmpeg-based Vulkan encoder (h264_vulkan, hevc_vulkan, av1_vulkan) with zero-copy DMA-BUF import and Vulkan compute RGB-to-YUV conversion — no EGL/GL dependency, all GPU work stays in a single Vulkan queue
  • Web UI: Added Vulkan encoder selection and settings to the configuration interface
  • Documentation: Added docs for vulkan encoder options in docs/configuration.md

Dependencies:

Requires corresponding PR in LizardByte/build-deps (ffmpeg-vulkan branch) to enable BUILD_FFMPEG_VULKAN option, which enables Vulkan encoder support in FFmpeg builds.

Testing:

  • Tested on single GPU setup: AMD Radeon 780M (integrated)
  • Tested on multi-GPU setup: AMD Radeon 9070 XT (discrete) + AMD Radeon 780M (integrated)
  • Tested on Arch Linux KDE desktop

Screenshot

image

Issues Fixed or Closed

Roadmap Issues

Type of Change

  • feat: New feature (non-breaking change which adds functionality)
  • fix: Bug fix (non-breaking change which fixes an issue)
  • docs: Documentation only changes
  • style: Changes that do not affect the meaning of the code (white-space, formatting, missing semicolons, etc.)
  • refactor: Code change that neither fixes a bug nor adds a feature
  • perf: Code change that improves performance
  • test: Adding missing tests or correcting existing tests
  • build: Changes that affect the build system or external dependencies
  • ci: Changes to CI configuration files and scripts
  • chore: Other changes that don't modify src or test files
  • revert: Reverts a previous commit
  • BREAKING CHANGE: Introduces a breaking change (can be combined with any type above)

Checklist

  • Code follows the style guidelines of this project
  • Code has been self-reviewed
  • Code has been commented, particularly in hard-to-understand areas
  • Code docstring/documentation-blocks for new or existing methods/components have been added or updated
  • Unit tests have been added or updated for any new or modified functionality

AI Usage

  • None: No AI tools were used in creating this PR
  • Light: AI provided minor assistance (formatting, simple suggestions)
  • Moderate: AI helped with code generation or debugging specific parts
  • Heavy: AI generated most or all of the code changes

@neatnoise neatnoise changed the title Add Vulkan video encoder for Linux (KMS capture) feat(web): Add Vulkan video encoder for Linux Jan 19, 2026
@neatnoise neatnoise changed the title feat(web): Add Vulkan video encoder for Linux feat(linux): Add Vulkan video encoder for Linux Jan 19, 2026
Copy link
Member

@ReenigneArcher ReenigneArcher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ReenigneArcher
Copy link
Member

I will convert this to draft for now, please change it back when you're ready for a full review. Thanks!

@ReenigneArcher ReenigneArcher marked this pull request as draft January 19, 2026 20:45
@neatnoise
Copy link
Author

Its ready

@andygrundman
Copy link
Contributor

andygrundman commented Jan 20, 2026

I know this PR is about encoding, but I saw changes to capture as well. Do you know if this could support variable framerate capture, similar to how capture works on Windows? In my limited experience Linux always captures at the stream framerate.

The ideal capture process would be capturing only when the image has changed (with duplicated frames subject to minimum_fps_target), as well as capturing using a frame interval timer requested by the client or based on the framerate. For example, an Xbox client works best if frames are captured on a timer with an interval of 59.94fps (60000/1001), a desktop client could just use a 60fps interval. One thing you do not want to do is base anything on the host's vsync interval.

@ReenigneArcher
Copy link
Member

Its ready

I left a bunch of review comments.

@neatnoise
Copy link
Author

I know this PR is about encoding, but I saw changes to capture as well. Do you know if this could support variable framerate capture, similar to how capture works on Windows? In my limited experience Linux always captures at the stream framerate.

The ideal capture process would be capturing only when the image has changed (with duplicated frames subject to minimum_fps_target), as well as capturing using a frame interval timer requested by the client or based on the framerate. For example, an Xbox client works best if frames are captured on a timer with an interval of 59.94fps (60000/1001), a desktop client could just use a 60fps interval. One thing you do not want to do is base anything on the host's vsync interval.

Yes, the kms_vblank option already behaves this way with variable frame rate similarly to Windows. It encodes that many frames that are generated by a game. It also respects fps frame rate which are set by a client (if the clients sets 60, it won't generate more than 60 fps with some minimal margin)

@neatnoise
Copy link
Author

@ReenigneArcher I made proposed changes. I also added a tiling fix for RNDA 4 when Gnome DE is used. Would be helpful if somebody with Nvidia and Intel GPUs could test the new encoder

@neatnoise
Copy link
Author

neatnoise commented Feb 17, 2026

@ReenigneArcher I've tested with vulkan ffmpeg build https://github.com/LizardByte/build-deps/actions/runs/21850415771?pr=606 successfully.

Tweaked kms_vblank for the game Cronos The New Dawn meanwhile.

Tested in many games with various resolutions with and without vsync in-game and kms_vblank enabled and disabled. Tested with vulkan and vaapi encoders. It works solid.

@XT-Martinez

This comment was marked as off-topic.

@ReenigneArcher
Copy link
Member

ReenigneArcher commented Feb 18, 2026

This PR needs to be rebased to pick up the right FFmpeg pre-build, before I can run CI.

Edit: actually the build-deps commit that added Vulkan hadn't been merged here yet: #4735

@psyke83
Copy link
Contributor

psyke83 commented Feb 18, 2026

@neatnoise

Also, don't forget to verify compatibility with portalgrab when rebasing. This is enough to get started, but you might want to refine/verify:

diff --git a/src/platform/linux/portalgrab.cpp b/src/platform/linux/portalgrab.cpp
index 1f4e9062..eeaf1c92 100644
--- a/src/platform/linux/portalgrab.cpp
+++ b/src/platform/linux/portalgrab.cpp
@@ -29,6 +29,7 @@
 #include "src/platform/common.h"
 #include "src/video.h"
 #include "vaapi.h"
+#include "vulkan_encode.h"
 #include "wayland.h"
 
 namespace {
@@ -748,6 +749,7 @@ namespace portal {
         // On hybrid GPU systems (Intel+NVIDIA), DMA-BUFs come from the Intel GPU and cannot
         // be imported into CUDA, so we fall back to memory buffers in that case.
         bool use_dmabuf = n_dmabuf_infos > 0 && (mem_type == platf::mem_type_e::vaapi ||
+                                                 mem_type == platf::mem_type_e::vulkan ||
                                                  (mem_type == platf::mem_type_e::cuda && display_is_nvidia));
         if (use_dmabuf) {
           for (int i = 0; i < n_dmabuf_infos; i++) {
@@ -1226,6 +1228,9 @@ namespace portal {
         return va::make_avcodec_encode_device(width, height, n_dmabuf_infos > 0);
       }
 #endif
+      if (mem_type == platf::mem_type_e::vulkan) {
+        return vk::make_avcodec_encode_device_vram(width, height, 0, 0);
+      }
 
 #ifdef SUNSHINE_BUILD_CUDA
       if (mem_type == platf::mem_type_e::cuda) {
@@ -1368,7 +1373,7 @@ namespace portal {
 namespace platf {
   std::shared_ptr<display_t> portal_display(mem_type_e hwdevice_type, const std::string &display_name, const video::config_t &config) {
     using enum platf::mem_type_e;
-    if (hwdevice_type != system && hwdevice_type != vaapi && hwdevice_type != cuda) {
+    if (hwdevice_type != system && hwdevice_type != vaapi && hwdevice_type != vulkan && hwdevice_type != cuda) {
       BOOST_LOG(error) << "Could not initialize display with the given hw device type."sv;
       return nullptr;
     }

@neatnoise
Copy link
Author

@XT-Martinez It looks like ffmpeg without built-in vulkan support, you need to build it with ffmpeg vulkan supported binaries (like from link above).

@psyke83 will do. I will add vulkan support also for portal grab. Actually I have my portal/pipeware implementation here https://github.com/neatnoise/Sunshine/tree/vulkan%2Bpipewire . So It will be similar.

@neatnoise
Copy link
Author

  • Rebased to sunshine master (with portal support)
  • Added vulkan+portal support
  • Cleaned up to just add vulkan support - removed kms_vblank option (i might create a separate PR for it in the future)

The best results on my machine are portal+vulkan (vulkan settings low latency + vbr) and existing portal+vaapi. Portal seems to have a lower latency than KMS.

@gschintgen
Copy link
Contributor

FWIW I found the vblank option quite interesting. (But I don't have much time right now to actually check it out.)

@psyke83
Copy link
Contributor

psyke83 commented Feb 19, 2026

With the default settings (vbr, ll), the stream is massively violating the target bitrate (70Mbps target is saturating my wifi connection at 250Mbps+). I didn't notice this with prior testing.

@psyke83
Copy link
Contributor

psyke83 commented Feb 19, 2026

This is the issue:

conn@ryzenl:~/work/sunshine$ ffmpeg 2>&1 -h encoder=hevc_vulkan | grep -A5 rc_mode 
  -rc_mode           <int>        E..V....... Select rate control type (from 0 to UINT32_MAX) (default auto)
     auto            4294967295   E..V....... Choose mode automatically based on parameters
     driver          0            E..V....... Driver-specific rate control
     cqp             1            E..V....... Constant quantizer mode
     cbr             2            E..V....... Constant bitrate mode
     vbr             4            E..V....... Variable bitrate mode
conn@ryzenl:~/work/sunshine$ ffmpeg 2>&1 -h encoder=h264_vulkan | grep -A5 rc_mode 
  -rc_mode           <int>        E..V....... Select rate control type (from 0 to UINT32_MAX) (default auto)
     auto            4294967295   E..V....... Choose mode automatically based on parameters
     driver          0            E..V....... Driver-specific rate control
     cqp             1            E..V....... Constant quantizer mode
     cbr             2            E..V....... Constant bitrate mode
     vbr             4            E..V....... Variable bitrate mode

Your current PR is assigning VBR as 3 erroneously. When set to 4, I'm not seeing the crazy bitrate overshooting.

@neatnoise
Copy link
Author

This is the issue:

conn@ryzenl:~/work/sunshine$ ffmpeg 2>&1 -h encoder=hevc_vulkan | grep -A5 rc_mode 
  -rc_mode           <int>        E..V....... Select rate control type (from 0 to UINT32_MAX) (default auto)
     auto            4294967295   E..V....... Choose mode automatically based on parameters
     driver          0            E..V....... Driver-specific rate control
     cqp             1            E..V....... Constant quantizer mode
     cbr             2            E..V....... Constant bitrate mode
     vbr             4            E..V....... Variable bitrate mode
conn@ryzenl:~/work/sunshine$ ffmpeg 2>&1 -h encoder=h264_vulkan | grep -A5 rc_mode 
  -rc_mode           <int>        E..V....... Select rate control type (from 0 to UINT32_MAX) (default auto)
     auto            4294967295   E..V....... Choose mode automatically based on parameters
     driver          0            E..V....... Driver-specific rate control
     cqp             1            E..V....... Constant quantizer mode
     cbr             2            E..V....... Constant bitrate mode
     vbr             4            E..V....... Variable bitrate mode

Your current PR is assigning VBR as 3 erroneously. When set to 4, I'm not seeing the crazy bitrate overshooting.

Fixed

@ReenigneArcher
Copy link
Member

build-deps has been updated in Sunshine to include the version with vulkan support.

@neatnoise
Copy link
Author

@ReenigneArcher rebased with the current master. It works fine:

lut 24 11:58:17 REDACTED_HOST systemd[834]: Starting Self-hosted game stream host for Moonlight...
lut 24 11:58:23 REDACTED_HOST systemd[834]: Started Self-hosted game stream host for Moonlight.
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.037958] [0x00007fd88eecb600] [info]    config: 'vk_tune' = 2
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.037977] [0x00007fd88eecb600] [info]    config: 'wan_encryption_mode' = 2
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.037979] [0x00007fd88eecb600] [info]    config: 'vaapi_strict_rc_buffer' = enabled
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.037984] [0x00007fd88eecb600] [info]    config: 'lan_encryption_mode' = 2
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.037986] [0x00007fd88eecb600] [info]    config: 'vk_rc_mode' = 4
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.037988] [0x00007fd88eecb600] [info]    config: 'minimum_fps_target' = 10
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.037989] [0x00007fd88eecb600] [info]    config: 'gamepad' = xone
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.037991] [0x00007fd88eecb600] [info]    config: 'external_ip' = REDACTED_IP
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.037992] [0x00007fd88eecb600] [info]    config: 'encoder' = vulkan
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.037994] [0x00007fd88eecb600] [info]    config: 'capture' = portal
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.037997] [0x00007fd88eecb600] [info]    config: 'address_family' = both
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.038]: Info: Sunshine version: 0.0.0-e76b2ffb commit:
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.038]: Info: Package Publisher: Third Party Publisher
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.038]: Info: Publisher Website:
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.038]: Info: Get support: https://app.lizardbyte.dev/support
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.038]: Info: config: 'address_family' = both
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.038]: Info: config: 'capture' = portal
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.038]: Info: config: 'encoder' = vulkan
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.038]: Info: config: 'external_ip' = REDACTED_IP
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.038]: Info: config: 'gamepad' = xone
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.038]: Info: config: 'minimum_fps_target' = 10
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.038]: Info: config: 'vk_rc_mode' = 4
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.038]: Info: config: 'lan_encryption_mode' = 2
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.038]: Info: config: 'vaapi_strict_rc_buffer' = enabled
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.038]: Info: config: 'wan_encryption_mode' = 2
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.038]: Info: config: 'vk_tune' = 2
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.038]: Info: Loaded portal restore token from disk
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.152]: Info: Trying encoder [vulkan]
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.152]: Info: Screencasting with XDG portal
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.152]: Info: Requested frame rate [60/1, approx. 60 fps]
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.152]: Info: Found display [wayland-0]
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.163]: Info: Loaded portal restore token from disk
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.167]: Error: SelectDevices failed with response code: 2
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.167]: Warning: RemoteDesktop.SelectDevices failed, falling back to ScreenCast-only mode
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.181]: Info: Connected to pipewire version 1.4.10
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.182]: Info: Video format: 12
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.182]: Info: Size: 1920x1080
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.182]: Info: Framerate (from compositor): 0/1 (variable rate capture)
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.182]: Info: using DMA-BUF buffers
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.182]: Info: Video format: 12
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.183]: Info: Size: 1920x1080
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.183]: Info: Framerate (from compositor): 0/1 (variable rate capture)
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.183]: Info: using DMA-BUF buffers
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.191]: Info: Using negotiated resolution 1920x1080
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.191]: Info: Creating encoder [h264_vulkan]
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.191]: Info: Color coding: SDR (Rec. 601)
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.191]: Info: Color depth: 8-bit
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.191]: Info: Color range: JPEG
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: WARNING: radv is not a conformant Vulkan implementation, testing use only.
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.220]: Info: Streaming bitrate is 1000000
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.239]: Info: Creating encoder [hevc_vulkan]
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.239]: Info: Color coding: SDR (Rec. 601)
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.239]: Info: Color depth: 8-bit
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.239]: Info: Color range: JPEG
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: WARNING: radv is not a conformant Vulkan implementation, testing use only.
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.262]: Info: Streaming bitrate is 1000000
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.281]: Info: Creating encoder [av1_vulkan]
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.281]: Info: Color coding: SDR (Rec. 601)
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.281]: Info: Color depth: 8-bit
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.281]: Info: Color range: JPEG
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: WARNING: radv is not a conformant Vulkan implementation, testing use only.
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.302]: Info: Streaming bitrate is 1000000
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.321]: Info: Screencasting with XDG portal
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.321]: Info: Requested frame rate [60/1, approx. 60 fps]
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.321]: Info: Found display [wayland-0]
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.328]: Info: Loaded portal restore token from disk
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.331]: Error: SelectDevices failed with response code: 2
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.331]: Warning: RemoteDesktop.SelectDevices failed, falling back to ScreenCast-only mode
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.343]: Info: Connected to pipewire version 1.4.10
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.345]: Info: Video format: 12
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.345]: Info: Size: 1920x1080
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.345]: Info: Framerate (from compositor): 0/1 (variable rate capture)
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.345]: Info: using DMA-BUF buffers
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.345]: Info: Video format: 12
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.345]: Info: Size: 1920x1080
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.345]: Info: Framerate (from compositor): 0/1 (variable rate capture)
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.345]: Info: using DMA-BUF buffers
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.353]: Info: Using negotiated resolution 1920x1080
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.353]: Info: Creating encoder [hevc_vulkan]
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.353]: Info: Color coding: SDR (Rec. 709)
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.353]: Info: Color depth: 10-bit
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.353]: Info: Color range: JPEG
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: WARNING: radv is not a conformant Vulkan implementation, testing use only.
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.376]: Info: Streaming bitrate is 1000000
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.398]: Info: Creating encoder [av1_vulkan]
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.398]: Info: Color coding: SDR (Rec. 709)
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.398]: Info: Color depth: 10-bit
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.398]: Info: Color range: JPEG
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: WARNING: radv is not a conformant Vulkan implementation, testing use only.
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.418]: Info: Streaming bitrate is 1000000
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.442]: Info: // Testing for available encoders, this may generate errors. You can safely ignore those errors. //
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.442]: Info:
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.442]: Info: // Ignore any errors mentioned above, they are not relevant. //
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.442]: Info:
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.442]: Info: Found H.264 encoder: h264_vulkan [vulkan]
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.442]: Info: Found HEVC encoder: hevc_vulkan [vulkan]
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.442]: Info: Found AV1 encoder: av1_vulkan [vulkan]
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.443]: Info: Starting system tray
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.444]: Info: Adding avahi service REDACTED_HOST
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.444]: Info: Configuration UI available at [https://localhost:47990]
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: libayatana-appindicator is deprecated. Please use libayatana-appindicator-glib in newly written code.
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.467]: Info: System tray created
lut 24 11:58:23 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:23.467]: Info: Starting main loop
lut 24 11:58:24 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:24.379]: Info: Avahi service REDACTED_HOST successfully established.
lut 24 11:58:42 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:42.525]: Info: Trying encoder [vulkan]
lut 24 11:58:42 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:42.525]: Info: Screencasting with XDG portal
lut 24 11:58:42 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:42.525]: Info: Requested frame rate [60/1, approx. 60 fps]
lut 24 11:58:42 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:42.525]: Info: Found display [wayland-0]
lut 24 11:58:42 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:42.533]: Info: Loaded portal restore token from disk
lut 24 11:58:42 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:42.537]: Error: SelectDevices failed with response code: 2
lut 24 11:58:42 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:42.537]: Warning: RemoteDesktop.SelectDevices failed, falling back to ScreenCast-only mode
lut 24 11:58:42 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:42.551]: Info: Connected to pipewire version 1.4.10
lut 24 11:58:42 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:42.552]: Info: Video format: 12
lut 24 11:58:42 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:42.552]: Info: Size: 1920x1080
lut 24 11:58:42 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:42.552]: Info: Framerate (from compositor): 0/1 (variable rate capture)
lut 24 11:58:42 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:42.552]: Info: using DMA-BUF buffers
lut 24 11:58:42 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:42.553]: Info: Video format: 12
lut 24 11:58:42 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:42.553]: Info: Size: 1920x1080
lut 24 11:58:42 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:42.553]: Info: Framerate (from compositor): 0/1 (variable rate capture)
lut 24 11:58:42 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:42.553]: Info: using DMA-BUF buffers
lut 24 11:58:42 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:42.561]: Info: Using negotiated resolution 1920x1080
lut 24 11:58:42 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:42.561]: Info: Creating encoder [h264_vulkan]
lut 24 11:58:42 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:42.561]: Info: Color coding: SDR (Rec. 601)
lut 24 11:58:42 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:42.561]: Info: Color depth: 8-bit
lut 24 11:58:42 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:42.561]: Info: Color range: JPEG
lut 24 11:58:42 REDACTED_HOST sunshine[3540]: WARNING: radv is not a conformant Vulkan implementation, testing use only.
lut 24 11:58:42 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:42.591]: Info: Streaming bitrate is 1000000
lut 24 11:58:42 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:42.613]: Info: Creating encoder [hevc_vulkan]
lut 24 11:58:42 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:42.613]: Info: Color coding: SDR (Rec. 601)
lut 24 11:58:42 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:42.613]: Info: Color depth: 8-bit
lut 24 11:58:42 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:42.613]: Info: Color range: JPEG
lut 24 11:58:42 REDACTED_HOST sunshine[3540]: WARNING: radv is not a conformant Vulkan implementation, testing use only.
lut 24 11:58:42 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:42.636]: Info: Streaming bitrate is 1000000
lut 24 11:58:42 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:42.654]: Info: Creating encoder [av1_vulkan]
lut 24 11:58:42 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:42.654]: Info: Color coding: SDR (Rec. 601)
lut 24 11:58:42 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:42.654]: Info: Color depth: 8-bit
lut 24 11:58:42 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:42.654]: Info: Color range: JPEG
lut 24 11:58:42 REDACTED_HOST sunshine[3540]: WARNING: radv is not a conformant Vulkan implementation, testing use only.
lut 24 11:58:42 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:42.674]: Info: Streaming bitrate is 1000000
lut 24 11:58:42 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:42.695]: Info: Screencasting with XDG portal
lut 24 11:58:42 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:42.696]: Info: Requested frame rate [60/1, approx. 60 fps]
lut 24 11:58:42 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:42.696]: Info: Found display [wayland-0]
lut 24 11:58:42 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:42.702]: Info: Loaded portal restore token from disk
lut 24 11:58:42 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:42.705]: Error: SelectDevices failed with response code: 2
lut 24 11:58:42 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:42.705]: Warning: RemoteDesktop.SelectDevices failed, falling back to ScreenCast-only mode
lut 24 11:58:42 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:42.716]: Info: Connected to pipewire version 1.4.10
lut 24 11:58:42 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:42.718]: Info: Video format: 12
lut 24 11:58:42 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:42.718]: Info: Size: 1920x1080
lut 24 11:58:42 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:42.718]: Info: Framerate (from compositor): 0/1 (variable rate capture)
lut 24 11:58:42 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:42.718]: Info: using DMA-BUF buffers
lut 24 11:58:42 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:42.718]: Info: Video format: 12
lut 24 11:58:42 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:42.718]: Info: Size: 1920x1080
lut 24 11:58:42 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:42.718]: Info: Framerate (from compositor): 0/1 (variable rate capture)
lut 24 11:58:42 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:42.718]: Info: using DMA-BUF buffers
lut 24 11:58:42 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:42.726]: Info: Using negotiated resolution 1920x1080
lut 24 11:58:42 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:42.726]: Info: Creating encoder [hevc_vulkan]
lut 24 11:58:42 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:42.726]: Info: Color coding: SDR (Rec. 709)
lut 24 11:58:42 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:42.726]: Info: Color depth: 10-bit
lut 24 11:58:42 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:42.726]: Info: Color range: JPEG
lut 24 11:58:42 REDACTED_HOST sunshine[3540]: WARNING: radv is not a conformant Vulkan implementation, testing use only.
lut 24 11:58:42 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:42.748]: Info: Streaming bitrate is 1000000
lut 24 11:58:42 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:42.770]: Info: Creating encoder [av1_vulkan]
⠋ Thinking...lut 24 11:58:42 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:42.770]: Info: Color coding: SDR (Rec. 709)
lut 24 11:58:42 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:42.770]: Info: Color depth: 10-bit
lut 24 11:58:42 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:42.770]: Info: Color range: JPEG
lut 24 11:58:42 REDACTED_HOST sunshine[3540]: WARNING: radv is not a conformant Vulkan implementation, testing use only.
lut 24 11:58:42 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:42.790]: Info: Streaming bitrate is 1000000
lut 24 11:58:42 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:42.811]: Info: // Testing for available encoders, this may generate errors. You can safely ignore those errors. //
lut 24 11:58:42 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:42.811]: Info:
lut 24 11:58:42 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:42.811]: Info: // Ignore any errors mentioned above, they are not relevant. //
lut 24 11:58:42 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:42.811]: Info:
lut 24 11:58:42 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:42.811]: Info: Found H.264 encoder: h264_vulkan [vulkan]
lut 24 11:58:42 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:42.811]: Info: Found HEVC encoder: hevc_vulkan [vulkan]
lut 24 11:58:42 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:42.811]: Info: Found AV1 encoder: av1_vulkan [vulkan]
lut 24 11:58:42 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:42.811]: Info: Executing [Desktop]
lut 24 11:58:42 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:42.950]: Info: Video encryption enabled
lut 24 11:58:42 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:42.950]: Info: New streaming session started [active sessions: 1]
lut 24 11:58:42 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:42.974]: Info: CLIENT CONNECTED
lut 24 11:58:42 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:42.976]: Info: Loaded portal restore token from disk
lut 24 11:58:42 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:42.977]: Info: Screencasting with XDG portal
lut 24 11:58:42 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:42.977]: Info: Requested frame rate [60fps]
lut 24 11:58:42 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:42.977]: Info: Found display [wayland-0]
lut 24 11:58:42 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:42.983]: Info: Loaded portal restore token from disk
lut 24 11:58:42 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:42.986]: Error: SelectDevices failed with response code: 2
lut 24 11:58:42 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:42.986]: Warning: RemoteDesktop.SelectDevices failed, falling back to ScreenCast-only mode
lut 24 11:58:42 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:42.999]: Info: Connected to pipewire version 1.4.10
lut 24 11:58:43 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:43.000]: Info: Video format: 12
lut 24 11:58:43 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:43.000]: Info: Size: 1920x1080
lut 24 11:58:43 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:43.000]: Info: Framerate (from compositor): 0/1 (variable rate capture)
lut 24 11:58:43 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:43.000]: Info: using DMA-BUF buffers
lut 24 11:58:43 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:43.001]: Info: Video format: 12
lut 24 11:58:43 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:43.001]: Info: Size: 1920x1080
lut 24 11:58:43 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:43.001]: Info: Framerate (from compositor): 0/1 (variable rate capture)
lut 24 11:58:43 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:43.001]: Info: using DMA-BUF buffers
lut 24 11:58:43 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:43.009]: Info: Using negotiated resolution 1920x1080
lut 24 11:58:43 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:43.009]: Info: Creating encoder [h264_vulkan]
lut 24 11:58:43 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:43.009]: Info: Color coding: SDR (Rec. 601)
lut 24 11:58:43 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:43.009]: Info: Color depth: 8-bit
lut 24 11:58:43 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:43.009]: Info: Color range: MPEG
lut 24 11:58:43 REDACTED_HOST sunshine[3540]: WARNING: radv is not a conformant Vulkan implementation, testing use only.
lut 24 11:58:43 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:43.036]: Info: Streaming bitrate is 14988000
lut 24 11:58:43 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:43.041]: Info: Minimum FPS target set to ~5fps (200ms)
lut 24 11:58:43 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:43.473]: Info: Found default monitor by name: alsa_output.REDACTED_PCInalog-stereo.monitor
lut 24 11:58:43 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:43.483]: Info: Opus initialized: 48 kHz, 2 channels, 512 kbps (total), LOWDELAY
lut 24 11:58:51 REDACTED_HOST sunshine[3540]: [2026-02-24 11:58:51.608]: Info: Web UI: [::1] -- not authorized

Copy link
Member

@ReenigneArcher ReenigneArcher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, I have a review below.

In addition to my review, I have a question. Will there be issues if there is a mismatch in the vulkan header and vulkan loader versions here versus what is used in the build-deps (FFmpeg) repo?

@ReenigneArcher ReenigneArcher marked this pull request as ready for review February 26, 2026 02:04
@neatnoise
Copy link
Author

Thank you, I have a review below.

In addition to my review, I have a question. Will there be issues if there is a mismatch in the vulkan header and vulkan loader versions here versus what is used in the build-deps (FFmpeg) repo?

The build-deps repo bundles Vulkan Headers/Loader v1.4.344 (statically linked into FFmpeg), while my Sunshine compiles against the system's v1.4.341 (CachyOS distro). The two
don't share Vulkan types directly — Sunshine talks to FFmpeg through libavutil/hwcontext_vulkan.h. Since core Vulkan types and ABI haven't changed between these versions, there's no practical risk of mismatch.

@neatnoise
Copy link
Author

@inkatail please check if the last commit changes anything

@inkatail
Copy link

inkatail commented Mar 8, 2026

@inkatail please check if the last commit changes anything

@neatnoise CBR + this commit seems stable enough, but VBR is still pretty unstable, both with and without it. It tends to randomly overshoot the target bitrate by quite a lot. For example, if I set it to 26 Mbps, it can suddenly jump to 48 Mbps for a second.

@neatnoise
Copy link
Author

@inkatail VBR generally is less stable in bitrate compared to CBR. For constrained networks I would recommend to use CBR (like through the internet).

@neatnoise
Copy link
Author

@inkatail I made more changes regarding the bitrate overshoot

@inkatail
Copy link

inkatail commented Mar 8, 2026

@inkatail I made more changes regarding the bitrate overshoot

@neatnoise Tested, still has issues at least for me and according to btop it went as high as 46.8 at some point

@neatnoise
Copy link
Author

@inkatail CBR stays as an option if it's important to you

@inkatail
Copy link

inkatail commented Mar 9, 2026

@inkatail CBR stays as an option if it's important to you

Yep, that's what I will be using.

@psyke83
Copy link
Contributor

psyke83 commented Mar 10, 2026

@neatnoise

The PR is impacted by improper pipewire teardown logic that will be fixed by #4768, but there's another issue. It seems that the Vulkan encoder also triggers a crash on mode change even when the teardown logic is fixed. I can reproduce the bug by simply changing the screen mode in KDE's display settings and it will crash with a rough 50% chance.

Once #4768 is merged, please double-check this. I believe the below patch may be enough to guard against the issue (I can no longer trigger any crashes), but you may want to verify that other resources in the vulkan-specific code are being deallocated properly (such as DMA-BUF descriptors being closed properly).

diff --git a/src/platform/linux/portalgrab.cpp b/src/platform/linux/portalgrab.cpp
index f728f8f8..f491497f 100644
--- a/src/platform/linux/portalgrab.cpp
+++ b/src/platform/linux/portalgrab.cpp
@@ -1343,6 +1343,10 @@ namespace portal {
 
 #ifdef SUNSHINE_BUILD_VULKAN
       if (mem_type == platf::mem_type_e::vulkan && n_dmabuf_infos > 0) {
+        // Ensure width/height are valid non-zero values
+        if (width == 0 || height == 0) return nullptr;
+
+        BOOST_LOG(info) << "Initializing Vulkan encode device: " << width << "x" << height;
         return vk::make_avcodec_encode_device_vram(width, height, 0, 0);
       }
 #endif

Edit: the patch is not enough to resolve the issue. I'll look at this again when I have time (if you haven't already resolved it).

- Support multi-plane DRM modifiers (e.g. AMD DCC) in DMA-BUF import
- Average full 2x2 block for chroma subsampling instead of 2 horizontal pixels
…kmsgrab

- wlgrab: add Vulkan VRAM encode device support in wlr_vram_t,
  accept vulkan hwdevice type and route it to the VRAM path
- portalgrab: only use Vulkan VRAM when DMA-BUFs are available
- kmsgrab: remove dead vk::make_avcodec_encode_device_ram() call
  from display_ram_t since Vulkan RAM encoding is not implemented
- Remove format qualifiers from compute shader to support both
  NV12 (8-bit) and P010 (10-bit) with a single SPIR-V binary
- Detect P010 from FFmpeg sw_format and use R16/RG16 target views
- Rename shader from rgb2nv12 to rgb2yuv to reflect format-agnostic nature
Remove NO_RC_BUF_LIMIT flag from the Vulkan encoder so that
rc_buffer_size is set to a single-frame VBV by the generic encoder
setup. This constrains the hardware rate controller from producing
oversized frames after periods of bitrate undershoot.
When VBR rc_mode is selected, rc_min_rate was pinned to the same value
as rc_max_rate and bit_rate. This prevented the encoder from
undershooting on simple frames, causing accumulated headroom that led
to large bitrate spikes on complex frames.

Clear rc_min_rate to 0 in VBR mode so the encoder can freely vary
bitrate downward, eliminating the budget buildup that causes overshoot.
@neatnoise
Copy link
Author

Rebased to the upstream master to test

@neatnoise
Copy link
Author

It works fine for me when changing display resolutions on the current KDE CachyOS, portalgrab with pipewire 1.4.10

@shelterx
Copy link

Now it works for me too but something is off with the framepacing, I get occasional stutter ever 2 second. Might be a general master branch issue though.

@neatnoise
Copy link
Author

@shelterx framepacing issues are generally related to the capturers, not encoders

@psyke83
Copy link
Contributor

psyke83 commented Mar 10, 2026

It works fine for me when changing display resolutions on the current KDE CachyOS, portalgrab with pipewire 1.4.10

Thanks for testing - it was only happening with 1.6.0. PipeWire 1.6.1 was released today and I can no longer reproduce any crashes with Vulkan (so far), so I think this PR was never at fault. While troubleshooting, I did identify some descriptor leaks in portalgrab that occur on reinit, so I'll open a new PR with the fixes after verifying everything is OK. Thanks.

@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
39 New issues
3.9% Duplication on New Code (required ≤ 2%)
39 New Code Smells (required ≤ 0)
2 Duplicated Blocks on New Code (required ≤ 0)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants