xrandr – How to Get EDID for a Single Monitor

edidxrandr

Pending an answer to xrandr detects amplifier as monitor a possible workaround is to blacklist devices with specific EDIDs. Unfortunately xrandr --verbose prints everything in a format which is cumbersome to parse and doesn't support querying single devices, and get-edid's output doesn't seem to be easy to map to xrandr's monitor IDs (for example DVI-1).

Is there some way to get an easily parseable EDID for a single monitor?

Best Answer

Lead #1: monitor-edid

I'm not that up on EDID and monitors but I did find this tool, monitor-edid which might be of use to you here as well.

Forgive me if it's off base, I'm trying to also learn more about this space, given the variety of questions you ask on the topic.

$ monitor-edid 
EISA ID: LEN4036
EDID version: 1.3
EDID extension blocks: 0
Screen size: 30.3 cm x 19.0 cm (14.08 inches, aspect ratio 16/10 = 1.59)
Gamma: 2.2
Digital signal

    # Monitor preferred modeline (60.0 Hz vsync, 55.8 kHz hsync, ratio 16/10, 120 dpi)
    ModeLine "1440x900" 114.06 1440 1488 1520 2044 900 903 909 930 -hsync -vsync

    # Monitor supported modeline (50.0 Hz vsync, 51.8 kHz hsync, ratio 16/10, 120 dpi)
    ModeLine "1440x900" 114.06 1440 1488 1520 2204 900 903 909 1035 -hsync -vsync

Lead #2: ddcontrol

There was another tool that I came across called ddccontrol, which might be helpful in getting the information you're after.

Lead #3: /sys

Finally in poking through /sys I noticed that there were leaf nodes hanging off of the various video interfaces.

$ sudo find . |grep -i edid
./devices/pci0000:00/0000:00:02.0/drm/card0/card0-HDMI-A-1/edid
./devices/pci0000:00/0000:00:02.0/drm/card0/card0-HDMI-A-2/edid
./devices/pci0000:00/0000:00:02.0/drm/card0/card0-HDMI-A-3/edid
./devices/pci0000:00/0000:00:02.0/drm/card0/card0-VGA-1/edid
./devices/pci0000:00/0000:00:02.0/drm/card0/card0-LVDS-1/edid
./devices/pci0000:00/0000:00:02.0/drm/card0/card0-DP-1/edid
./devices/pci0000:00/0000:00:02.0/drm/card0/card0-DP-2/edid
./devices/pci0000:00/0000:00:02.0/drm/card0/card0-DP-3/edid
./module/drm/parameters/edid_fixup
./module/drm_kms_helper/parameters/edid_firmware

However on my Lenovo laptop these "files" were empty, perhaps they're different on your system. I found this forum thread that showed sample output from the VGA EDID.

$ lspci | grep VGA
01:00.0 VGA compatible controller: nVidia Corporation NV17 [GeForce4 440 Go 64M] (rev a3)
$ xxd  /sys/devices/pci0000:00/0000:00:0b.0/0000:01:00.0/drm/card0/card0-VGA-1/edid
0000000: 00ff ffff ffff ff00 5a63 0213 0101 0101  ........Zc......
0000010: 2b0a 0103 1c25 1bb0 eb00 b8a0 5749 9b26  +....%......WI.&
0000020: 1048 4cff ff80 8199 8159 714f 6159 4559  .HL......YqOaYEY
0000030: 3159 a94f 0101 863d 00c0 5100 3040 40a0  1Y.O...=..Q.0@@.
0000040: 1300 680e 1100 001e 0000 00ff 0033 3139  ..h..........319
0000050: 3030 3433 3030 3737 330a 0000 00fd 0032  004300773......2
0000060: a01e 6114 000a 2020 2020 2020 0000 00fc  ..a...      ....
0000070: 0047 3930 6d62 0a20 2020 2020 2020 00ba  .G90mb.       ..

Source: Extract Monitor Serial Number / Manufacture Date Using EDID?.

References

Related Question