Skip to content

feat(linux): use connector name as default display name on linux#5423

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

feat(linux): use connector name as default display name on linux#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
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.
@Kishi85
Kishi85 force-pushed the linux-capture-unify-display-name-handling branch 4 times, most recently from 2ee0fdf to e1516bc Compare July 17, 2026 09:18
@Kishi85 Kishi85 changed the title feat(linux): unifiy display_name handling among linux capture backends feat(linux): use stable display connector name as recommended display_name on linux Jul 17, 2026
@Kishi85 Kishi85 changed the title feat(linux): use stable display connector name as recommended display_name on linux feat(linux): use stable display connector name as default display name on linux Jul 17, 2026
@Kishi85
Kishi85 force-pushed the linux-capture-unify-display-name-handling branch 4 times, most recently from ddcaf4f to 5ec4267 Compare July 17, 2026 12:32
@Kishi85

Kishi85 commented Jul 17, 2026

Copy link
Copy Markdown
Contributor Author

I've tested this with kmsgrab with KDE Wayland and also on a dedicated Debian X11 Xfce-VM with kmsgrab and x11grab both work correctly when an existing connector is specified as output_name in config, otherwise falling back to previous default values (first display for kms/entire workspace for x11grab).

Configuration Placeholder value on the Audio/Video tab and the helper text below the field is also showing the correct, updated texts for Linux.

Marking this ready for review.

@Kishi85
Kishi85 marked this pull request as ready for review July 17, 2026 12:46
@Kishi85
Kishi85 force-pushed the linux-capture-unify-display-name-handling branch 3 times, most recently from d669629 to 0a7a46d Compare July 17, 2026 13:08
@Kishi85
Kishi85 force-pushed the linux-capture-unify-display-name-handling branch from 0a7a46d to c417567 Compare July 17, 2026 13:10
@sonarqubecloud

Copy link
Copy Markdown

@Kishi85 Kishi85 changed the title feat(linux): use stable display connector name as default display name on linux feat(linux): use connector name as default display name on linux Jul 17, 2026
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