Creating and using edid.bin via xorg.conf

From Official Kodi Wiki
Jump to: navigation, search
Information: This page contains explanation about EDID generation and usage in xorg.conf
Advanced: The information contained in this page is considered advanced.
Warning: The informations contained in this page can cause issues with your X if any errors or incorrect information is entered.


xorg table of contents:
Configuration guides: Modeline references:

Contents

1 Outline

If your machine has a black screen only when you boot it up before TV or AMP, follow this guide.

On some combinations of equipments (AVR/TV/XBMC) in rarer cases you may find that the order you power on your equipment matters. This is obviously inconvenient but can be easily fixed.

The root cause of this issue is the EDID (Extended display identification data) handshake. Xorg may not correctly handshake with AV equipment after boot. Typically this results in a black screen and a full system shut down and restart to rectify.

In this guide we will show you how to trick Xorg into thinking your AV equipment is connected and powered on at all times. This locks on your install to one monitor/AVR (port specific) and should stop all handshake issues.

2 Generate EDID.bin

2.1 Method 1: Snag EDID from plugged in device (using read-edid; edid-decode to verify)

Using read-edid we can fetch the EDID directly from the device.

You should be running as normal user while following this guide, i.e. not as root Any further references to "root" are meant to be interpreted as base directory not the user.

1 Install read-edid.
sudo apt install read-edid edid-decode
2 Fetch edid for the specified monitor number (it starts at zero and increments by one), then use edid-decode to verify.
# the integer after -m is the monitor id, starting from zero and incrementing by one.
sudo get-edid -m 0 > edid.bin

# View the output of this command and verify you have the right monitor.
# You can tell via the vendor, resolutions, serial number, all that jazz.
cat edid.bin | edid-decode

Voila, edid.bin.

Continue on #Configure_xorg_to_read_custom_EDID_file below.


2.2 Method 2: Generate edid.bin from an Xorg modeline (edid-generator)

If you happen to already know or have a working Xorg modeline for your device (or want to tweak one) you can use edid-generator to do so easily.

You should be running as normal user while following this guide, i.e. not as root Any further references to "root" are meant to be interpreted as base directory not the user.

1 Install dependencies.
sudo apt install zsh edid-decode automake
2 Snag a copy of edid-generator, enter into it.
git clone https://github.com/akatrevorjay/edid-generator
cd edid-generator
3 Run modeline2edid and paste in your Xorg modelines. This will generate the required <name>.S file(s) required for the next step.
./modeline2edid
# <paste in modeline>
4 Run make to generate .bin files.
make

Voila, you should now have EDID bins for all modes pasted in. They are named by the same name you use for the modeline itself.

Continue on #Configure_xorg_to_read_custom_EDID_file below.


2.3 Method 3: Nvidia Xorg driver log parsing

This example is for a nVidia GPU, other GPUs will have a similar approach but are not covered here.

In this method we use a defer to nvidia-xconfig which is reliable, even for ATI GPUs.

You'll need:

  • SSH access.
  • Nano installed or your editor of choice.
  • Reading glasses.
  • nvidia-xconfig

You should be running as normal user while following this guide, i.e. not as root Any further references to "root" are meant to be interpreted as base directory not the user.

Note: nvidia-xconfig is already installed on Ubuntu and variants if you have the nvidia-current drivers installed via the Ubuntu packaging or Xswat ppa. It is not intend to instruct users on full use of this tool.

2.3.1 Snag output from nvidia Xorg driver

Make sure your install is in a working state, powered on in the correct order so that you can see the GUI.

1 Open an SSH session to your machine and backup any existing xorg.conf.
cp /etc/X11/xorg.conf /etc/X11/xorg.conf.bak
2 You can use a current xorg.conf and should always have a backup of existing, however if you want to start with an fresh xorg.conf proceed with following step.
sudo nvidia-xconfig -s --no-logo --no-composite --no-dynamic-twinview --force-generate --output-xconfig=/etc/X11/xorg.conf
3 We need a verbose log from X to generate the edid.bin from the raw data.

Kill xbmc if it's running by:

sudo stop xbmc

cd ~

sudo X -verbose 6 > ~/xlog.txt 2>&1

