Repository navigation
fix(LinuxFramebuffer): select a KMS-capable DRM card automatically - #21923
Conversation
|
You can test this PR using the following package version. |
|
|
@cla-avalonia agree |
|
On second thought, I don't think using That would be a breaking change, though, so it would probably need to be considered separately from this fix. |
MrJul
left a comment
There was a problem hiding this comment.
A minor change is needed but overall the PR looks good.
I agree that the current design isn't the best, especially as a constructor. |
dab8230 to
0d9808c
Compare
|
You can test this PR using the following package version. |
0d9808c to
4346dd7
Compare
|
You can test this PR using the following package version. |
|
@MrJul Apologies for the bother, it seems the CI failure might be a flaky test unrelated to my commits. Could you please give it a kick and re-run the CI? |
…valoniaUI#21923) * fix(LinuxFramebuffer): select a KMS-capable DRM card automatically * fix(LinuxFramebuffer): use invariant culture for DRM card number parsing
What does the pull request do?
Improves automatic DRM card detection.
Avalonia documentation states:
However, the previous detection simply opened the first DRM card returned by the file system.
What is the current behavior?
When no card path is specified, Avalonia opens the first matching /dev/dri/cardN, even if it does not expose usable KMS resources.
What is the updated/expected behavior with this PR?
Avalonia checks DRM cards in numeric order and selects the first card exposing KMS resources with at least one CRTC, encoder, and connector.
Unsuitable cards are closed and skipped.
How was the solution implemented (if it's not obvious)?
Card names are validated and sorted numerically. Each candidate is opened and checked with
drmModeGetResources.Checklist
Breaking changes
None.
Obsoletions / Deprecations
None.
Fixed issues
None.