Skip to content

fix(linux/kms): Use connector type index from KMS instead of self calculation - #5489

Open
Kishi85 wants to merge 1 commit into
LizardByte:masterfrom
Kishi85:kms-use-connector-type-id
Open

fix(linux/kms): Use connector type index from KMS instead of self calculation#5489
Kishi85 wants to merge 1 commit into
LizardByte:masterfrom
Kishi85:kms-use-connector-type-id

Conversation

@Kishi85

@Kishi85 Kishi85 commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Description

Instead of calculating the index for each connector_type manually use the connector_type_id index provided by KMS to ensure correct values.

For details see https://www.kernel.org/doc/html/latest/gpu/drm-kms.html#c.drm_connector and related docs for connector_type and connector_type_id

Screenshot

Issues Fixed or Closed

This might fix some issues related to #5444 but needs to be tested first before adding to this list.

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 kms-use-connector-type-id branch from 7ade044 to 489d6ea Compare August 9, 2026 07:08
@Kishi85

Kishi85 commented Aug 9, 2026

Copy link
Copy Markdown
Contributor Author

@ReenigneArcher I don't think this'll impact #5481 much but might reduce the need for it as KMS monitors should always line-up properly with this change.

@codecov

codecov Bot commented Aug 9, 2026

Copy link
Copy Markdown

Bundle Report

Bundle size has no change ✅

@ReenigneArcher

Copy link
Copy Markdown
Member

@ReenigneArcher I don't think this'll impact #5481 much but might reduce the need for it as KMS monitors should always line-up properly with this change.

Thanks for letting me know. I don't really know if that will fix the issue mentioned. I just asked GPT 5.6 to address the stale issues instead of continuing to ignore them. Not sure the affected users will respond or test it though.

Could you try a force push for this PR to get the sonar build to work?

@codecov

codecov Bot commented Aug 9, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 28.10%. Comparing base (25c06d7) to head (fa3654e).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/platform/linux/kmsgrab.cpp 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5489      +/-   ##
==========================================
- Coverage   28.10%   28.10%   -0.01%     
==========================================
  Files         109      109              
  Lines       24710    24711       +1     
  Branches    10911    10911              
==========================================
  Hits         6944     6944              
+ Misses      15869    14757    -1112     
- Partials     1897     3010    +1113     
Flag Coverage Δ
Archlinux 0.00% <0.00%> (ø)
FreeBSD-aarch64 ?
FreeBSD-amd64 13.98% <ø> (+<0.01%) ⬆️
Homebrew-macos-14 22.55% <ø> (ø)
Homebrew-macos-15 22.73% <ø> (-0.49%) ⬇️
Homebrew-macos-26 23.34% <ø> (ø)
Homebrew-ubuntu-24.04 14.01% <0.00%> (-0.01%) ⬇️
Linux-AppImage 13.42% <0.00%> (-0.01%) ⬇️
Windows-AMD64 17.42% <ø> (ø)
Windows-ARM64 14.97% <ø> (ø)
macOS-arm64 19.81% <ø> (ø)
macOS-x86_64 20.52% <ø> (ø)

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.57% <0.00%> (-0.01%) ⬇️

... and 25 files with indirect coverage changes

@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown
Last Updated 2026-08-09 18:17:01 UTC
Source Run CI Run #4910
Commit fa3654ecd2c09b061e241f91cdc0cc30d2b544f0

Screenshot Comparison

PR #5489 screenshots vs screenshots baseline.

Matrix: AppImage

Image Baseline PR
sunshine_tray_initial.png
sunshine_tray_menu.png
sunshine_tray_pairing_request.png
sunshine_tray_paused.png
sunshine_tray_stopped.png
sunshine_tray_streaming.png
sunshine_tray_tooltip.png

Matrix: Windows-AMD64

Image Baseline PR
sunshine_tray_initial.png
sunshine_tray_menu.png
sunshine_tray_pairing_request.png
sunshine_tray_paused.png
sunshine_tray_stopped.png
sunshine_tray_streaming.png
sunshine_tray_tooltip.png

Matrix: Windows-ARM64

Image Baseline PR
sunshine_tray_initial.png
sunshine_tray_menu.png
sunshine_tray_pairing_request.png
sunshine_tray_paused.png
sunshine_tray_stopped.png
sunshine_tray_streaming.png
sunshine_tray_tooltip.png

Matrix: macOS-arm64

Image Baseline PR
sunshine_tray_initial.png
sunshine_tray_menu.png
sunshine_tray_pairing_request.png
sunshine_tray_paused.png
sunshine_tray_stopped.png
sunshine_tray_streaming.png
sunshine_tray_tooltip.png

Matrix: macOS-x86_64

Image Baseline PR
sunshine_tray_initial.png
sunshine_tray_menu.png
sunshine_tray_pairing_request.png
sunshine_tray_paused.png
sunshine_tray_stopped.png
sunshine_tray_streaming.png
sunshine_tray_tooltip.png

…culation

Instead of calculating the index for each connector_type manually
use the connector_type_id index provided by KMS to ensure correct values.
@Kishi85
Kishi85 force-pushed the kms-use-connector-type-id branch from 489d6ea to fa3654e Compare August 9, 2026 16:57
@sonarqubecloud

sonarqubecloud Bot commented Aug 9, 2026

Copy link
Copy Markdown

@Kishi85
Kishi85 marked this pull request as draft August 9, 2026 18:37
@Kishi85

Kishi85 commented Aug 9, 2026

Copy link
Copy Markdown
Contributor Author

I'll do a few more tests to make sure this does what it should (at least on my setup). I'll mark this ready for review again once I'm done.

@Kishi85

Kishi85 commented Aug 9, 2026

Copy link
Copy Markdown
Contributor Author

I'll have to flag this as a breaking change as it might reorder monitor indices but those are not guaranteed to be stable for KMS anyway and no longer recommended for the output_name configuration option.

Also should be extensively tested in multi-monitor setups before merging.

@Kishi85
Kishi85 marked this pull request as ready for review August 9, 2026 19:00
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