-
Notifications
You must be signed in to change notification settings - Fork 127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
--match-edid
matches different edids to same name
#406
Comments
Update: I've looked into the code a little and see that autorandr does not match on edid but on a fingerprint, which is the same for both monitors, I'll look into how the fingerprint is calculated later Update2: Apparently the edids have the same serial encoded and the fingerprinting process prefers serial over edid (also the fingerprints are directly compared which will collidle with similar short edids if serials are not present/readable, the fingerprint_equals function should likely be used here) Update3: This seems to be an Acer "feature" https://community.acer.com/en/discussion/689648/correct-serial-number-from-edid-how-i-could-get-the-serial-number-from-the-edid-data |
Looking way deeper into the code, I actually found an inconsistency in how the fingerprints are calculated. The current fingerprinting behaviour is introduced in this commit: d9b1953#diff-1e1a4777675c9d76e4f08f4a1ecfd24016758e0639d451af4d505004c33ee618R323 Based on the commit message, serial no is the gold standard and will be used if available, and only otherwise edid information (here timing) will be used. The case introduced actually reverses this, preferring timing information when available. Using edid parsers I actually found out that my acer screen do correctly list separate serial numbers, so the fingerprinting does not seem to do what we want and describe as desired behaviour (on screens of the same model, produced close to another, I'd always expect timing to match, but serials to differ) |
Context
I'm currently trying to make my NixOS setup more resilient to xrandr/nvidia arbitrary name shuffling. Technically autorandr and it's edid based matching should be perfect, however after replugging monitors my setup is now broken. If I call autorandr with
--match-edid
manually, it maps two screens with very similar (but different) edids to the same name, breaking detection. The edid similarity is to be expected since they are the same model of monitor, bought at the same time.Version
autorandr 1.15 (installed via nixpkgs#ccc0c2126893dd20963580b6478d1a10a4512185)
What am I doing
calling
autorandr --match-edid
What should happen
Different edids are match to their correct name
What actually happens
Two similar Edids are mapped to the same name (which is one of the names for the similar monitors and which it is is random every boot)
Reproduction
Here's my setup file
Obviously the human readable position names don't align with the default xrandr names. But invoking
autorandr --match-edid
gives me the following#See both left and right getting mapped to the same name default: renaming display left to DP-3 default: renaming display right to DP-3 default: renaming display middle to DP-4 default
I first thought I typoed in my config because the edids looked extremely similar, so I diffed them
This gives me the following output, showing that the two screens differ slightly in edid
I took a quick look at the source, but haven't stepped through with a debugger yet. I also don't know anything about the format of EDIDs so I don't know if autorandr does something more fancy than byte-for-byte comparison. Any Idea where I should start my investigation?
The text was updated successfully, but these errors were encountered: