Skip to content

fix(linux/xdgportal): set variable rate capture#4624

Merged
ReenigneArcher merged 1 commit intoLizardByte:feat/linux/add-xdg-portal-grabfrom
psyke83:xdg_variable_rate
Jan 25, 2026
Merged

fix(linux/xdgportal): set variable rate capture#4624
ReenigneArcher merged 1 commit intoLizardByte:feat/linux/add-xdg-portal-grabfrom
psyke83:xdg_variable_rate

Conversation

@psyke83
Copy link
Contributor

@psyke83 psyke83 commented Jan 24, 2026

Description

The previous code was using fixed rate capture, but didn't set correctly, as the maxFramerate param governs the framerate on KWin. If unset, maxFramerate defaults to the host display refresh rate. However, even if set appropriately, KWin (but not mutter) would drop ~2fps per second on a 60fps stream constantly.

If we instead set variable rate capture (0, 1) it resolves the FPS drop issue on KWin, and leaves our capture() function to handle the appropriate pacing.

Screenshot

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

@ReenigneArcher ReenigneArcher changed the title linux: xdgportal: set variable rate capture fix(linux/xdgportal): set variable rate capture Jan 24, 2026
@ReenigneArcher ReenigneArcher added this to the xdg portal grab milestone Jan 24, 2026
The previous code was using fixed rate capture, but didn't set correctly, as
the maxFramerate param governs the framerate on KWin. If unset, maxFramerate
defaults to the host display refresh rate. However, even if set
appropriately, KWin (but not mutter) would drop ~2fps per second on a 60fps
stream constantly.

If we instead set variable rate capture (0, 1) it resolves the FPS drop issue
on KWin, and leaves our capture() function to handle the appropriate pacing.
@psyke83 psyke83 marked this pull request as ready for review January 25, 2026 02:51
@sonarqubecloud
Copy link

@codecov
Copy link

codecov bot commented Jan 25, 2026

Bundle Report

Bundle size has no change ✅

@codecov
Copy link

codecov bot commented Jan 25, 2026

Codecov Report

❌ Patch coverage is 0% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 15.17%. Comparing base (3eb0a23) to head (deae19f).
⚠️ Report is 1 commits behind head on feat/linux/add-xdg-portal-grab.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/platform/linux/portalgrab.cpp 0.00% 4 Missing and 4 partials ⚠️
Additional details and impacted files
@@                        Coverage Diff                         @@
##           feat/linux/add-xdg-portal-grab    #4624      +/-   ##
==================================================================
+ Coverage                           13.34%   15.17%   +1.83%     
==================================================================
  Files                                  69       95      +26     
  Lines                               12623    19715    +7092     
  Branches                             5947     9072    +3125     
==================================================================
+ Hits                                 1684     2992    +1308     
- Misses                              10437    13220    +2783     
- Partials                              502     3503    +3001     
Flag Coverage Δ
Archlinux 11.09% <0.00%> (?)
FreeBSD-14.3-amd64 13.24% <0.00%> (?)
Homebrew-ubuntu-22.04 13.45% <0.00%> (+0.11%) ⬆️
Linux-AppImage 11.49% <0.00%> (?)
Windows-AMD64 13.44% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/platform/linux/portalgrab.cpp 4.50% <0.00%> (+1.78%) ⬆️

... and 84 files with indirect coverage changes

@ReenigneArcher ReenigneArcher merged commit b63e1af into LizardByte:feat/linux/add-xdg-portal-grab Jan 25, 2026
53 of 54 checks passed
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.

2 participants