What the edid generator
does not to create an original edid file, but rather to hack it so that it works at the desired resolution and refresh rate. The only error in this output isn’t just about Standard Timing; for example, the connection shows up as analog.
Still, you can change some parameters by editing the 3840x2160.S file, but parameters like the connection or Standard Timing aren’t modified, possibly due to edid.S
. I’m not sure if changing these parameters is even necessary, though.
Changed 3840x2160.S
GNU nano 8.1 3840x2160.S
/* 3840x2160@60: negative HSync, positive VSync, 594MHz pixel clock */
#define HSYNC_POL 0
#define VSYNC_POL 1
#define INPUT_TYPE INPUT_TYPE_DIGITAL
#define DPI 96
#define CLOCK 594000
#define MAX_DOTCLOCK 600000
#define VERSION 1
#define REVISION 4
#define XPIX 3840
#define YPIX 2160
#define XOFFSET 176
#define XPULSE 88
#define XBLANK (176 + 88 + 296)
#define YOFFSET 8
#define YPULSE 10
#define YBLANK (8 + 10 + 72)
#define XY_RATIO XY_RATIO_16_9
#define TIMING_NAME "3840x2160@60"
#define XSIZE_MM 1110
#define YSIZE_MM 620
#define MIN_VFREQ 30
#define MAX_VFREQ 75
#define MIN_HFREQ 30
#define MAX_HFREQ 90
#define STANDARD_TIMINGS { \
{ 2560, 1440, 60 }, \
{ 1920, 1080, 60 }, \
{ 1280, 720, 60 } \
}
#include "edid.S"
➜ edid-generator git:(master) ✗ make 3840x2160.bin
cc -c -DCRC="0x00" -o 3840x2160.o 3840x2160.S
edid.S: Assembler messages:
edid.S:171: Warning: value 0x1c1 truncated to 0xc1
edid.S:205: Warning: value 0xfffffffffffffc5b truncated to 0x5b
objcopy -j .data -Obinary 3840x2160.o 3840x2160.bin.nocrc
cat 3840x2160.bin.nocrc | edid-decode \
| sed -ne 's/^[ ]*Checksum: 0x\w\+ (should be \(0x\w\+\))$/\1/p' >3840x2160.crc
cc -c -DCRC="$(cat 3840x2160.crc)" -o 3840x2160.p 3840x2160.S
edid.S: Assembler messages:
edid.S:171: Warning: value 0x1c1 truncated to 0xc1
edid.S:205: Warning: value 0xfffffffffffffc5b truncated to 0x5b
objcopy -j .data -Obinary 3840x2160.p 3840x2160.bin
rm 3840x2160.p 3840x2160.crc 3840x2160.bin.nocrc 3840x2160.o
➜ edid-generator git:(master) ✗ edid-decode 3840x2160.bin
edid-decode (hex):
00 ff ff ff ff ff ff 00 31 d8 00 00 00 00 00 00
05 16 01 04 6d 64 38 78 ea 5e c0 a4 59 4a 98 25
20 50 54 00 00 00 c1 00 01 01 01 01 01 01 01 01
01 01 01 01 01 01 08 e8 00 30 f2 70 5a 80 b0 58
5b 00 e8 32 32 00 00 1c 00 00 00 ff 00 4c 69 6e
75 78 20 23 30 0a 20 20 20 20 00 00 00 fd 00 00
00 86 88 3c 00 0a 20 20 20 20 20 20 00 00 00 fc
00 33 38 34 30 78 32 31 36 30 40 36 30 0a 00 bd
----------------
Block 0, Base EDID:
EDID Structure Version & Revision: 1.4
Vendor & Product Identification:
Manufacturer: LNX
Model: 0
Made in: week 5 of 2012
Basic Display Parameters & Features:
Analog display
Signal Level Standard: 0.700 : 0.000 : 0.700 V p-p
Blank level equals black level
Sync: Separate Composite Serration
Maximum image size: 100 cm x 56 cm
Gamma: 2.20
DPMS levels: Standby Suspend Off
RGB color display
First detailed timing includes the native pixel format and preferred refresh rate
Color Characteristics:
Red : 0.6416, 0.3486
Green: 0.2919, 0.5957
Blue : 0.1474, 0.1250
White: 0.3125, 0.3281
Established Timings I & II: none
Standard Timings:
GTF : 1792x1120 60.000129 Hz 16:10 69.540 kHz 168.009000 MHz
Detailed Timing Descriptors:
DTD 1: 3840x2160 60.000000 Hz 16:9 135.000 kHz 594.000000 MHz (1000 mm x 562 mm)
Hfront 176 Hsync 88 Hback 296 Hpol N
Vfront 5 Vsync 11 Vback 74 Vpol P
Display Product Serial Number: 'Linux #0'
Display Range Limits:
Monitor ranges (GTF): 0-0 Hz V, 134-136 kHz H, max dotclock 600 MHz
Display Product Name: '3840x2160@60'
Checksum: 0xbd
➜ edid-generator git:(master) ✗
So, if you’re getting a 4K 60Hz display after these changes, you can just leave it as is w/o messing with the standard timings, etc. Otherwise, you could try finding the original EDID, but most brands don’t provide it—I couldn’t find mine (Samsung…).
Another option is to try updating the monitor, which might generate valid EDID info.