Skip to content

Instantly share code, notes, and snippets.

@mbohun
Last active March 12, 2023 05:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mbohun/78ddbf80bb31a7c8ccaa817fe62a6b9b to your computer and use it in GitHub Desktop.
Save mbohun/78ddbf80bb31a7c8ccaa817fe62a6b9b to your computer and use it in GitHub Desktop.
EDID

old-fashioned way to get EDID does not work

install read-edid utils
  • parse-edid is required
mbohun@mamlas:~> zypper info read-edid
Loading repository data...
Reading installed packages...


Information for package read-edid:
----------------------------------
Repository     : Main Repository (OSS)
Name           : read-edid
Version        : 3.0.2-3.12
Arch           : x86_64
Vendor         : openSUSE
Installed Size : 52.4 KiB
Installed      : Yes
Status         : up-to-date
Source package : read-edid-3.0.2-3.12.src
Upstream URL   : http://polypux.org/projects/read-edid/
Summary        : Tool for reading EDID information
Description    : 
    A pair of tools for reading the Extended Display Identification Data
    (EDID) from a monitor. Assuming the video card supports the standard
    read commands, the utilities should work with most monitors made
    since 1996. 256-byte EDIDs are not supported, though.

    - get-edid, which gets the raw edid information from the monitor.
    - parse-edid, which turns the raw binary information into an
      xorg-compatible monitor section.

simple way to get and parse-edid
mbohun@mamlas:~> parse-edid < /sys/class/drm/card0-HDMI-A-2/edid
Checksum Correct

Section "Monitor"
        Identifier "KAMN32RT1SA"
        ModelName "KAMN32RT1SA"
        VendorName "KGN"
        # Monitor Manufactured week 19 of 2021
        # EDID version 1.3
        # Digital Display
        DisplaySize 700 390
        Gamma 2.20
        Option "DPMS" "true"
        Horizsync 30-240
        VertRefresh 48-120
        # Maximum pixel clock is 600MHz
        #Not giving standard mode: 1280x720, 60Hz
        #Not giving standard mode: 1280x1024, 60Hz
        #Not giving standard mode: 1440x900, 60Hz
        #Not giving standard mode: 1600x900, 60Hz
        #Not giving standard mode: 1680x1050, 60Hz
        #Not giving standard mode: 1920x1080, 60Hz

        #Extension block found. Parsing...
#WARNING: I may have missed a mode (CEA mode 63)
#WARNING: I may have missed a mode (CEA mode 92)
        Modeline        "Mode 11" +hsync +vsync 
        Modeline        "Mode 0" +hsync -vsync 
        Modeline        "Mode 1" 25.200 640 656 752 800 480 490 492 525 -hsync -vsync
        Modeline        "Mode 2" 27.027 720 736 798 858 480 489 495 525 -hsync -vsync
        Modeline        "Mode 3" 27.027 720 736 798 858 480 489 495 525 -hsync -vsync
        Modeline        "Mode 4" 74.250 1280 1390 1420 1650 720 725 730 750 +hsync +vsync
        Modeline        "Mode 5" 74.250 1920 2008 2052 2200 1080 1082 1087 1125 +hsync +vsync interlace
        Modeline        "Mode 6" 148.500 1920 2008 2052 2200 1080 1084 1089 1125 +hsync +vsync
        Modeline        "Mode 7" 27.000 720 732 796 864 576 581 586 625 -hsync -vsync
        Modeline        "Mode 8" 74.250 1280 1720 1760 1980 720 725 730 750 +hsync +vsync
        Modeline        "Mode 9" 74.250 1920 2448 2492 2640 1080 1082 1089 1125 +hsync +vsync interlace
        Modeline        "Mode 10" 148.500 1920 2448 2492 2640 1080 1084 1089 1125 +hsync +vsync
        Modeline        "Mode 12" +hsync +vsync 
        Modeline        "Mode 13" +hsync -vsync 
        Option "PreferredMode" "Mode 11"
EndSection
alternative way to get EDID
  • xrandr --props gives you EDID too
