Skip to content

fixed: drm - physical address detection settled on the first enabled connector - #751

Open
BackSlasher wants to merge 1 commit into
Pulse-Eight:masterfrom
BackSlasher:drm-edid-first-connector-with-address
Open

BackSlasher wants to merge 1 commit into
Pulse-Eight:masterfrom
BackSlasher:drm-edid-first-connector-with-address

Conversation

@BackSlasher

Copy link
Copy Markdown

Look for a connector that has a valid HDMI address, and not just one that is enabled.

On my laptop, the internal panel is also enabled but has no "HDMI vendor block", so parsing the address from it returns 0, which makes libcec fall back to the adapter's defaults.
This is despite another output having a completely valid address - the internal panel just comes up first in the readdir ordering sometimes.

This fix doesn't stop on the first enabled connector, but rather the first one that has a valid address.


The original early exit was in #262, bailing early rather than crashing on an empty file in #263 (also reported in #147).
The parser is now more robust so this is no longer a risk. The zero-length and short-EDID cases below cover it.

Tested

The scan directory is hardcoded, so the fake test cases needed a small shim. I avoided including it here to keep the change small. I have a follow-up commit that makes the directory a parameter and scans connectors in sorted order.
I also have the test as a dependency-free executable that could be wired into CTest. I'm happy to contribute either if you'd like them.

…connector

Look for a connector that has a valid HDMI address, and not just one that
is enabled.

On my laptop, the internal panel is also enabled but has no "HDMI vendor
block", so parsing the address from it returns 0, which makes libcec
fall back to the adapter's defaults.
This is despite another output having a completely valid address - the
internal panel just comes up first in the `readdir` ordering sometimes.

This fix doesn't stop on the first enabled connector, but rather the first
one that has a valid address.
@github-actions

Copy link
Copy Markdown

Thank you for the contribution. Before we can merge it we ask that you accept the Pulse-Eight contributor agreement, which grants us the rights we need to ship your work under every licence libCEC is offered under.
Sign the Individual agreement if you hold the copyright yourself, or the Entity agreement if your employer does, and email the scan to contributor-agreement@pulse-eight.com. Then post the line below as a comment here, so the pull request records that you did:


I have signed the Pulse-Eight contributor agreement and sent it by email


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@BackSlasher

Copy link
Copy Markdown
Author

I've signed the Individual Contributor Agreement, but I can't deliver it. Mail to contributor-agreement@pulse-eight.com is rejected:

550 5.1.1 User unknown

Sent 2026-09-21 13:19 UTC, Message-ID <CAD+nROCKOtSRiLF-8dvuZJAKX9d9oEZUf2QMUdUOUgA=sYXHNg@mail.gmail.com>. That's the address given both on pulse-eight.com/contributors and in this repo's CLA bot message (.github/workflows/cla.yml), so it will affect anyone else going through the new gate too. Where should I send the signed copy? I'll post the confirmation line once it has actually been delivered.

This branch has not been deployed

No deployments
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.

1 participant