Hackerswork to generate an EDID blob from given Xorg Modelines, complete with valid checksum.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore Add bins to repo Jun 29, 2016
1024x768.S Simplify Jun 10, 2016
1024x768.bin Add bins to repo Jun 29, 2016
1280x1024.S Simplify Jun 10, 2016
1280x1024.bin Add bins to repo Jun 29, 2016
1280x720.S Add in proper mode for thunderbolt monitor as it's checksum is off pl… Jun 14, 2016
1280x720.bin Add bins to repo Jun 29, 2016
1600x1200.S Simplify Jun 10, 2016
1600x1200.bin Add bins to repo Jun 29, 2016
1680x1050.S Simplify Jun 10, 2016
1680x1050.bin Add bins to repo Jun 29, 2016
1920x1080.S Simplify Jun 10, 2016
1920x1080.bin Add bins to repo Jun 29, 2016
2560x1440.S Add in proper mode for thunderbolt monitor as it's checksum is off pl… Jun 14, 2016
2560x1440.bin Add bins to repo Jun 29, 2016
2880x1800.S Detect ratio of given mode to ensure it is supported Dec 22, 2017
2880x1800.bin Detect ratio of given mode to ensure it is supported Dec 22, 2017
3840x2160.S Add in proper mode for thunderbolt monitor as it's checksum is off pl… Jun 14, 2016
3840x2160.bin Add bins to repo Jun 29, 2016
800x600.S Simplify Jun 10, 2016
800x600.bin Add bins to repo Jun 29, 2016
EXAMPLE_MODELINES Add in proper mode for thunderbolt monitor as it's checksum is off pl… Jun 14, 2016
LICENSE Initial commit Jun 9, 2016
Makefile avoid hiding stderr from dos2unix to make it easier to notice problems Mar 15, 2018
README.md Update README.md Jul 1, 2016
edid.S Update edid.S from latest mainline kernel Dec 22, 2017
hex Initial commit Jun 10, 2016
modeline2edid mrclean Dec 22, 2017

README.md

edid-generator

Hackerswork to generate an EDID binary file from given Xorg Modelines

An extension of the awesome work provided in the Linux kernel documentation (in docs/EDID).

Simplifies the process greatly by allowing you to use a standard modeline as well as automatically calculating the CRC and applying it to the resulting image.

Requirements

sudo apt install zsh edid-decode automake dos2unix

Usage

If you don't have a <mode>.S prepared yet, generate one using a file containing Xorg Modelines. Lines that do not contain modelines are ignored, so you can just read right from xorg.conf.

./modeline2edid /etc/X11/xorg.conf

You can also just read from stdin the way you'd expect:

./modeline2edid
# or explicitly:
./modeline2edid -

After this creates your <name>.S files for each modeline it encounters, simply make:

make

The end result, providing all goes well, is a glorious EDID bin image for each mode you gave to it. A <name>.S file is templated, and then make is invoked to compile it into <name>.bin. It's actually compiled twice; once with an invalid CRC in order to generate said CRC to enter it into the template, after which we recompile, hence glorious bins.

NOTE: If you use a ratio other than 16:9, you'll need to specify it at the end of the modeline.as ratio=4:3. Ratios are hard defined in edid.S, so if you are trying to do something non-standard you'll need to add it.

Why?

Many monitors and TVs (both high and low end) provide invalid EDID data. After dealing with this for years, I wanted to automate this process.

The final straw was when I bought a cheap Sceptre 4K tv at a rather affordable ~$225 and ran into a long series of hurdles to get it to operate as expected at 3840x2160@60. After doing this enough times, I had to automate it or I was going to go crazy.

I used this to quickly iterate while troubleshhooting, finally it's all working from KMS all the way down to X!

(Via drm_kms_helper.edid_firmware=DP-1:edid/blah.bin if you're interested. I'm using radeon + intel, with nvidia you have to specify it in xorg.conf/xorg.conf.d as they don't yet support KMS for the fb console yet; their beta drivers, 367 at the time of writing, only support using KMS for the xorg server.)

Sometimes I hate being such a perfectionist. Keep in mind this project was made in a couple hours, I certainly didn't attempt to polish it in the least ;)