Skip to content

fix(linux/kms): use same methodology for display name matching and list generation#5448

Open
Kishi85 wants to merge 1 commit into
LizardByte:masterfrom
Kishi85:kmsgrab-map-display-consistenly
Open

fix(linux/kms): use same methodology for display name matching and list generation#5448
Kishi85 wants to merge 1 commit into
LizardByte:masterfrom
Kishi85:kmsgrab-map-display-consistenly

Conversation

@Kishi85

@Kishi85 Kishi85 commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Description

This is a small addendum to #5423 to ensure there is never a mismatch between the KMS display list generation and display matching code by changing the latter to use the same methodology for matching to kmsgrab monitor index.

Both cases now generate a string using std::format("{}-{}", drmModeGetConnectorTypeName(type), index) and either add it to the display_name list or check if it string matches the value given during kmsgrab display init.

Also adds a log of the final display_names list returned to simplify debugging available display_names.

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 commented Jul 25, 2026

Copy link
Copy Markdown
Contributor Author

This should at least help with debugging #5444 but I think it's unlikely a fix by itself (unless something I'm not expecting is going on).

@ReenigneArcher
ReenigneArcher force-pushed the kmsgrab-map-display-consistenly branch from 6f5d0a7 to 4046739 Compare July 25, 2026 15:39
@sonarqubecloud

Copy link
Copy Markdown

@codecov

codecov Bot commented Jul 25, 2026

Copy link
Copy Markdown

Bundle Report

Bundle size has no change ✅

@codecov

codecov Bot commented Jul 25, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (master@c19ad3d). Learn more about missing BASE report.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/platform/linux/kmsgrab.cpp 0.00% 0 Missing and 3 partials ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #5448   +/-   ##
=========================================
  Coverage          ?   26.89%           
=========================================
  Files             ?      111           
  Lines             ?    25410           
  Branches          ?    11236           
=========================================
  Hits              ?     6835           
  Misses            ?    16522           
  Partials          ?     2053           
Flag Coverage Δ
Archlinux 0.00% <0.00%> (?)
FreeBSD-amd64 13.24% <ø> (?)
Homebrew-macos-14 20.33% <ø> (?)
Homebrew-macos-15 20.97% <ø> (?)
Homebrew-macos-26 21.11% <ø> (?)
Homebrew-ubuntu-24.04 12.93% <0.00%> (?)
Linux-AppImage 12.27% <0.00%> (?)
Windows-AMD64 15.19% <ø> (?)
Windows-ARM64 13.27% <ø> (?)
macOS-arm64 17.74% <ø> (?)
macOS-x86_64 18.42% <ø> (?)

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

Files with missing lines Coverage Δ
src/platform/linux/kmsgrab.cpp 3.69% <0.00%> (ø)

Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c19ad3d...4046739. Read the comment docs.

@ReenigneArcher

Copy link
Copy Markdown
Member

This should at least help with debugging #5444 but I think it's unlikely a fix by itself (unless something I'm not expecting is going on).

Do you want to have them test this PR before merging?

@Kishi85

Kishi85 commented Jul 25, 2026

Copy link
Copy Markdown
Contributor Author

No, this can be merged as it will ensure things work correctly.

For #5444 it'll just help debugging if it fixes that issue by accident then i'd call that a nice by-product.

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