-
Notifications
You must be signed in to change notification settings - Fork 0
Fix EDID on Dell 2001FP
My monitor has always been prone to EDID table corruption. The monitor has no protection from random write commands (noise).
To anyone reading this, you really need to know and understand the dangers of using i2cset
before you start!
If used incorrectly you can break your computer!!
Link to an excellent site with an edid.bin
file.
The EDID contains the serial number of the monitor. It is stored at offset 0x4D
. It contains 12 printable characters starting at offset 0x4D
with the letter C
. The last 4 characters of the serial number are repeated at offset 0x0C
but are in reverse order. For example S/N: C064649N2VJL
, the 2VJL is reversed and stored at offset 0x0C
as LJV2
. This is useful to know when adapting the sample EDID to your monitor. You should find a label on your monitor with the correct serial number starting with C
.
hexdump -C DELL-2001FP_844515916.edid
00000000 00 ff ff ff ff ff ff 00 10 ac 08 a0 4c 4a 56 32 |............LJV2|
00000010 27 0e 01 03 80 29 1f 78 ee 63 90 a3 57 4b 9b 25 |'....).x.c..WK.%|
00000020 11 50 54 a5 4b 00 81 80 a9 40 71 4f 01 01 01 01 |.PT.K....@qO....|
00000030 01 01 01 01 01 01 48 3f 40 30 62 b0 32 40 40 c0 |......H?@0b.2@@.|
00000040 13 00 6f 13 11 00 00 1e 00 00 00 ff 00 43 30 36 |..o..........C06|
00000050 34 36 34 39 4e 32 56 4a 4c 20 00 00 00 fc 00 44 |4649N2VJL .....D|
00000060 45 4c 4c 20 32 30 30 31 46 50 0a 20 00 00 00 fd |ELL 2001FP. ....|
00000070 00 38 4c 1f 50 10 00 0a 20 20 20 20 20 20 00 f8 |.8L.P... ..|
The above hex dump is from the DVI port.
EDID for DVI
- byte offset
0x14
is0x80
this indicates a digital interface
- byte offset
0x75
is 0x10 it should be0x11
.0x10
implies the maximum pixel clock rate was 160 MHz instead of 162. It should have been: "Maximum pixel clock rate, rounded up to 10 MHz multiple"
DELA008
0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
00: 00 ff ff ff ff ff ff 00 10 ac 08 a0 4c 4a 56 32 ............LJV2
10: 27 0e 01 03 80 29 1f 78 ee 63 90 a3 57 4b 9b 25 '....).x.c..WK.%
20: 11 50 54 a5 4b 00 81 80 a9 40 71 4f 01 01 01 01 .PT.K....@qO....
30: 01 01 01 01 01 01 48 3f 40 30 62 b0 32 40 40 c0 ......H?@0b.2@@.
40: 13 00 6f 13 11 00 00 1e 00 00 00 ff 00 43 30 36 ..o..........C06
50: 34 36 34 39 4e 32 56 4a 4c 20 00 00 00 fc 00 44 4649N2VJL .....D
60: 45 4c 4c 20 32 30 30 31 46 50 0a 20 00 00 00 fd ELL 2001FP. ....
70: 00 38 4c 1f 50 10 00 0a 20 20 20 20 20 20 00 f8 .8L.P... ..
Reconstructed EDID for VGA from DVI
- byte offset
0x14
is0x0e
this indicates an analog interface - byte offset
0x0A
is0x07
instead of0x08
. I think this was to match up with the Plug-n-Play ID - calculate and store checksum at
0x7F
DELA007
0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
00: 00 ff ff ff ff ff ff 00 10 ac 07 a0 4c 4a 56 32 ............LJV2
10: 27 0e 01 03 0e 29 1f 78 ee 63 90 a3 57 4b 9b 25 '....).x.c..WK.%
20: 11 50 54 a5 4b 00 81 80 a9 40 71 4f 01 01 01 01 .PT.K....@qO....
30: 01 01 01 01 01 01 48 3f 40 30 62 b0 32 40 40 c0 ......H?@0b.2@@.
40: 13 00 6f 13 11 00 00 1e 00 00 00 ff 00 43 30 36 ..o..........C06
50: 34 36 34 39 4e 32 56 4a 4c 20 00 00 00 fc 00 44 4649N2VJL .....D
60: 45 4c 4c 20 32 30 30 31 46 50 0a 20 00 00 00 fd ELL 2001FP. ....
70: 00 38 4c 1f 50 10 00 0a 20 20 20 20 20 20 00 .8L.P... ..
Fix Checksum:
#!/bin/bash
#
sudo get-edid -b 1 >edid_orig.bin
#
CheckSum=$(( (`hexdump -v -n 127 -e '/1 "-%u"' edid_orig.bin | sed "s/$/\n/" | bc`) & 0x0FF ))
CkSumHex=`printf "0x%x\n" $CheckSum`
#
sudo i2cset 1 0x50 0x7f $CkSumHex b
#
sudo get-edid -b 1 >edid_new.bin
hexdump -C edid_new.bin
Read the first 16 bytes of edid.bin
. Write bash commands for setting one byte at a time of the monitor's EDID table.
Run the command and leave the echo command as is. Verify the output looks good. Then, copy/paste back into the shell for execution.
-> hexdump -v -n 16 -e '/1 "0x%02_ax 0x%02x\n"' edid.bin | { while read i; do echo "sudo i2cset 1 0x50 $i b; sleep 0.5;"; done }
This is the output of the above command. If it looks good, copy and paste into a terminal window.
sudo i2cset 1 0x50 0x00 0x00 b; sleep 0.5;
sudo i2cset 1 0x50 0x01 0xff b; sleep 0.5;
sudo i2cset 1 0x50 0x02 0xff b; sleep 0.5;
sudo i2cset 1 0x50 0x03 0xff b; sleep 0.5;
sudo i2cset 1 0x50 0x04 0xff b; sleep 0.5;
sudo i2cset 1 0x50 0x05 0xff b; sleep 0.5;
sudo i2cset 1 0x50 0x06 0xff b; sleep 0.5;
sudo i2cset 1 0x50 0x07 0x00 b; sleep 0.5;
sudo i2cset 1 0x50 0x08 0x10 b; sleep 0.5;
sudo i2cset 1 0x50 0x09 0xac b; sleep 0.5;
sudo i2cset 1 0x50 0x0a 0x08 b; sleep 0.5;
sudo i2cset 1 0x50 0x0b 0xa0 b; sleep 0.5;
sudo i2cset 1 0x50 0x0c 0x4c b; sleep 0.5; # use value from offset 0x58
sudo i2cset 1 0x50 0x0d 0x4a b; sleep 0.5; # use value from offset 0x57
sudo i2cset 1 0x50 0x0e 0x56 b; sleep 0.5; # use value from offset 0x56
sudo i2cset 1 0x50 0x0f 0x32 b; sleep 0.5; # use value from offset 0x55
Tools needed.
- Linux Live USB
- apt-get install i2c-tools read-edid
- i2cset
- i2cdump
- get-edid
- parse-edid
sudo apt install i2c-tools
Use get-edid to retrieve binary edid.
sudo get-edid -b 0 >edid0.bin
sudo get-edid -b 1 >edid1.bin
parse-edid <edid0.bin
Use i2cset to write to EDID EEPROM
sudo i2cdump 0 0x50
sudo i2cset 0 0x50 0x00 0x00 b
sudo i2cset 0 0x50 0x01 0xFF b
sudo i2cset 0 0x50 0x02 0xFF b
sudo i2cset 0 0x50 0x03 0xFF b
sudo i2cset 0 0x50 0x04 0xFF b
sudo i2cset 0 0x50 0x05 0xFF b
sudo i2cset 0 0x50 0x06 0xFF b
sudo i2cset 0 0x50 0x07 0x00 b
...
Patch and fix checksum
sudo i2cset 0 0x50 0x75 0x11 b
sudo i2cset 0 0x50 0x7f 0x21 b
Verify Checksum is good and save a copy
sudo get-edid -b 0 | parse-edid
sudo get-edid -b 0 >edid0_r1.bin
References:
-
Specifications: Dell™ 2001FP Flat Panel Color Monitor User's Guide
-
Fixing EDID on DVI Monitors Showing No Signal When Windows Vista Boots http://hubpages.com/technology/how-to-reflash-a-monitors-corrupted-edid
-
LG L246WP monitor HDMI fix - writing EDID via I2C under Ubuntu LiveUSB
-
http://www.righto.com/2018/03/reading-vga-monitors-configuration-data.html