This process needs interrupting via Ctrl+C after a few seconds.

In the root of your home directory you will find a xlog.txt /home/xbmc/xlog.txt

4 Now we work out the Assigned Display Device DFP number

type:

cat /home/xbmc/xlog.txt | grep ConnectedMonitor |cut -f2 -d\"

you should see message like the following:

ConnectedMonitor
DFP-0
DFP-0

Take a note of the DFP number in this example "DFP-0". Your number may vary.


2.3.2 Extracting EDID binary from nvidia Xorg driver log output

Now that all the information is noted and gathered, we can generate the RAW binary edid information to a binary..

1 The following command works on 32bit and 64bit:
sudo nvidia-xconfig --extract-edids-from-file=/home/xbmc/xlog.txt --extract-edids-output-file=/etc/X11/edid.bin

On success you should see a message like the following:

Found 1 EDID in "/home/xbmc/xlog.txt".
  Wrote EDID for "SAMSUNG (DFP-0)" to "/etc/X11/edid.bin" (256 bytes)..
2 If you did not see the above message we confirm if the edid.bin was created and exists, if not retrace your steps until file is created.
test -f /etc/X11/edid.bin && echo 'File exists' || echo 'File not found'


3 Configure xorg to read custom EDID file

Now edit the xorg.conf you created again and find Section "Device"

1
sudo nano /etc/X11/xorg.conf
2 And append the following information to Section "Device" within the /etc/X11/xorg.conf
 Option         "ConnectedMonitor" "DFP-0"
 Option         "CustomEDID" "DFP-0:/etc/X11/edid.bin"
 Option         "IgnoreEDID" "false"
 Option         "UseEDID" "true"
Important: It is VITAL you change the DFP-# number to match the one we found earlier.


In the end your Section "Device" will look something like the example below.

 Section "Device"
  Identifier     "nvidia"
  Driver         "nvidia"
  Option         "DynamicTwinView" "false"
  Option         "NoFlip" "false"
  Option         "NoLogo" "true"
  Option         "ModeValidation" "NoVesaModes, NoXServerModes"
  Option         "ConnectedMonitor" "DFP-0"
  Option         "CustomEDID" "DFP-0:/etc/X11/edid.bin"
  Option         "IgnoreEDID" "false"
  Option         "UseEDID" "true"
 EndSection

Since we have created a new xorg.conf file in a location the OS knows to use as default, no further changes need made to make this permanent. If at a later date you need to undo this work simple rename the config file and reboot to revert to default.

If all has went to plan when you reboot everything will just work and the order of powering equipment up will not matter anymore.

Note: If your equipment is coupled to a receiver that has broader HDMI capabilities than your TV, you should edit your xorg.conf so that the section "Screen" looks like this:

Section "Screen"
    Identifier     "screen"
    Device         "nvidia"
    DefaultDepth    24
    Option         "ColorRange" "Full"
    Option         "ColorSpace" "RGB"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection


4 Edid Library

The edid library is intended to be a collection of user generated edid.bin for equipment such as TV's or AVR's in case users want to test or modify or share with others existing edid's. This section is a WIP and will need to be improved on by users.

Some bins for standard modes can also be found in the edid-generator repo: https://github.com/akatrevorjay/edid-generator .

Use the Legend below as a guide to fill in new entries onto the edid.bin table.

Legend
Yes No N/A ? Other
{{yes}} {{no}} {{NA}} {{?}} Other
Warning: Make sure you have a backup of your current installation before using any edid.bin below. Verify download integrity via MD5 checksum.


Below is an area that the general community can share their edid.bin and relevant information with other users.
Feel free to update and share your experience below.

TV Brand AVR Brand Model GPU Brand/Model Working Download link Download contents
Samsung N/A Series 5 Nvidia ION Yes Download edid.zip edid.bin edid.md5
? ? ? ? ? Download edid.bin ? ?

Note: Recommended you would create a md5 checksum of the edid.bin and compress both so it can be checked for integrity on download.

5 Credits

Portions of the the edid instructions are adapted from the Openelec wiki, credit to original authors[1]

6 References

  1. Config EDID NVidia
Personal tools
Namespaces

Variants
Actions
Navigation
Wiki help
Toolbox