- Audio & Video
How to Reflash a Monitor with corrupted EDID
Could be a (monitor) Life Saver
I do wish to share a useful program by author Mark Blakeney at GitHub.com which saved a 'faulty' monitor of mine from going to the scrap heap..
This program (edid-rw) allows you to 're-flash' the EDID chip inside a monitor to correct settings so that modern operating systems can boot it to native resolution.
The program runs on linux Ubuntu/Debian and probably any of it's derivatives or live CDs.
A word of warning: You should only use this process as a ' last resort '. It could be that your monitor's problem is not EDID related at all. Flashing wrong data could also corrupt an EDID.
What is an EDID ?
Most consumer monitors these days carry inside an EEPROM chip called the EDID. It contains the name and specifications of the monitor's technical data including it's capabilities. Using a special Display Data Channel (DDC) in the monitor cable, the PC communicates with the monitor to get it's info.
The EDID can be re-written using special software.
Why on Earth Would I Want to do That ?
Unlike earlier versions of Linux, modern distros are increasingly relying on 'Auto-Detection' of hardware, and that includes monitors.
This means the OS will 'ask' the monitor, what it is capable of. In the old days, before this type of auto-detection, the user would just pre-config these settings manually into config files.
If the boot process does not detect the monitor correctly, you could end up with the following symptoms.
Unable to achieve a higher resolution supported.
Incorrectly detecting a resolution that does not exist.
Unable to detect the monitor at all.
Tip: This also means that it's better to have your monitor 'on' before booting, otherwise the OS would default to a lower resolution.
These symptoms could be because of incorrect settings on the PC side, or it could also be because the EDID data in the monitor has been corrupted.
So what? There's nothing wrong with my monitor.
No, I'm not saying there is. But EDID chips can go corrupt.
The chip is sensitive to electric shocks. Just the act of unplugging a cable without switching off the monitor might cause this. Ok it's unusual but it does happen, and there's scant solutions on the internet to fix it.
Ok, What's the solution ?
On Windows, there's the 'Phoenix'solution by Phoenix EDID Designer from Raylar Design, Inc. Since I don't use windows anymore, I don't know if this works or not, try Google for more info. It looks simple enough, good luck. There are also other programs made by monitor manufacturers themselves that run on Windows, but they are hard to find.
Instead I'm going to show you how it can be done in Linux Lubuntu, which would probably work for any other Ubuntu derivative. You can even use a bootable linux live CD and install the software temporarily, if you wish, it works just the same.
edid-rw is a python script from Mark Blakeney at GitHub.
It reads and writes EDID data on the i2c channel between the PC and monitor.
The EDID is basically a 128 byte block. edid-rw alone is not enough to read and write to this block, you also need some supporting software.
I assume you know how to open a terminal and execute commands as root.
1. Install Software
First download the edid-rw python script from GitHub
Then install the support software;
apt-get install python-smbus
apt-get install edid-decode
apt-get install ghex
edid-decode displays the raw EDID as readable text.
ghex is a hex code editor.
Also, make edid-rw excutable: i.e chmod 755 edid-rw
(To see the help text : ./edid-rw -h )
2. Display EDID info
To see the current EDID info from the monitor you must specify an i2c device number. This example uses 3, but you must experiment yourself find which is the your monitor i2c device number. I suggest you start from 0 and work you way up. An incorrect device# will give a program traceback and IO error.
Get the EDID data block and pipe it into a decoder to readable form;
./edid-rw 3 | edid-decode
If there are any errors, edid-decode will indicate so, it will also validate and display the last-byte checksum.
3. Modify the EDID
First get the raw block and save it to a file;
./edid-rw 3 > edid.bin
(You can also check the file using edid-decode; i.e cat edid.bin | edid-decode )
Edit the block using ghex;
( It will help to set Ghex preferences with cursor offset as decimal. )
The complete EDID data block specification can be found on Wikipedia.
At this point only You will know how bad the block has been corrupted. If you are lucky you will be able to find a duplicate block on the web from somebody who has exactly the same monitor as you. If not, you will have to repair it byte by byte using the spec.
Often, it's just the case of a corrupted checksum (last byte of the file). The suggested checksum is always displayed by edid-decode, you can try using that. Another important part are bytes 38-39, this gives info of the first standard supported mode, e.g 1280x1024 @ 60Hz.
After editing your modifications, save it as edid-new.bin.
Run edid-new.bin through edid-decode to get the new checksum.
cat edid-new.bin | edid-decode
Edit again with ghex to poke in the new checksum.
and save the file.
4. Burn in the new EDID
./edid-rw -w 3 < edid-new.bin
Be sure to use the same i2c device number.
Good Luck !
Hopefully, you can now reboot to your desired resolution.
Tip: I have found that you can still get the monitor to work even if edid-decode says "block does not conform" or "Bad year of manufacture".
That's all for now !