Screen 0: minimum 320 x 200, current 3840 x 1080, maximum 16384 x 16384
eDP-1 connected primary 1920x1080+1920+0 (normal left inverted right x axis y axis) 382mm x 215mm
        _MUTTER_PRESENTATION_OUTPUT: 0 
        EDID: 
                00ffffffffffff0006af9d4200000000
                111c0104a5261678029675a356529c27
                0c505400000001010101010101010101
                010101010101403880b470383e401010
                3e007ed710000018403880b470385c41
                10103e007ed710000018000000fe0041
                554f0a202020202020202020000000fe
                004231373348414e30342e32200a00e6
        Colorspace: Default 
                supported: Default, RGB_Wide_Gamut_Fixed_Point, RGB_Wide_Gamut_Floating_Point, opRGB, DCI-P3_RGB_D65, BT2020_RGB, BT601_YCC, BT709_YCC, XVYCC_601, XVYCC_709, SYCC_601, opYCC_601, BT2020_CYCC, BT2020_YCC
        max bpc: 12 
                range: (6, 12)
        Broadcast RGB: Automatic 
                supported: Automatic, Full, Limited 16:235
        panel orientation: Normal 
                supported: Normal, Upside Down, Left Side Up, Right Side Up
        scaling mode: Full aspect 
                supported: Full, Center, Full aspect
        link-status: Good 
                supported: Good, Bad
        CTM: 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 
                0 1 
        CONNECTOR_ID: 95 
                supported: 95
        non-desktop: 0 
                range: (0, 1)
   1920x1080     60.05*+  60.01    59.97    59.96    48.02    59.93  
   1680x1050     59.95    59.88  
   1400x1050     59.98  
   1600x900      59.99    59.94    59.95    59.82  
   1280x1024     60.02  
   1400x900      59.96    59.88  
   1280x960      60.00  
   1440x810      60.00    59.97  
   1368x768      59.88    59.85  
   1280x800      59.99    59.97    59.81    59.91  
   1280x720      60.00    59.99    59.86    59.74  
   1024x768      60.04    60.00  
   960x720       60.00  
   928x696       60.05  
   896x672       60.01  
   1024x576      59.95    59.96    59.90    59.82  
   960x600       59.93    60.00  
   960x540       59.96    59.99    59.63    59.82  
   800x600       60.00    60.32    56.25  
   840x525       60.01    59.88  
   864x486       59.92    59.57  
   700x525       59.98  
   800x450       59.95    59.82  
   640x512       60.02  
   700x450       59.96    59.88  
   640x480       60.00    59.94  
   720x405       59.51    58.99  
   684x384       59.88    59.85  
   640x400       59.88    59.98  
   640x360       59.86    59.83    59.84    59.32  
   512x384       60.00  
   512x288       60.00    59.92  
   480x270       59.63    59.82  
   400x300       60.32    56.34  
   432x243       59.92    59.57  
   320x240       60.05  
   360x202       59.51    59.13  
   320x180       59.84    59.32  
DP-1 disconnected (normal left inverted right x axis y axis)
        HDCP Content Type: HDCP Type0 
                supported: HDCP Type0, HDCP Type1
        Content Protection: Undesired 
                supported: Undesired, Desired, Enabled
        Colorspace: Default 
                supported: Default, RGB_Wide_Gamut_Fixed_Point, RGB_Wide_Gamut_Floating_Point, opRGB, DCI-P3_RGB_D65, BT2020_RGB, BT601_YCC, BT709_YCC, XVYCC_601, XVYCC_709, SYCC_601, opYCC_601, BT2020_CYCC, BT2020_YCC
        max bpc: 12 
                range: (6, 12)
        Broadcast RGB: Automatic 
                supported: Automatic, Full, Limited 16:235
        audio: auto 
                supported: force-dvi, off, auto, on
        subconnector: Unknown 
                supported: Unknown, VGA, DVI-D, HDMI, DP, Wireless, Native
        link-status: Good 
                supported: Good, Bad
        CTM: 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 
                0 1 
        CONNECTOR_ID: 103 
                supported: 103
        non-desktop: 0 
                range: (0, 1)
