Skip to content

feat(linux): unifiy display_name handling among linux capture backends#5423

Draft
Kishi85 wants to merge 3 commits into
LizardByte:masterfrom
Kishi85:linux-capture-unify-display-name-handling
Draft

feat(linux): unifiy display_name handling among linux capture backends#5423
Kishi85 wants to merge 3 commits into
LizardByte:masterfrom
Kishi85:linux-capture-unify-display-name-handling

Conversation

@Kishi85

@Kishi85 Kishi85 commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Description

Linux capture methods currently handle display_names differently for each type of capture backend:

  • portalgrab/kmsgrab/wlgrab: Preferred display_name is the display connector name (e.g. HDMI-A-1, DP-2) as those are unique and stable per system (e.g. connecting another monitor does not change the designation of an existing screen).
  • kmsgrab/x11grab: Use only an index-based display_name that is not necessarily in a stable order.

Display names can be used for the output_name (Display Id) configuration option which currently is rather confusing due to the different handling.

To reduce confusion and unify handling this PR adds connector-based display_names for kmsgrab and x11grab (while maintaining backwards compatibility) and also updates available documentation to reflect the correct options for the output_name configuration setting on Linux in general and specifics per capture backend.

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

See our AI usage policy.

  • 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

@Kishi85
Kishi85 force-pushed the linux-capture-unify-display-name-handling branch from 6748220 to 1d629f7 Compare July 16, 2026 12:04
@Kishi85 Kishi85 changed the title feat(linux): unifiy display_name handling among capture backends feat(linux): unifiy display_name handling among linux capture backends Jul 16, 2026
Kishi85 added 2 commits July 16, 2026 14:45
Fallback to previous index based monitor mapping if display_name is all
numeric. Otherwise map the connector name the same way correlate_wayland
does it.
Fallback to index based mapping unless a display_name containing non-digits is found
@Kishi85
Kishi85 force-pushed the linux-capture-unify-display-name-handling branch 2 times, most recently from 8f774c0 to 4179432 Compare July 16, 2026 12:51
@Kishi85
Kishi85 force-pushed the linux-capture-unify-display-name-handling branch from 4179432 to 2ee0fdf Compare July 16, 2026 12:54
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
7 New issues
7 New Code Smells (required ≤ 0)

See analysis details on SonarQube Cloud

💡 Need a hand with PR review? Try Gitar by Sonar!

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.

Changing display id not working anymore Misleading Label/Help Text when specifying default display under Configuration>Audio/Video tabs.

1 participant