HDMI-1 disconnected (normal left inverted right x axis y axis)
        HDCP Content Type: HDCP Type0 
                supported: HDCP Type0, HDCP Type1
        Content Protection: Undesired 
                supported: Undesired, Desired, Enabled
        max bpc: 12 
                range: (8, 12)
        content type: No Data 
                supported: No Data, Graphics, Photo, Cinema, Game
        Colorspace: Default 
                supported: Default, SMPTE_170M_YCC, BT709_YCC, XVYCC_601, XVYCC_709, SYCC_601, opYCC_601, opRGB, BT2020_CYCC, BT2020_RGB, BT2020_YCC, DCI-P3_RGB_D65, DCI-P3_RGB_Theater
        aspect ratio: Automatic 
                supported: Automatic, 4:3, 16:9
        Broadcast RGB: Automatic 
                 supported: Automatic, Full, Limited 16:235
        audio: auto 
                supported: force-dvi, off, auto, on
        link-status: Good 
                supported: Good, Bad
        CTM: 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 
                0 1 
        CONNECTOR_ID: 113 
                supported: 113
        non-desktop: 0 
                range: (0, 1)
HDMI-2 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 697mm x 393mm
        _MUTTER_PRESENTATION_OUTPUT: 0 
        EDID: 
                00ffffffffffff002cee800c01000000
                131f010380462778bbee95a3544c9926
                0f5054adcb0081c081809500a9c0b300
                d1c001010101565e00a0a0a029503020
                3500b9892100001a000000ff00303030
                30303030303030303030000000fd0030
                781ef03c000a202020202020000000fc
                004b414d4e333252543153410a20017c
                02033ef34c0102030405901213141f3f
                5c230907078301000068030c00100098
                780067d85dc40178c000681a00000101
                3078ede305e301e606070160523f3684
                80a0703832404020450055502100001e
                fabd00a0a0a032502040450055502100
                001efc3100a050a0295030203500554f
                2100001a00000000000000000000007b
        HDCP Content Type: HDCP Type0 
                supported: HDCP Type0, HDCP Type1
        Content Protection: Undesired 
                supported: Undesired, Desired, Enabled
        max bpc: 12 
                range: (8, 12)
        content type: No Data 
                supported: No Data, Graphics, Photo, Cinema, Game
        Colorspace: Default 
                supported: Default, SMPTE_170M_YCC, BT709_YCC, XVYCC_601, XVYCC_709, SYCC_601, opYCC_601, opRGB, BT2020_CYCC, BT2020_RGB, BT2020_YCC, DCI-P3_RGB_D65, DCI-P3_RGB_Theater
        aspect ratio: Automatic 
                supported: Automatic, 4:3, 16:9
        Broadcast RGB: Automatic 
                supported: Automatic, Full, Limited 16:235
        audio: auto 
                supported: force-dvi, off, auto, on
        link-status: Good 
                supported: Good, Bad
        CTM: 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 
                0 1 
        CONNECTOR_ID: 119 
                supported: 119      
        non-desktop: 0 
                range: (0, 1)
   2560x1440     59.95 +
   1920x1440     75.00    60.00  
   1856x1392     75.00    60.00  
   1792x1344     75.00    60.00  
   2048x1152     60.00  
   1920x1200     84.93    74.93    59.95  
   1920x1080    120.00*  119.88    60.00    60.00    50.00    59.94  
   1920x1080i    60.00    50.00    59.94  
   1600x1200    119.92    85.00    75.00    70.00    65.00    60.00  
   1280x1440     60.00  
   1680x1050    119.99    84.94    74.89    59.88  
   1680x945      60.02  
   1400x1050    119.90    84.96    74.87    59.95  
   1600x900      60.00  
   1280x1024    119.96    85.02    75.02    60.02  
   1440x900     119.85    84.84    74.98    59.90  
   1280x960     119.84    85.00    60.00  
   1366x768      59.79  
   1360x768     119.97    60.02  
   1280x800     119.91    84.88    74.93    59.91  
   1152x864      75.00  
   1280x768     119.80    84.84    74.89    59.99  
   1280x720      60.00    50.00    59.94  
   1024x768     119.99    85.00    75.03    70.07    60.00  
   1024x768i     86.96  
   1024x576      59.97  
   800x600      119.97    85.06    72.19    75.00    60.32    56.25  
   720x576       50.00  
   848x480       60.00  
   720x480       60.00    59.94  
   640x480       85.01    75.00    72.81    60.00    59.94  
   720x400       85.04    70.08  
   640x400       85.08  
   640x350       85.08

get-edid

get-edid -i (i2ic)
  • i2c works after modprobe i2c-dev; then you can use get-edid -i| parse-edid
mbohun@mamlas:~> get-edid -i | parse-edid
This is read-edid version 3.0.2. Prepare for some fun.
Attempting to use i2c interface
Only trying 1 as per your request.
256-byte EDID successfully retrieved from i2c bus 1
Looks like i2c was successful. Have a good day.
Checksum Correct

Section "Monitor"
        Identifier "KAMN32RT1SA"
        ModelName "KAMN32RT1SA"
        VendorName "KGN"
        # Monitor Manufactured week 19 of 2021
        # EDID version 1.3
        # Digital Display
        DisplaySize 700 390
        Gamma 2.20
        Option "DPMS" "true"
        Horizsync 30-240
        VertRefresh 48-120
        # Maximum pixel clock is 600MHz
        #Not giving standard mode: 1280x720, 60Hz
        #Not giving standard mode: 1280x1024, 60Hz
        #Not giving standard mode: 1440x900, 60Hz
        #Not giving standard mode: 1600x900, 60Hz
        #Not giving standard mode: 1680x1050, 60Hz
        #Not giving standard mode: 1920x1080, 60Hz

        #Extension block found. Parsing...
#WARNING: I may have missed a mode (CEA mode 63)
#WARNING: I may have missed a mode (CEA mode 92)
        Modeline        "Mode 11" +hsync +vsync 
        Modeline        "Mode 0" +hsync -vsync 
        Modeline        "Mode 1" 25.200 640 656 752 800 480 490 492 525 -hsync -vsync
        Modeline        "Mode 2" 27.027 720 736 798 858 480 489 495 525 -hsync -vsync
        Modeline        "Mode 3" 27.027 720 736 798 858 480 489 495 525 -hsync -vsync
        Modeline        "Mode 4" 74.250 1280 1390 1420 1650 720 725 730 750 +hsync +vsync
        Modeline        "Mode 5" 74.250 1920 2008 2052 2200 1080 1082 1087 1125 +hsync +vsync interlace
        Modeline        "Mode 6" 148.500 1920 2008 2052 2200 1080 1084 1089 1125 +hsync +vsync
        Modeline        "Mode 7" 27.000 720 732 796 864 576 581 586 625 -hsync -vsync
        Modeline        "Mode 8" 74.250 1280 1720 1760 1980 720 725 730 750 +hsync +vsync
        Modeline        "Mode 9" 74.250 1920 2448 2492 2640 1080 1082 1089 1125 +hsync +vsync interlace
        Modeline        "Mode 10" 148.500 1920 2448 2492 2640 1080 1084 1089 1125 +hsync +vsync
        Modeline        "Mode 12" +hsync +vsync 
        Modeline        "Mode 13" +hsync -vsync 
        Option "PreferredMode" "Mode 11"
EndSection
get-edid (/dev/mem) FAIL
  • /dev/mem FAIL: passing strict-devmem=0 to kernel does not work anymore? or only if you build it as a kernel module?
mamlas:/home/mbohun # whoami
root

mamlas:/home/mbohun # id
uid=0(root) gid=0(root) groups=0(root)

mamlas:/home/mbohun # ls -lahF /dev/mem
crw-r----- 1 root kmem 1, 1 Mar 12 15:34 /dev/mem
mamlas:/home/mbohun # get-edid 
This is read-edid version 3.0.2. Prepare for some fun.
Attempting to use i2c interface
Looks like no busses have an EDID. Sorry!
Attempting to use the classical VBE interface
open /dev/mem: Operation not permitted
error initialising realmode interface
do you have full superuser (root) permissions?
I'm sorry nothing was successful. Maybe try some other arguments
if you played with them, or send an email to Matthew Kern <pyrophobicman@gmail.com>.
mamlas:/home/mbohun # 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment